diff --git a/performance.md b/performance.md --- a/performance.md +++ b/performance.md @@ -3,7 +3,7 @@ Let's assume we have a secret of length _m_. The splitting takes _n_ evaluations of a polynomial of order _k_ (over Galois field 256) for each byte, leading to _O(n\*k\*m)_ finite field multiplications. Reconstruction of the constant parameters during joining first precomputes parts of the Lagrange polynomial and then reuses them for each byte, taking _O(k\*k + k\*m)_ multiplications. -Benchmark results. The times for split and join mean _seconds per byte_ of the secret length: +Benchmark results. Measured on a mid-end laptop made in 2020. The times for split and join mean _seconds per byte_ of the secret length: <table> <tr> <th>Revision</th> @@ -36,4 +36,28 @@ Benchmark results. The times for split a <td>0.00741</td> <td>0.00156</td> </tr> -</table> \ No newline at end of file + <tr> + <td rowspan="2">0957647049ef</td> + <td rowspan="2">splitting with FFT</td> + <td>2 / 3</td> + <td>1.26e-05</td> + <td>-</td> + </tr> + <tr> + <td>254 / 254</td> + <td>0.00828</td> + <td>-</td> + </tr> + <tr> + <td rowspan="2">d5f60adc56c0</td> + <td rowspan="2">splitting with FFT,<br> caching gfmul(), gfpow(), precompute_x()</td> + <td>2 / 3</td> + <td>7.88e-06</td> + <td>-</td> + </tr> + <tr> + <td>254 / 254</td> + <td>0.00183</td> + <td>-</td> + </tr> +</table> diff --git a/src/shamira/fft.py b/src/shamira/fft.py --- a/src/shamira/fft.py +++ b/src/shamira/fft.py @@ -1,3 +1,5 @@ +# GNU GPLv3, see LICENSE + import math import cmath import itertools