Changeset - eba1ea340d1f
[Not reviewed]
default
0 1 0
Laman - 4 years ago 2020-04-14 20:38:18

updated and fixed readme
1 file changed with 6 insertions and 4 deletions:
0 comments (0 inline, 0 general)
readme.md
Show inline comments
 
# Shamira #
 

	
 
Implements Shamir's secret sharing algorithm. Splits a string or a byte sequence byte-per-byte into _n_<255 shares, with any _k_ of them sufficient for reconstruction of the original input.
 
Implements [Shamir's secret sharing algorithm](https://en.wikipedia.org/wiki/Shamir's_Secret_Sharing). Splits a string or a byte sequence byte-per-byte into _n_<255 shares, with any _k_ of them sufficient for reconstruction of the original input.
 

	
 
Outputs the shares as hexadecimal, Base32 or Base64 encoded strings.
 

	
 
Can be used on its own from the command line by invoking `shamira.py` or as a library by importing `shamira.py`.
 
## Installation and usage ##
 

	
 
Can be run straight from the cloned repository by executing the package with `python -m shamira` or simply installed with `python setup.py build`, `python setup.py install`. Then imported in your code with `import shamira` or run from the command line with `shamira`.
 

	
 
## Performance ##
 

	
 
As it is, the code is not very fast. Splitting takes _n_ evaluations of a polynomial of order _k_ over Galois field 256, leading to _O(n*k)_ finite field multiplications. Reconstruction of the constant parameters during joining similarly takes _O(k*k)_ multiplications.
 
As it is, the code is not very fast. Splitting takes _n_ evaluations of a polynomial of order _k_ over Galois field 256, leading to _O(n\*k)_ finite field multiplications. Reconstruction of the constant parameters during joining similarly takes _O(k\*k)_ multiplications.
 

	
 
Benchmark results, all values mean _seconds per byte_ of the secret length:
 
<table>
 
@@ -39,4 +41,4 @@ Benchmark results, all values mean _seco
 
    </tr>
 
</table>
 

	
 
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 `benchmark.py`
 
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`
0 comments (0 inline, 0 general)