Can I predict the time & size of a computation given a small set of stats? I encrypt a file, and the resulting (encrypted) file is of a certain Size.
I can increase the Strength of the encryption and the Size of the resulting file will also increase in that case.
The Time it takes to then decrypt the file also increases when the Strength of the encryption is increased.
I ran 8 tests in total increasing the Strength by 5 every time and here are the results:




Strength
Time (to decrypt in secs)
Size of encrypted file (Mb)




1
0.013
0.000088


5
0.064
0.001024


10
0.139
0.005376


15
0.199
0.023744


20
0.305
0.101144


25
0.503
0.427328


30
1.086
1.80188


35
3.348
7.59422


40
14.191
32.003072




I'm trying to figure out a pattern here, i.e. the relation between the Strength, Time & Size.
My computer crashes for any Strength > 40 so I was wondering if based on these stats alone there is a way to more or less predict the Time and Size for a Strength = 1000 for example (or other).
EDIT: I am not a mathematician and I have no experience with functions coming up with formulas etc. :-)
 A: When you want to figure something out like this, your first thought should always be "get lots of data" and your second thought should be "plot the data". In this case you've got an acceptable number of data points, so for now let's skip right to the plots. I pasted your table into a Google Sheets spreadsheet and tried its default "Insert Chart" option and got this:

So yes, increasing strength does make the other variables increase in a way that's more than linear. The next step would be to change the vertical axis to a logarithmic one - i.e. where the gap between ticks represents multiplying by a consistent value rather than adding one (e.g. going 0.01, 0.1, 1, 10, 100 instead of -2, -1, 0, 1, 2) and we see something that might be useful:

Notice how, except at the far left, the red line is practically flat? That's a very good sign, because it means we can assume that the relationship between Size and Strength is exponential, i.e. $Size = k \times \alpha ^ {Strength}$ for some values of $k$ and $\alpha$. Now we could go through the mathematics of fitting the function, but for simplicity I just asked Google for an exponential trendline and it gave it to me:

Here, the equation of the trendline is estimated as "3.2E-04e^0.288x", or in other words $Size = 0.00032 e^{-0.288 \times Strength} \approx 0.00032 \left(\frac{4}{3}\right)^{Strength}$ which means that increasing the Strength of the encryption by 1 increases the size of the file by 33%. It looks like the behaviour isn't exactly right at the bottom end, which might be a function of how the encryption works (it would be good to try encrypting several files of the same size to eliminate anything that's unique to your particular file, and also try encrypting files of different size to see how everything scales in that direction too).
Now, what about the Time? It's not quite as nice a line there, so I suspect that the relationship is not quite exponential - there might be multiple processes that are involved and one may be exponential while the other is polynomial, or something. The data is probably not enough to make any definitive rulings. If I do the same and add an exponential trendline, then I get the equation $Time = 0.00517 e^{0.195 \times Strength} \approx 0.00517 \left(1.215\right)^{Strength}$, so increasing Strength by 1 adds a factor of about 22% to the time to decrypt, but the fact that the trend doesn't fit as well means we expect that to break down faster than the size equation.
