P256 implementation (#213)

* Initial P256 implementation

* Add P256 VOPRF test vectors

* Fix implementation

* Forgot `Cargo.toml` and CI

* Fix MSRV

* Fix MSRV tests

* Remove accidental leftovers

* Document constants

* Use included constant time checks

* Add P-256 VOPRF test vector checks

* Remove unnecessary bound on `CipherSuite::Group`

* P-256 improvement and fixes

* Add OPAQUE test vectors for P-256

* Remove fixed key size for 3DH

* Hide P-256 test vectors behind feature flag

* Split `Group` into modules

* Fix `hash_to_scalar`

* Point to source

* Move constants to `once_cell`

Co-authored-by: Kevin Lewi <[email protected]>
This commit is contained in:
daxpedda
2021-07-30 16:02:02 -07:00
committed by GitHub
co-authored by Kevin Lewi
parent 2373ca8680
commit e491c1b533
11 changed files with 1074 additions and 167 deletions
+6
View File
@@ -12,6 +12,7 @@ readme = "README.md"
[features]
default = ["u64_backend", "serialize"]
slow-hash = ["argon2"]
p256 = ["num-bigint", "num-integer", "num-traits", "once_cell", "p256_"]
bench = []
u64_backend = ["curve25519-dalek/u64_backend"]
u32_backend = ["curve25519-dalek/u32_backend"]
@@ -28,6 +29,11 @@ generic-array = "0.14"
generic-bytes = { version = "0.1" }
hkdf = "0.11"
hmac = "0.11"
num-bigint = { version = "0.4", optional = true }
num-integer = { version = "0.1", optional = true }
num-traits = { version = "0.2", optional = true }
once_cell = { version = "1", optional = true }
p256_ = { package = "p256", version = "0.9", optional = true }
rand = "0.8"
serde = { version = "1", features = ["derive"], optional = true }
subtle = { version = "2.3", default-features = false }