Add OPAQUE implementation

This commit is contained in:
Valentin Tolmer
2021-06-08 22:23:46 +02:00
committed by nitnelave
parent d5f84cd588
commit 973fa40dd1
7 changed files with 425 additions and 9 deletions
+70
View File
@@ -271,6 +271,19 @@ dependencies = [
"subtle",
]
[[package]]
name = "curve25519-dalek"
version = "3.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "639891fde0dbea823fc3d798a0fdf9d2f9440a42d64a78ab3488b0ca025117b3"
dependencies = [
"byteorder",
"digest",
"rand_core 0.5.1",
"subtle",
"zeroize",
]
[[package]]
name = "digest"
version = "0.9.0"
@@ -280,6 +293,17 @@ dependencies = [
"generic-array",
]
[[package]]
name = "displaydoc"
version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "adc2ab4d5a16117f9029e9a6b5e4e79f4c67f6519bc134210d4d4a04ba31f41b"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "dotenv"
version = "0.15.0"
@@ -433,6 +457,15 @@ dependencies = [
"version_check",
]
[[package]]
name = "generic-bytes"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d6638d839bbd1cea640d8c5348dd82e0d545dbd364f3c2a251646eaf2ef0773b"
dependencies = [
"generic-array",
]
[[package]]
name = "getrandom"
version = "0.1.16"
@@ -451,8 +484,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753"
dependencies = [
"cfg-if 1.0.0",
"js-sys",
"libc",
"wasi 0.10.2+wasi-snapshot-preview1",
"wasm-bindgen",
]
[[package]]
@@ -551,6 +586,16 @@ version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
[[package]]
name = "hkdf"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "51ab2f639c231793c5f6114bdb9bbe50a7dbbfcd7c7c6bd8475dec2d991e964f"
dependencies = [
"digest",
"hmac",
]
[[package]]
name = "hmac"
version = "0.10.1"
@@ -699,8 +744,14 @@ name = "lldap_model"
version = "0.1.0"
dependencies = [
"chrono",
"curve25519-dalek",
"getrandom 0.2.3",
"opaque-ke",
"rand 0.8.4",
"serde",
"sha2",
"sqlx",
"thiserror",
]
[[package]]
@@ -916,6 +967,25 @@ version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5"
[[package]]
name = "opaque-ke"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4c5e93081243e35cb270a2812883dcba34121c8d4054f6869149f2c3f7db10e3"
dependencies = [
"curve25519-dalek",
"digest",
"displaydoc",
"generic-array",
"generic-bytes",
"hkdf",
"hmac",
"rand 0.8.4",
"subtle",
"thiserror",
"zeroize",
]
[[package]]
name = "openssl"
version = "0.10.35"
+4 -1
View File
@@ -9,7 +9,6 @@ anyhow = "1"
chrono = "*"
http = "0.2.4"
jwt = "0.13"
lldap_model = { path = "../model" }
serde = "1"
serde_json = "1"
wasm-bindgen = "0.2"
@@ -25,5 +24,9 @@ features = [
"console",
]
[dependencies.lldap_model]
path = "../model"
features = [ "opaque_client" ]
[lib]
crate-type = ["cdylib"]