diff --git a/readme.md b/readme.md --- a/readme.md +++ b/readme.md @@ -30,9 +30,9 @@ Please report your issues to https://tra ## Performance ## -As it is, the code is not very fast. Let's assume we have a secret of length _m_. For each byte, the splitting takes _n_ evaluations of a polynomial of order _k_ over Galois field 256, leading to _O(n\*k\*m)_ finite field multiplications. Reconstruction of the constant parameters during joining takes _O(k\*k + k\*m)_ multiplications. +Being written in pure Python, the code is not especially fast. It is therefore recommended to split rather keys to encrypted files than the files themselves. -Benchmark results, all values mean _seconds per byte_ of the secret length: +Benchmark results, as obtained by running `shamira benchmark`. All values mean _seconds per byte_ of the secret length: @@ -41,24 +41,22 @@ Benchmark results, all values mean _seco - - + + - - + + - - + + - - + +
k / n parameters
2 / 3 (a Raspberry Pi 3)6.08e-050.0004350.0001420.000448
2 / 3 (a laptop)5.02e-064.12e-057.88e-064.28e-05
254 / 254 (a Raspberry Pi 3)0.2260.03140.02680.0287
254 / 254 (a laptop)0.01250.001750.001830.00156
- -While the speeds are not awful, for longer secrets I recommend encrypting them with a random key of your choice and splitting only the key. Anyway, you can run your own benchmark with `shamira benchmark`