@ -1,5 +1,9 @@ |
|||||
# Shamir's Secret Sharing |
# Shamir's Secret Sharing |
||||
This repo contains `Rust` & `Go` implementations of [Shamir's Secret Sharing](https://en.wikipedia.org/wiki/Shamir%27s_Secret_Sharing) algorithm. The `Go` implementation also has a compiled Web Assembly (WASM) version from the Go code to be used from the browser. |
|
||||
|
> Warning: this has been done to study, do not use. |
||||
|
|
||||
|
This repo contains `Rust` & `Go` implementations of [Shamir's Secret Sharing](https://en.wikipedia.org/wiki/Shamir%27s_Secret_Sharing) algorithm. A blog post explaining the concepts can be found at https://arnaucube.com/blog/shamir-secret-sharing.html . |
||||
|
|
||||
|
The `Go` implementation also has a compiled Web Assembly (WASM) version from the Go code to be used from the browser. |
||||
|
|
||||
- `go`: [go-shamirsecretsharing](https://github.com/arnaucube/shamirsecretsharing/tree/master/go-shamirsecretsharing): Go lib + WASM lib |
- `go`: [go-shamirsecretsharing](https://github.com/arnaucube/shamirsecretsharing/tree/master/go-shamirsecretsharing): Go lib + WASM lib |
||||
- `rust`: [shamirsecretsharing-rs](https://github.com/arnaucube/shamirsecretsharing/tree/master/shamirsecretsharing-rs) |
- `rust`: [shamirsecretsharing-rs](https://github.com/arnaucube/shamirsecretsharing/tree/master/shamirsecretsharing-rs) |
@ -1 +1,2 @@ |
|||||
/target |
/target |
||||
|
Cargo.lock |
@ -1,273 +0,0 @@ |
|||||
# This file is automatically @generated by Cargo. |
|
||||
# It is not intended for manual editing. |
|
||||
[[package]] |
|
||||
name = "autocfg" |
|
||||
version = "0.1.4" |
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|
||||
|
|
||||
[[package]] |
|
||||
name = "bitflags" |
|
||||
version = "1.0.4" |
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|
||||
|
|
||||
[[package]] |
|
||||
name = "cloudabi" |
|
||||
version = "0.0.3" |
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|
||||
dependencies = [ |
|
||||
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
] |
|
||||
|
|
||||
[[package]] |
|
||||
name = "fuchsia-cprng" |
|
||||
version = "0.1.1" |
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|
||||
|
|
||||
[[package]] |
|
||||
name = "libc" |
|
||||
version = "0.2.58" |
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|
||||
|
|
||||
[[package]] |
|
||||
name = "num" |
|
||||
version = "0.2.0" |
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|
||||
dependencies = [ |
|
||||
"num-bigint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
"num-complex 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
"num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
"num-iter 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
"num-rational 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
"num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
] |
|
||||
|
|
||||
[[package]] |
|
||||
name = "num-bigint" |
|
||||
version = "0.2.2" |
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|
||||
dependencies = [ |
|
||||
"num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
"num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
"rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
] |
|
||||
|
|
||||
[[package]] |
|
||||
name = "num-complex" |
|
||||
version = "0.2.3" |
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|
||||
dependencies = [ |
|
||||
"autocfg 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
"num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
] |
|
||||
|
|
||||
[[package]] |
|
||||
name = "num-integer" |
|
||||
version = "0.1.41" |
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|
||||
dependencies = [ |
|
||||
"autocfg 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
"num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
] |
|
||||
|
|
||||
[[package]] |
|
||||
name = "num-iter" |
|
||||
version = "0.1.39" |
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|
||||
dependencies = [ |
|
||||
"autocfg 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
"num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
"num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
] |
|
||||
|
|
||||
[[package]] |
|
||||
name = "num-rational" |
|
||||
version = "0.2.2" |
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|
||||
dependencies = [ |
|
||||
"autocfg 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
"num-bigint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
"num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
"num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
] |
|
||||
|
|
||||
[[package]] |
|
||||
name = "num-traits" |
|
||||
version = "0.2.8" |
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|
||||
dependencies = [ |
|
||||
"autocfg 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
] |
|
||||
|
|
||||
[[package]] |
|
||||
name = "rand" |
|
||||
version = "0.5.6" |
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|
||||
dependencies = [ |
|
||||
"cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
"fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
"libc 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
"rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
"winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
] |
|
||||
|
|
||||
[[package]] |
|
||||
name = "rand" |
|
||||
version = "0.6.5" |
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|
||||
dependencies = [ |
|
||||
"autocfg 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
"libc 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
"rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
"rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
"rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
"rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
"rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
"rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
"rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
"rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
"winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
] |
|
||||
|
|
||||
[[package]] |
|
||||
name = "rand_chacha" |
|
||||
version = "0.1.1" |
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|
||||
dependencies = [ |
|
||||
"autocfg 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
"rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
] |
|
||||
|
|
||||
[[package]] |
|
||||
name = "rand_core" |
|
||||
version = "0.3.1" |
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|
||||
dependencies = [ |
|
||||
"rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
] |
|
||||
|
|
||||
[[package]] |
|
||||
name = "rand_core" |
|
||||
version = "0.4.0" |
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|
||||
|
|
||||
[[package]] |
|
||||
name = "rand_hc" |
|
||||
version = "0.1.0" |
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|
||||
dependencies = [ |
|
||||
"rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
] |
|
||||
|
|
||||
[[package]] |
|
||||
name = "rand_isaac" |
|
||||
version = "0.1.1" |
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|
||||
dependencies = [ |
|
||||
"rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
] |
|
||||
|
|
||||
[[package]] |
|
||||
name = "rand_jitter" |
|
||||
version = "0.1.4" |
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|
||||
dependencies = [ |
|
||||
"libc 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
"rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
"winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
] |
|
||||
|
|
||||
[[package]] |
|
||||
name = "rand_os" |
|
||||
version = "0.1.3" |
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|
||||
dependencies = [ |
|
||||
"cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
"fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
"libc 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
"rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
"rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
"winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
] |
|
||||
|
|
||||
[[package]] |
|
||||
name = "rand_pcg" |
|
||||
version = "0.1.2" |
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|
||||
dependencies = [ |
|
||||
"autocfg 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
"rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
] |
|
||||
|
|
||||
[[package]] |
|
||||
name = "rand_xorshift" |
|
||||
version = "0.1.1" |
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|
||||
dependencies = [ |
|
||||
"rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
] |
|
||||
|
|
||||
[[package]] |
|
||||
name = "rdrand" |
|
||||
version = "0.4.0" |
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|
||||
dependencies = [ |
|
||||
"rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
] |
|
||||
|
|
||||
[[package]] |
|
||||
name = "shamirsecretsharing-rs" |
|
||||
version = "0.0.1" |
|
||||
dependencies = [ |
|
||||
"num 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
"num-bigint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
"num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
] |
|
||||
|
|
||||
[[package]] |
|
||||
name = "winapi" |
|
||||
version = "0.3.7" |
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|
||||
dependencies = [ |
|
||||
"winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
"winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", |
|
||||
] |
|
||||
|
|
||||
[[package]] |
|
||||
name = "winapi-i686-pc-windows-gnu" |
|
||||
version = "0.4.0" |
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|
||||
|
|
||||
[[package]] |
|
||||
name = "winapi-x86_64-pc-windows-gnu" |
|
||||
version = "0.4.0" |
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|
||||
|
|
||||
[metadata] |
|
||||
"checksum autocfg 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "0e49efa51329a5fd37e7c79db4621af617cd4e3e5bc224939808d076077077bf" |
|
||||
"checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" |
|
||||
"checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" |
|
||||
"checksum fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" |
|
||||
"checksum libc 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "6281b86796ba5e4366000be6e9e18bf35580adf9e63fbe2294aadb587613a319" |
|
||||
"checksum num 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cf4825417e1e1406b3782a8ce92f4d53f26ec055e3622e1881ca8e9f5f9e08db" |
|
||||
"checksum num-bigint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "57450397855d951f1a41305e54851b1a7b8f5d2e349543a02a2effe25459f718" |
|
||||
"checksum num-complex 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "fcb0cf31fb3ff77e6d2a6ebd6800df7fdcd106f2ad89113c9130bcd07f93dffc" |
|
||||
"checksum num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)" = "b85e541ef8255f6cf42bbfe4ef361305c6c135d10919ecc26126c4e5ae94bc09" |
|
||||
"checksum num-iter 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "76bd5272412d173d6bf9afdf98db8612bbabc9a7a830b7bfc9c188911716132e" |
|
||||
"checksum num-rational 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f2885278d5fe2adc2f75ced642d52d879bffaceb5a2e0b1d4309ffdfb239b454" |
|
||||
"checksum num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "6ba9a427cfca2be13aa6f6403b0b7e7368fe982bfa16fccc450ce74c46cd9b32" |
|
||||
"checksum rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c618c47cd3ebd209790115ab837de41425723956ad3ce2e6a7f09890947cacb9" |
|
||||
"checksum rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" |
|
||||
"checksum rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" |
|
||||
"checksum rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" |
|
||||
"checksum rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d0e7a549d590831370895ab7ba4ea0c1b6b011d106b5ff2da6eee112615e6dc0" |
|
||||
"checksum rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" |
|
||||
"checksum rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" |
|
||||
"checksum rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" |
|
||||
"checksum rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" |
|
||||
"checksum rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" |
|
||||
"checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" |
|
||||
"checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" |
|
||||
"checksum winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "f10e386af2b13e47c89e7236a7a14a086791a2b88ebad6df9bf42040195cf770" |
|
||||
"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" |
|
||||
"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" |
|