Upgrading several dalek dependencies and rand
This commit is contained in:
parent
4f7b96a603
commit
68b5a9c18e
|
@ -151,6 +151,12 @@ version = "0.21.4"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "9ba43ea6f343b788c8764558649e08df62f86c6ef251fdaeb1ffd010a9ae50a2"
|
checksum = "9ba43ea6f343b788c8764558649e08df62f86c6ef251fdaeb1ffd010a9ae50a2"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "base64ct"
|
||||||
|
version = "1.6.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bincode"
|
name = "bincode"
|
||||||
version = "1.3.3"
|
version = "1.3.3"
|
||||||
|
@ -172,15 +178,6 @@ version = "2.3.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42"
|
checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "block-buffer"
|
|
||||||
version = "0.9.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4"
|
|
||||||
dependencies = [
|
|
||||||
"generic-array",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "block-buffer"
|
name = "block-buffer"
|
||||||
version = "0.10.4"
|
version = "0.10.4"
|
||||||
|
@ -310,6 +307,12 @@ dependencies = [
|
||||||
"wasm-bindgen",
|
"wasm-bindgen",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "const-oid"
|
||||||
|
version = "0.9.5"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "core-foundation"
|
name = "core-foundation"
|
||||||
version = "0.9.3"
|
version = "0.9.3"
|
||||||
|
@ -394,17 +397,34 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "curve25519-dalek"
|
name = "curve25519-dalek"
|
||||||
version = "3.2.1"
|
version = "4.1.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "90f9d052967f590a76e62eb387bd0bbb1b000182c3cefe5364db6b7211651bc0"
|
checksum = "622178105f911d937a42cdb140730ba4a3ed2becd8ae6ce39c7d28b5d75d4588"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"byteorder",
|
"cfg-if",
|
||||||
"digest 0.9.0",
|
"cpufeatures",
|
||||||
"rand_core 0.5.1",
|
"curve25519-dalek-derive",
|
||||||
|
"digest 0.10.7",
|
||||||
|
"fiat-crypto",
|
||||||
|
"platforms",
|
||||||
|
"rand_core 0.6.4",
|
||||||
|
"rustc_version",
|
||||||
|
"serde",
|
||||||
"subtle",
|
"subtle",
|
||||||
"zeroize",
|
"zeroize",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "curve25519-dalek-derive"
|
||||||
|
version = "0.1.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "83fdaf97f4804dcebfa5862639bc9ce4121e82140bec2a987ac5140294865b5b"
|
||||||
|
dependencies = [
|
||||||
|
"proc-macro2",
|
||||||
|
"quote",
|
||||||
|
"syn",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "curve25519-dalek-ng"
|
name = "curve25519-dalek-ng"
|
||||||
version = "3.0.3"
|
version = "3.0.3"
|
||||||
|
@ -413,7 +433,6 @@ checksum = "3b8dfd4d479156d9ad3fe6d1562f78ff31a9ba8831d3575126061541c7294e48"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"byteorder",
|
"byteorder",
|
||||||
"digest 0.9.0",
|
"digest 0.9.0",
|
||||||
"packed_simd_2",
|
|
||||||
"rand_core 0.5.1",
|
"rand_core 0.5.1",
|
||||||
"serde",
|
"serde",
|
||||||
"subtle-ng",
|
"subtle-ng",
|
||||||
|
@ -455,6 +474,16 @@ dependencies = [
|
||||||
"syn",
|
"syn",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "der"
|
||||||
|
version = "0.7.8"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c"
|
||||||
|
dependencies = [
|
||||||
|
"const-oid",
|
||||||
|
"zeroize",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "deranged"
|
name = "deranged"
|
||||||
version = "0.3.8"
|
version = "0.3.8"
|
||||||
|
@ -479,31 +508,31 @@ version = "0.10.7"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
|
checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"block-buffer 0.10.4",
|
"block-buffer",
|
||||||
"crypto-common",
|
"crypto-common",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ed25519"
|
name = "ed25519"
|
||||||
version = "1.5.3"
|
version = "2.2.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7"
|
checksum = "60f6d271ca33075c88028be6f04d502853d63a5ece419d269c15315d4fc1cf1d"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"pkcs8",
|
||||||
"serde",
|
"serde",
|
||||||
"signature",
|
"signature",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ed25519-dalek"
|
name = "ed25519-dalek"
|
||||||
version = "1.0.1"
|
version = "2.0.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d"
|
checksum = "7277392b266383ef8396db7fdeb1e77b6c52fed775f5df15bb24f35b72156980"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"curve25519-dalek",
|
"curve25519-dalek",
|
||||||
"ed25519",
|
"ed25519",
|
||||||
"rand 0.7.3",
|
"rand_core 0.6.4",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_bytes",
|
|
||||||
"sha2",
|
"sha2",
|
||||||
"zeroize",
|
"zeroize",
|
||||||
]
|
]
|
||||||
|
@ -550,6 +579,12 @@ version = "2.0.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764"
|
checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "fiat-crypto"
|
||||||
|
version = "0.2.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "d0870c84016d4b481be5c9f323c24f65e31e901ae618f0e80f4308fb00de1d2d"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "fnv"
|
name = "fnv"
|
||||||
version = "1.0.7"
|
version = "1.0.7"
|
||||||
|
@ -1000,12 +1035,6 @@ version = "0.2.147"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3"
|
checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "libm"
|
|
||||||
version = "0.1.4"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "7fc7aa29613bd6a620df431842069224d8bc9011086b1db4c0e0cd47fa03ec9a"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "linux-raw-sys"
|
name = "linux-raw-sys"
|
||||||
version = "0.4.3"
|
version = "0.4.3"
|
||||||
|
@ -1050,7 +1079,7 @@ dependencies = [
|
||||||
"sled",
|
"sled",
|
||||||
"time",
|
"time",
|
||||||
"tokio",
|
"tokio",
|
||||||
"zkp",
|
"zkp 0.7.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -1061,11 +1090,11 @@ dependencies = [
|
||||||
"base64",
|
"base64",
|
||||||
"bincode",
|
"bincode",
|
||||||
"chrono",
|
"chrono",
|
||||||
"curve25519-dalek-ng",
|
"curve25519-dalek",
|
||||||
"ed25519-dalek",
|
"ed25519-dalek",
|
||||||
"hex_fmt",
|
"hex_fmt",
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"rand 0.7.3",
|
"rand 0.8.5",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_with",
|
"serde_with",
|
||||||
"sha2",
|
"sha2",
|
||||||
|
@ -1073,7 +1102,7 @@ dependencies = [
|
||||||
"subtle",
|
"subtle",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
"time",
|
"time",
|
||||||
"zkp",
|
"zkp 0.7.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -1091,7 +1120,7 @@ dependencies = [
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"time",
|
"time",
|
||||||
"wasm-bindgen",
|
"wasm-bindgen",
|
||||||
"zkp",
|
"zkp 0.8.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -1131,6 +1160,18 @@ dependencies = [
|
||||||
"zeroize",
|
"zeroize",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "merlin"
|
||||||
|
version = "3.0.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d"
|
||||||
|
dependencies = [
|
||||||
|
"byteorder",
|
||||||
|
"keccak",
|
||||||
|
"rand_core 0.6.4",
|
||||||
|
"zeroize",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mime"
|
name = "mime"
|
||||||
version = "0.3.17"
|
version = "0.3.17"
|
||||||
|
@ -1327,16 +1368,6 @@ dependencies = [
|
||||||
"vcpkg",
|
"vcpkg",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "packed_simd_2"
|
|
||||||
version = "0.3.8"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "a1914cd452d8fccd6f9db48147b29fd4ae05bea9dc5d9ad578509f72415de282"
|
|
||||||
dependencies = [
|
|
||||||
"cfg-if",
|
|
||||||
"libm",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "parking_lot"
|
name = "parking_lot"
|
||||||
version = "0.11.2"
|
version = "0.11.2"
|
||||||
|
@ -1403,12 +1434,28 @@ version = "0.1.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
|
checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "pkcs8"
|
||||||
|
version = "0.10.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7"
|
||||||
|
dependencies = [
|
||||||
|
"der",
|
||||||
|
"spki",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pkg-config"
|
name = "pkg-config"
|
||||||
version = "0.3.27"
|
version = "0.3.27"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964"
|
checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "platforms"
|
||||||
|
version = "3.1.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "4503fa043bf02cee09a9582e9554b4c6403b2ef55e4612e96561d294419429f8"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "polyval"
|
name = "polyval"
|
||||||
version = "0.6.1"
|
version = "0.6.1"
|
||||||
|
@ -1713,6 +1760,15 @@ version = "0.1.23"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76"
|
checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "rustc_version"
|
||||||
|
version = "0.4.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366"
|
||||||
|
dependencies = [
|
||||||
|
"semver",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustix"
|
name = "rustix"
|
||||||
version = "0.38.4"
|
version = "0.38.4"
|
||||||
|
@ -1770,6 +1826,12 @@ dependencies = [
|
||||||
"libc",
|
"libc",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "semver"
|
||||||
|
version = "1.0.18"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde"
|
name = "serde"
|
||||||
version = "1.0.189"
|
version = "1.0.189"
|
||||||
|
@ -1779,15 +1841,6 @@ dependencies = [
|
||||||
"serde_derive",
|
"serde_derive",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "serde_bytes"
|
|
||||||
version = "0.11.12"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "ab33ec92f677585af6d88c65593ae2375adde54efdbf16d597f2cbc7a6d368ff"
|
|
||||||
dependencies = [
|
|
||||||
"serde",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_derive"
|
name = "serde_derive"
|
||||||
version = "1.0.189"
|
version = "1.0.189"
|
||||||
|
@ -1864,15 +1917,13 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "sha2"
|
name = "sha2"
|
||||||
version = "0.9.9"
|
version = "0.10.7"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800"
|
checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"block-buffer 0.9.0",
|
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"cpufeatures",
|
"cpufeatures",
|
||||||
"digest 0.9.0",
|
"digest 0.10.7",
|
||||||
"opaque-debug",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -1886,9 +1937,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "signature"
|
name = "signature"
|
||||||
version = "1.6.4"
|
version = "2.1.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c"
|
checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "slab"
|
name = "slab"
|
||||||
|
@ -1931,6 +1982,16 @@ dependencies = [
|
||||||
"winapi",
|
"winapi",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "spki"
|
||||||
|
version = "0.7.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a"
|
||||||
|
dependencies = [
|
||||||
|
"base64ct",
|
||||||
|
"der",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "statistical"
|
name = "statistical"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
|
@ -2428,9 +2489,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "zeroize"
|
name = "zeroize"
|
||||||
version = "1.3.0"
|
version = "1.6.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4756f7db3f7b5574938c3eb1c117038b8e07f95ee6718c0efad4ac21508f1efd"
|
checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"zeroize_derive",
|
"zeroize_derive",
|
||||||
]
|
]
|
||||||
|
@ -2446,6 +2507,19 @@ dependencies = [
|
||||||
"syn",
|
"syn",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "zkp"
|
||||||
|
version = "0.7.0"
|
||||||
|
source = "git+ssh://git@gitlab.torproject.org/onyinyang/test-zkp.git#35a142695699bb01adef1d02860d41f3924deed8"
|
||||||
|
dependencies = [
|
||||||
|
"curve25519-dalek",
|
||||||
|
"merlin 3.0.0",
|
||||||
|
"rand 0.8.5",
|
||||||
|
"serde",
|
||||||
|
"serde_derive",
|
||||||
|
"thiserror",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "zkp"
|
name = "zkp"
|
||||||
version = "0.8.0"
|
version = "0.8.0"
|
||||||
|
@ -2453,7 +2527,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "5cf6dceea8522c0ade5abe68c1ca747e80b88adce2cd6a070e95f102037f331f"
|
checksum = "5cf6dceea8522c0ade5abe68c1ca747e80b88adce2cd6a070e95f102037f331f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"curve25519-dalek-ng",
|
"curve25519-dalek-ng",
|
||||||
"merlin",
|
"merlin 2.0.1",
|
||||||
"rand 0.7.3",
|
"rand 0.7.3",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_derive",
|
"serde_derive",
|
||||||
|
|
|
@ -22,7 +22,7 @@ rand = "0.8.5"
|
||||||
reqwest = { version = "0.11", features = ["json", "stream"]}
|
reqwest = { version = "0.11", features = ["json", "stream"]}
|
||||||
serde = { version = "1.0", features = ["derive", "rc"] }
|
serde = { version = "1.0", features = ["derive", "rc"] }
|
||||||
serde_with = "3.4.0"
|
serde_with = "3.4.0"
|
||||||
zkp = "0.8.0"
|
zkp = { git = "ssh://git@gitlab.torproject.org/onyinyang/test-zkp.git" }
|
||||||
|
|
||||||
lox-library = { path = "../lox-library", version = "0.1.0"}
|
lox-library = { path = "../lox-library", version = "0.1.0"}
|
||||||
lox_utils = { path = "../lox-utils", version = "0.1.0"}
|
lox_utils = { path = "../lox-utils", version = "0.1.0"}
|
||||||
|
|
|
@ -9,16 +9,16 @@ description = "Main Lox library with protocols and functions that that make up L
|
||||||
keywords = ["tor", "lox", "bridges"]
|
keywords = ["tor", "lox", "bridges"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
curve25519-dalek = { package = "curve25519-dalek-ng", version = "3", default-features = false, features = ["serde", "std"] }
|
curve25519-dalek = { version = "4", default-features = false, features = ["serde", "rand_core", "digest"] }
|
||||||
ed25519-dalek = { version = "1", features = ["serde"] }
|
ed25519-dalek = { version = "2", features = ["serde", "rand_core"] }
|
||||||
# zkp = { version = "0.8", features = ["debug-transcript"] }
|
# zkp = { version = "0.8", features = ["debug-transcript"] }
|
||||||
zkp = "0.8"
|
#zkp = "0.8"
|
||||||
bincode = "1"
|
bincode = "1"
|
||||||
chrono = "0.4"
|
chrono = "0.4"
|
||||||
rand = "0.7"
|
rand = { version = "0.8", features = ["std_rng"]}
|
||||||
serde = "1.0.189"
|
serde = "1.0.189"
|
||||||
serde_with = {version = "3.4.0", features = ["json"]}
|
serde_with = {version = "3.4.0", features = ["json"]}
|
||||||
sha2 = "0.9"
|
sha2 = "0.10"
|
||||||
statistical = "1.0.0"
|
statistical = "1.0.0"
|
||||||
lazy_static = "1"
|
lazy_static = "1"
|
||||||
hex_fmt = "0.3"
|
hex_fmt = "0.3"
|
||||||
|
@ -27,10 +27,11 @@ base64 = "0.21"
|
||||||
time = "0.3.29"
|
time = "0.3.29"
|
||||||
subtle = "2.5"
|
subtle = "2.5"
|
||||||
thiserror = "1.0.49"
|
thiserror = "1.0.49"
|
||||||
|
zkp = { git = "ssh://git@gitlab.torproject.org/onyinyang/test-zkp.git" }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["u64_backend"]
|
#default = ["u64_backend"]
|
||||||
u32_backend = ["curve25519-dalek/u32_backend"]
|
#u32_backend = ["curve25519-dalek/u32_backend"]
|
||||||
u64_backend = ["curve25519-dalek/u64_backend"]
|
#u64_backend = ["curve25519-dalek/u64_backend"]
|
||||||
simd_backend = ["curve25519-dalek/simd_backend"]
|
#simd_backend = ["curve25519-dalek/simd_backend"]
|
||||||
fast = []
|
fast = []
|
||||||
|
|
|
@ -150,8 +150,12 @@ impl BridgeLine {
|
||||||
let date = u32::from_le_bytes(data[pos..pos + 4].try_into().unwrap());
|
let date = u32::from_le_bytes(data[pos..pos + 4].try_into().unwrap());
|
||||||
let (optP, optQ) = if date > 0 {
|
let (optP, optQ) = if date > 0 {
|
||||||
(
|
(
|
||||||
CompressedRistretto::from_slice(&data[pos + 4..pos + 36]).decompress(),
|
CompressedRistretto::from_slice(&data[pos + 4..pos + 36])
|
||||||
CompressedRistretto::from_slice(&data[pos + 36..]).decompress(),
|
.expect("Unable to extract P from bucket")
|
||||||
|
.decompress(),
|
||||||
|
CompressedRistretto::from_slice(&data[pos + 36..])
|
||||||
|
.expect("Unable to extract Q from bucket")
|
||||||
|
.decompress(),
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
(None, None)
|
(None, None)
|
||||||
|
|
|
@ -36,7 +36,7 @@ use rand::Rng;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::convert::{TryFrom, TryInto};
|
use std::convert::{TryFrom, TryInto};
|
||||||
|
|
||||||
use ed25519_dalek::{Keypair, PublicKey, Signature, SignatureError, Signer, Verifier};
|
use ed25519_dalek::{Signature, SignatureError, Signer, SigningKey, Verifier, VerifyingKey};
|
||||||
use subtle::ConstantTimeEq;
|
use subtle::ConstantTimeEq;
|
||||||
|
|
||||||
use std::collections::HashSet;
|
use std::collections::HashSet;
|
||||||
|
@ -57,7 +57,7 @@ lazy_static! {
|
||||||
pub static ref CMZ_B: RistrettoPoint = dalek_constants::RISTRETTO_BASEPOINT_POINT;
|
pub static ref CMZ_B: RistrettoPoint = dalek_constants::RISTRETTO_BASEPOINT_POINT;
|
||||||
pub static ref CMZ_A_TABLE: RistrettoBasepointTable = RistrettoBasepointTable::create(&CMZ_A);
|
pub static ref CMZ_A_TABLE: RistrettoBasepointTable = RistrettoBasepointTable::create(&CMZ_A);
|
||||||
pub static ref CMZ_B_TABLE: RistrettoBasepointTable =
|
pub static ref CMZ_B_TABLE: RistrettoBasepointTable =
|
||||||
dalek_constants::RISTRETTO_BASEPOINT_TABLE;
|
dalek_constants::RISTRETTO_BASEPOINT_TABLE.clone();
|
||||||
}
|
}
|
||||||
|
|
||||||
// EXPIRY_DATE is set to EXPIRY_DATE days for open-entry and blocked buckets in order to match
|
// EXPIRY_DATE is set to EXPIRY_DATE days for open-entry and blocked buckets in order to match
|
||||||
|
@ -130,9 +130,9 @@ pub const OPENINV_K: u32 = 10;
|
||||||
#[derive(Debug, Serialize, Deserialize)]
|
#[derive(Debug, Serialize, Deserialize)]
|
||||||
pub struct BridgeDb {
|
pub struct BridgeDb {
|
||||||
/// The keypair for signing open invitations
|
/// The keypair for signing open invitations
|
||||||
keypair: Keypair,
|
keypair: SigningKey,
|
||||||
/// The public key for verifying open invitations
|
/// The public key for verifying open invitations
|
||||||
pub pubkey: PublicKey,
|
pub pubkey: VerifyingKey,
|
||||||
/// The set of open-invitation buckets
|
/// The set of open-invitation buckets
|
||||||
openinv_buckets: HashSet<u32>,
|
openinv_buckets: HashSet<u32>,
|
||||||
distributed_buckets: Vec<u32>,
|
distributed_buckets: Vec<u32>,
|
||||||
|
@ -152,8 +152,8 @@ impl BridgeDb {
|
||||||
/// Create the BridgeDb.
|
/// Create the BridgeDb.
|
||||||
pub fn new() -> Self {
|
pub fn new() -> Self {
|
||||||
let mut csprng = OsRng {};
|
let mut csprng = OsRng {};
|
||||||
let keypair = Keypair::generate(&mut csprng);
|
let keypair = SigningKey::generate(&mut csprng);
|
||||||
let pubkey = keypair.public;
|
let pubkey = keypair.verifying_key();
|
||||||
Self {
|
Self {
|
||||||
keypair,
|
keypair,
|
||||||
pubkey,
|
pubkey,
|
||||||
|
@ -203,7 +203,7 @@ impl BridgeDb {
|
||||||
// Choose a random bucket number (from the set of open
|
// Choose a random bucket number (from the set of open
|
||||||
// invitation buckets) and serialize it
|
// invitation buckets) and serialize it
|
||||||
let openinv_vec: Vec<&u32> = self.openinv_buckets.iter().collect();
|
let openinv_vec: Vec<&u32> = self.openinv_buckets.iter().collect();
|
||||||
bucket_num = *openinv_vec[rng.gen_range(0, openinv_vec.len())];
|
bucket_num = *openinv_vec[rng.gen_range(0..openinv_vec.len())];
|
||||||
self.mark_distributed(bucket_num);
|
self.mark_distributed(bucket_num);
|
||||||
self.remove_openinv(&bucket_num);
|
self.remove_openinv(&bucket_num);
|
||||||
self.current_k = 1;
|
self.current_k = 1;
|
||||||
|
@ -221,7 +221,7 @@ impl BridgeDb {
|
||||||
/// before.
|
/// before.
|
||||||
pub fn verify(
|
pub fn verify(
|
||||||
invitation: [u8; OPENINV_LENGTH],
|
invitation: [u8; OPENINV_LENGTH],
|
||||||
pubkey: PublicKey,
|
pubkey: VerifyingKey,
|
||||||
) -> Result<(Scalar, u32), SignatureError> {
|
) -> Result<(Scalar, u32), SignatureError> {
|
||||||
// Pull out the signature and verify it
|
// Pull out the signature and verify it
|
||||||
let sig = Signature::try_from(&invitation[(32 + 4)..])?;
|
let sig = Signature::try_from(&invitation[(32 + 4)..])?;
|
||||||
|
@ -229,11 +229,13 @@ impl BridgeDb {
|
||||||
// The signature passed. Pull out the bucket number and then
|
// The signature passed. Pull out the bucket number and then
|
||||||
// the invitation id
|
// the invitation id
|
||||||
let bucket = u32::from_le_bytes(invitation[32..(32 + 4)].try_into().unwrap());
|
let bucket = u32::from_le_bytes(invitation[32..(32 + 4)].try_into().unwrap());
|
||||||
match Scalar::from_canonical_bytes(invitation[0..32].try_into().unwrap()) {
|
let s = Scalar::from_canonical_bytes(invitation[0..32].try_into().unwrap());
|
||||||
|
if s.is_some().into() {
|
||||||
|
return Ok((s.unwrap(), bucket));
|
||||||
|
} else {
|
||||||
// It should never happen that there's a valid signature on
|
// It should never happen that there's a valid signature on
|
||||||
// an invalid serialization of a Scalar, but check anyway.
|
// an invalid serialization of a Scalar, but check anyway.
|
||||||
None => Err(SignatureError::new()),
|
return Err(SignatureError::new());
|
||||||
Some(s) => Ok((s, bucket)),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -269,7 +271,7 @@ pub struct BridgeAuth {
|
||||||
pub invitation_pub: IssuerPubKey,
|
pub invitation_pub: IssuerPubKey,
|
||||||
|
|
||||||
/// The public key of the BridgeDb issuing open invitations
|
/// The public key of the BridgeDb issuing open invitations
|
||||||
pub bridgedb_pub: PublicKey,
|
pub bridgedb_pub: VerifyingKey,
|
||||||
|
|
||||||
/// The bridge table
|
/// The bridge table
|
||||||
pub bridge_table: BridgeTable,
|
pub bridge_table: BridgeTable,
|
||||||
|
@ -294,7 +296,7 @@ pub struct BridgeAuth {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl BridgeAuth {
|
impl BridgeAuth {
|
||||||
pub fn new(bridgedb_pub: PublicKey) -> Self {
|
pub fn new(bridgedb_pub: VerifyingKey) -> Self {
|
||||||
// Create the private and public keys for each of the types of
|
// Create the private and public keys for each of the types of
|
||||||
// credential, each with the appropriate number of attributes
|
// credential, each with the appropriate number of attributes
|
||||||
let lox_priv = IssuerPrivKey::new(6);
|
let lox_priv = IssuerPrivKey::new(6);
|
||||||
|
|
|
@ -249,8 +249,12 @@ pub fn decrypt_cred(
|
||||||
let mut to_bucket_bytes: [u8; 32] = [0; 32];
|
let mut to_bucket_bytes: [u8; 32] = [0; 32];
|
||||||
to_bucket_bytes.copy_from_slice(&plaintextbytes[..32]);
|
to_bucket_bytes.copy_from_slice(&plaintextbytes[..32]);
|
||||||
let to_bucket = Scalar::from_bytes_mod_order(to_bucket_bytes);
|
let to_bucket = Scalar::from_bytes_mod_order(to_bucket_bytes);
|
||||||
let P = CompressedRistretto::from_slice(&plaintextbytes[32..64]).decompress()?;
|
let P = CompressedRistretto::from_slice(&plaintextbytes[32..64])
|
||||||
let Q = CompressedRistretto::from_slice(&plaintextbytes[64..]).decompress()?;
|
.expect("Unable to extract P from bucket")
|
||||||
|
.decompress()?;
|
||||||
|
let Q = CompressedRistretto::from_slice(&plaintextbytes[64..])
|
||||||
|
.expect("Unable to extract Q from bucket")
|
||||||
|
.decompress()?;
|
||||||
|
|
||||||
Some(Migration {
|
Some(Migration {
|
||||||
P,
|
P,
|
||||||
|
|
|
@ -288,7 +288,7 @@ pub fn request(
|
||||||
&migration_cred.to_bucket * Btable + ebucket * D,
|
&migration_cred.to_bucket * Btable + ebucket * D,
|
||||||
);
|
);
|
||||||
let eblockages = Scalar::random(&mut rng);
|
let eblockages = Scalar::random(&mut rng);
|
||||||
let new_blockages = lox_cred.blockages + Scalar::one();
|
let new_blockages = lox_cred.blockages + Scalar::ONE;
|
||||||
let EncBlockages = (
|
let EncBlockages = (
|
||||||
&eblockages * Btable,
|
&eblockages * Btable,
|
||||||
&new_blockages * Btable + eblockages * D,
|
&new_blockages * Btable + eblockages * D,
|
||||||
|
|
|
@ -269,7 +269,7 @@ pub fn request(
|
||||||
|
|
||||||
// Ensure the credential can be correctly shown: it must be the case
|
// Ensure the credential can be correctly shown: it must be the case
|
||||||
// that invites_remaining not be 0
|
// that invites_remaining not be 0
|
||||||
if lox_cred.invites_remaining == Scalar::zero() {
|
if lox_cred.invites_remaining == Scalar::ZERO {
|
||||||
return Err(ProofError::VerificationFailure);
|
return Err(ProofError::VerificationFailure);
|
||||||
}
|
}
|
||||||
// The buckets in the Lox and Bucket Reachability credentials have
|
// The buckets in the Lox and Bucket Reachability credentials have
|
||||||
|
@ -286,7 +286,7 @@ pub fn request(
|
||||||
return Err(ProofError::VerificationFailure);
|
return Err(ProofError::VerificationFailure);
|
||||||
}
|
}
|
||||||
// The new invites_remaining
|
// The new invites_remaining
|
||||||
let new_invites_remaining = lox_cred.invites_remaining - Scalar::one();
|
let new_invites_remaining = lox_cred.invites_remaining - Scalar::ONE;
|
||||||
|
|
||||||
// Blind showing the Lox credential
|
// Blind showing the Lox credential
|
||||||
|
|
||||||
|
|
|
@ -168,7 +168,7 @@ pub fn request(
|
||||||
|
|
||||||
// This protocol only allows migrating from trust level 0 to trust
|
// This protocol only allows migrating from trust level 0 to trust
|
||||||
// level 1
|
// level 1
|
||||||
if lox_cred.trust_level != Scalar::zero() {
|
if lox_cred.trust_level != Scalar::ZERO {
|
||||||
return Err(ProofError::VerificationFailure);
|
return Err(ProofError::VerificationFailure);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -323,7 +323,7 @@ impl BridgeAuth {
|
||||||
}
|
}
|
||||||
|
|
||||||
// We only currently support migrating from trust level 0
|
// We only currently support migrating from trust level 0
|
||||||
if req.trust_level != Scalar::zero() {
|
if req.trust_level != Scalar::ZERO {
|
||||||
return Err(ProofError::VerificationFailure);
|
return Err(ProofError::VerificationFailure);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -387,7 +387,7 @@ impl BridgeAuth {
|
||||||
|
|
||||||
// Create the trust_level attrubute (Scalar), which will be
|
// Create the trust_level attrubute (Scalar), which will be
|
||||||
// level 1
|
// level 1
|
||||||
let trust_level: Scalar = Scalar::one();
|
let trust_level: Scalar = Scalar::ONE;
|
||||||
|
|
||||||
// Create the level_since attribute (Scalar), which is today's
|
// Create the level_since attribute (Scalar), which is today's
|
||||||
// Julian date
|
// Julian date
|
||||||
|
@ -513,7 +513,7 @@ pub fn handle_response(
|
||||||
Xlevel: &lox_pub.X[3].compress(),
|
Xlevel: &lox_pub.X[3].compress(),
|
||||||
Xsince: &lox_pub.X[4].compress(),
|
Xsince: &lox_pub.X[4].compress(),
|
||||||
// The new trust level is 1
|
// The new trust level is 1
|
||||||
Plevel: &(Scalar::one() * resp.P).compress(),
|
Plevel: &(Scalar::ONE * resp.P).compress(),
|
||||||
Psince: &(resp.level_since * resp.P).compress(),
|
Psince: &(resp.level_since * resp.P).compress(),
|
||||||
TId: &resp.TId.compress(),
|
TId: &resp.TId.compress(),
|
||||||
TBucket: &resp.TBucket.compress(),
|
TBucket: &resp.TBucket.compress(),
|
||||||
|
@ -533,9 +533,9 @@ pub fn handle_response(
|
||||||
Q,
|
Q,
|
||||||
id,
|
id,
|
||||||
bucket: state.to_bucket,
|
bucket: state.to_bucket,
|
||||||
trust_level: Scalar::one(),
|
trust_level: Scalar::ONE,
|
||||||
level_since: resp.level_since,
|
level_since: resp.level_since,
|
||||||
invites_remaining: Scalar::zero(),
|
invites_remaining: Scalar::ZERO,
|
||||||
blockages: Scalar::zero(),
|
blockages: Scalar::ZERO,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -324,10 +324,10 @@ pub fn handle_response(
|
||||||
Q,
|
Q,
|
||||||
id,
|
id,
|
||||||
bucket: resp.bucket,
|
bucket: resp.bucket,
|
||||||
trust_level: Scalar::zero(),
|
trust_level: Scalar::ZERO,
|
||||||
level_since: resp.level_since,
|
level_since: resp.level_since,
|
||||||
invites_remaining: Scalar::zero(),
|
invites_remaining: Scalar::ZERO,
|
||||||
blockages: Scalar::zero(),
|
blockages: Scalar::ZERO,
|
||||||
},
|
},
|
||||||
resp.bridge_line,
|
resp.bridge_line,
|
||||||
))
|
))
|
||||||
|
|
|
@ -458,7 +458,7 @@ impl BridgeAuth {
|
||||||
let EncId = (req.EncIdClient.0, req.EncIdClient.1 + &id_server * Btable);
|
let EncId = (req.EncIdClient.0, req.EncIdClient.1 + &id_server * Btable);
|
||||||
|
|
||||||
// The trust level for invitees is always 1
|
// The trust level for invitees is always 1
|
||||||
let level = Scalar::one();
|
let level = Scalar::ONE;
|
||||||
|
|
||||||
// The invites remaining for invitees is always 0 (as
|
// The invites remaining for invitees is always 0 (as
|
||||||
// appropriate for trust level 1), so we don't need to actually
|
// appropriate for trust level 1), so we don't need to actually
|
||||||
|
@ -611,9 +611,9 @@ pub fn handle_response(
|
||||||
Q,
|
Q,
|
||||||
id,
|
id,
|
||||||
bucket: state.bucket,
|
bucket: state.bucket,
|
||||||
trust_level: Scalar::one(),
|
trust_level: Scalar::ONE,
|
||||||
level_since: resp.level_since,
|
level_since: resp.level_since,
|
||||||
invites_remaining: Scalar::zero(),
|
invites_remaining: Scalar::ZERO,
|
||||||
blockages: state.blockages,
|
blockages: state.blockages,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -875,7 +875,7 @@ fn block_bridges(th: &mut TestHarness, to_block: usize) {
|
||||||
let mut rng = rand::thread_rng();
|
let mut rng = rand::thread_rng();
|
||||||
|
|
||||||
while block_index.len() < to_block {
|
while block_index.len() < to_block {
|
||||||
let rand_num = rng.gen_range(1, blockable_range);
|
let rand_num = rng.gen_range(1..blockable_range);
|
||||||
if !th.bdb.openinv_buckets.contains(&(rand_num as u32))
|
if !th.bdb.openinv_buckets.contains(&(rand_num as u32))
|
||||||
&& !th.bdb.distributed_buckets.contains(&(rand_num as u32))
|
&& !th.bdb.distributed_buckets.contains(&(rand_num as u32))
|
||||||
&& !block_index.contains(&rand_num)
|
&& !block_index.contains(&rand_num)
|
||||||
|
@ -1045,7 +1045,7 @@ fn test_bridge_replace() {
|
||||||
let table_size = th.ba.bridge_table.buckets.len();
|
let table_size = th.ba.bridge_table.buckets.len();
|
||||||
let mut num = 100000;
|
let mut num = 100000;
|
||||||
while !th.ba.bridge_table.buckets.contains_key(&num) {
|
while !th.ba.bridge_table.buckets.contains_key(&num) {
|
||||||
num = rand::thread_rng().gen_range(0, th.ba.bridge_table.counter);
|
num = rand::thread_rng().gen_range(0..th.ba.bridge_table.counter);
|
||||||
}
|
}
|
||||||
let replaceable_bucket = *th.ba.bridge_table.buckets.get(&num).unwrap();
|
let replaceable_bucket = *th.ba.bridge_table.buckets.get(&num).unwrap();
|
||||||
let replacement_bridge = &replaceable_bucket[0];
|
let replacement_bridge = &replaceable_bucket[0];
|
||||||
|
|
Loading…
Reference in New Issue