Commit Graph
241 Commits
Author SHA1 Message Date
daxpeddaandGitHub 82e4436d39 General improvements (#250)
* Remove unnecessary constraints on hash

* Remove unnecessary `Result` on `KeyPair::generate_random`

* Fix de-serialization issue on `Ke1State`

* Fix rustfmt

* Remove allocations in `envelope`

* Run Clippy for tests and rustdoc lints too

* Fix `Debug` implementation

* Fix missing constraints on `ClientRegistration`

* Fix de-serialization

* Pin temporary dependency

* Update dependencies

* Replace macro with derive-where

* Remove unnecessary installation of Rust components

* Improve macro naming

* Implement `Copy`, `Debug`, `Ord` and `PartialOrd` for high-level items

* Add `rust-version` field to `Cargo.toml`

* Remove unnecessary allocations

* Fix MSRV

* Fix no_std

* Remove unnecessary allocations

* Remove unnecessary allocations

* Not importing items from voprf helps readability

* Fix rustdoc

* Remove unnecessary allocations

* Remove unnecessary allocations

* Replace `Vec` from `diffie_hellman` with `GenericArray`

* Remove unnecessary allocations

* Remove unnecessary allocations

* Remove `cfg(feature = bench)` guard for `missing_docs`

* Fix documentation

* Remove all remaining allocations from `KeyExchange`

* Improve type-safety

* Remove all remaining allocations in `keypair`

* Remove last remaining allocations except `NonVerifiableClient` input

* Remove base64 encoding in Serde implementation

* Remove unnecessary Serde `alloc` feature

* Make curve25519-dalek optional

* Rename `serialize` crate feature to `serde`

* Switch `KeGroup` implementations to higher-level libraries

- Fixes missing clamping in X25519
- X25519 is now a separate crate feature

* Fix typo
2022-01-03 15:50:40 -08:00
Kevin LewiandGitHub d59d0b775b Adding audit report reference to README + licenses (#253) 2021-12-13 15:29:06 -08:00
Kevin LewiandGitHub adbd50f523 Updating to dual-license (#252) 2021-12-03 14:38:11 -08:00
Kevin LewiandGitHub 29b2ebef1b Using voprf as a dependency (#248)
* Using voprf as a dependency

* Adding back x25519 and KeGroup

* Addressing comments
2021-10-25 02:54:32 -07:00
Kevin LewiandGitHub f1f4184400 Add better parsing for RFC test vectors (#247) 2021-10-09 18:17:07 -07:00
77fbdb29f8 Constant time cmov (#241)
* Constant time `cmov`

* Adjust byte size

* Move from `to_signed_bytes_le` to `to_bytes_le`

* Add experimental p256 warning

* Remove redundant sign handling in `cmov`

* Remove unnecessary `Sub` implementation

* Improve note on missing constant-time implementations

* Move `inv0()` to `FieldElement`

* Fix Rust 1.51 compilation

* Remove unnecessary reference

Co-authored-by: Kevin Lewi <[email protected]>
2021-10-04 13:50:03 -07:00
daxpeddaandGitHub 328b07f217 P256 improvements (#244)
* Fix p256 `to_bytes`

* Remove unnecessary calls to `mod_floor`

* Port some improvements from VOPRF
2021-10-01 11:11:56 -07:00
Kevin LewiandGitHub 65a0c2f98d General cleanups and reorganizing code (#236) 2021-09-25 16:36:00 -07:00
daxpeddaandGitHub 11a93fe63e Fix is_square and is_zero (#240) 2021-09-25 12:13:06 -07:00
Aidan GilmoreandGitHub 8df79cb2b4 Remove Copy trait implementation from InnerEnvelopeMode (#237)
The Copy trait isn't allowed on types with destructors
2021-09-24 20:04:26 -07:00
d1dfee9a65 Add SlowHash configuration (#234)
* Add `SlowHash` configuration

* Use a reference

* Changing generic argument to be CipherSuite instead of SlowHash

Co-authored-by: Kevin Lewi <[email protected]>
2021-09-02 02:28:21 -07:00
Kevin LewiandGitHub 390db51910 Updating test vectors based on latest spec changes (#233) 2021-08-26 03:07:59 -07:00
Kevin LewiandGitHub aee4b5d50e Simplifying error handling (#232) 2021-08-22 12:28:19 -07:00
Kevin LewiandGitHub a99a934ead Changes related to renaming master branch to main (#231) 2021-08-18 13:57:24 -07:00
daxpeddaandGitHub 6c7840514d Fix no_std support (#229) 2021-08-16 20:11:53 -07:00
8a7bcf9097 no_std support (#225)
* No std implementation

* Run tests with std

* Adding wasm32-unknown-unknown target

Co-authored-by: Kevin Lewi <[email protected]>
2021-08-11 21:25:07 -07:00
daxpeddaandGitHub 88673d8e05 Separate AKE from OPRF take 2 (#222)
* Separate AKE from OPRF

Introduce X25519 implementation

* Rename `AkeGroup` to `KeGroup` and `Group` to `OprfGroup`

* Add documentation to "Overview"
2021-08-04 12:24:46 -07:00
daxpeddaandGitHub 10a38bc58b Merge GroupWithMapToCurve into Group (#219)
* Merge `GroupWithMapToCurve` into `Group`

* Remove `hash_to_curve`

* Ristretto improvements

* P-256 improvements
2021-08-01 17:48:56 -07:00
daxpeddaandGitHub a169d8a1c5 Fix small numbers (#221) 2021-07-31 16:40:59 -07:00
e491c1b533 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]>
2021-07-30 16:02:02 -07:00
2373ca8680 Increase MSRV to 1.51 (#217)
* Increase MSRV to 1.51

* Adding MSRV note

Co-authored-by: Kevin Lewi <[email protected]>
2021-07-30 15:36:57 -07:00
dAxpeDDaandKevin Lewi 42e06e0aff Fix MSRV 2021-07-30 14:45:27 -07:00
dAxpeDDaandKevin Lewi db4e07811e Implement oprf_key test 2021-07-30 14:45:27 -07:00
dAxpeDDaandKevin Lewi a5b9330b63 Improve types and documentation 2021-07-30 14:45:27 -07:00
dAxpeDDaandKevin Lewi 3f6b6d4afe Implement client_mac_key test 2021-07-30 14:45:27 -07:00
dAxpeDDaandKevin Lewi ec528eb4d9 Implement server_mac_key test 2021-07-30 14:45:27 -07:00
dAxpeDDaandKevin Lewi 4298deadff Implement handshake_secret test 2021-07-30 14:45:27 -07:00
dAxpeDDaandKevin Lewi 49dc5b9050 Implement auth_key test 2021-07-30 14:45:27 -07:00
dAxpeDDaandKevin Lewi dcaedc278c Fix randomized_pwd 2021-07-30 14:45:27 -07:00
dAxpeDDaandKevin Lewi 460e2aef1c Fix rustfmt 2021-07-30 14:45:27 -07:00
dAxpeDDaandKevin Lewi b90163a007 Add randomized_pwd tests 2021-07-30 14:45:27 -07:00
Kevin LewiandKevin Lewi 35886152ca Adding tilde to zeroize dep and minor doc adjustments 2021-07-23 15:23:10 -07:00
dAxpeDDaandKevin Lewi 1ec96e942b Remove unneeded derives 2021-07-23 15:23:10 -07:00
dAxpeDDaandKevin Lewi 68d0dd2988 Run rustfmt 2021-07-23 15:23:10 -07:00
dAxpeDDaandKevin Lewi b27b29e652 Add documentation for remote key 2021-07-23 15:23:10 -07:00
daxpeddaandKevin Lewi 7b1328b9b7 Add missing documentation 2021-07-23 15:23:10 -07:00
daxpeddaandKevin Lewi dedc814416 Add test 2021-07-23 15:23:10 -07:00
daxpeddaandKevin Lewi 77461b640d Add custom ServerSetup construction 2021-07-23 15:23:10 -07:00
daxpeddaandKevin Lewi 4ce61acc6e Implement custom error type 2021-07-23 15:23:10 -07:00
daxpeddaandKevin Lewi 17b9c49473 Remove breaking change 2021-07-23 15:23:10 -07:00
daxpeddaandKevin Lewi 3d01a605df Move PrivateKey from CipherSuite to ServerSetup 2021-07-23 15:23:10 -07:00
daxpeddaandKevin Lewi 124d64c9ca Fix 1.41 compilation 2021-07-23 15:23:10 -07:00
daxpeddaandKevin Lewi d61e2d0b5c Introduce PrivateKey associated type to CipherSuite 2021-07-23 15:23:10 -07:00
Kevin LewiandKevin Lewi 990acf67e3 Updating changelog for v0.5.1 2021-07-16 00:46:49 -07:00
Kevin LewiandKevin Lewi b4882f8810 Adding reflected value check on client side 2021-07-14 18:10:35 -07:00
Kevin LewiandKevin Lewi 8de2f37235 Updating VOPRF dependency 2021-07-12 15:16:08 -07:00
Kevin LewiandKevin Lewi e6b5a5dcf6 Adding i2osp error checking condition 2021-07-08 19:38:30 -07:00
Kevin LewiandKevin Lewi 6062bdb5cd Switch CI to using stable instead of nightly toolchain 2021-07-08 19:30:15 -07:00
daxpeddaandKevin Lewi e5db303dd1 Phantom removed 2021-07-08 18:55:53 -07:00
daxpeddaandKevin Lewi 2955bcf5ac Replace Vec in Key with GenericArray 2021-07-08 18:55:53 -07:00