Commit Graph
26 Commits
Author SHA1 Message Date
daxpeddaandGitHub bebd2c605b SIGMA-I Key Exchange (#378)
* Move `KeGroup` to `KeyExchange::Group`

- Introduce `KeyExchange::Hash`, which separates the OPRF hash from the one used in `KeyExchange`.
- Remove `De/Serialize` requirement on key exchange messages and states, which forced a lot of where bounds on downstream users.
- Rename `KeGroup` to `Group`.
- Replace `D` generic for hash with `H`.

* Use `voprf::derive_key()` directly

* Implement SIGMA-I key exchange

* Improve `KeyExchange` for SIGMA-I and Ed25519

* Implement EdDSA

* Un-qualify some method calls

* SIGMA-I: only include client identity in client mac

* SIGMA-I: include server mac in client signature

* Expose key exchange types in `crate` & move modules

* Implement Ed25519ph

* Document `ed25519` crate feature

* Remove `ristretto255-voprf` crate feature

* Adjust CI crate feature testing

* Fix Rustdoc

* Remove unnecessary generic parameters from SIGMA-I

* Properly mark to-do's with TODO

* Assorted fixes

* SIGMA-I: include context in signature

* SIGMA-I: include identifiers in signature

* Merge `ServerLoginStart/FinishParameters`

* Re-export more necessary types

* More carefully expose types

* Add ECDSA test

* SIGMA-I: share context hashing

* De-duplicate client static public key storage

* Hide `KeyExchange` better

* Use the correct hash in the root documentation

* Bump `derive-where`

* Format documentation examples a bit further

* Add remote OPRF seed documentation

* Rename `deserialize_key_pair` to `deserialize_take_key_pair`

* Add more key tests

* Remove `SharedSecret` trait

* SIGMA-I refactor message API

* Share more implementation between 3DH and SIGMA-I

* Remove unnecessary zero scalar check for Curve25519

* Use correct hash in test

* Add some more TODOs

* Exclude `tests` folder from Cargo publishing

* Enable missing dependencies

* Use right crate for testing Ed25519

* Remove unnecessary `Sized` constraints

* Remove unnecessary `ecdsa` crate features

* Move signature de/serialization to trait methods

* Nit: move import to appropriate location

* Add warning to SIGMA-I
2025-05-19 13:56:25 -07:00
Kevin LewiandGitHub a88373722e Updating dual-license language (#324) 2023-05-22 23:04:26 -07:00
daxpeddaandGitHub 5400128833 Update rustyline to v0.11 (#313) 2023-03-04 14:49:29 -08:00
daxpeddaandGitHub 1fbe25507e Bump voprf to v0.5.0-pre.2 (#304) 2023-02-03 16:45:52 -08:00
daxpeddaandGitHub a0cab10663 Update dependencies (#288)
* Fix Clippy

* Update dependencies
2022-12-10 21:30:05 -08:00
94fd3598d0 Argon2 Example (#282)
* add argon2 example to simple_login.rs

* rename Default to DefaultCipherSuite in examples to avoid conflicts with core::default::Default

* put the custom KSF example in the documentation

* add links in documentation

Co-authored-by: daxpedda <[email protected]>

* remove no_run on argon2 doctest

* hide argon2 cfg attribute in docs

Co-authored-by: daxpedda <[email protected]>

Co-authored-by: daxpedda <[email protected]>
2022-07-24 20:26:48 -07:00
daxpeddaandGitHub 384207acbb General Improvements (#268)
* Move `elliptic-curve` implementation to points to allow `Zeroize`

* Simplify `Ristretto255::random_scalar` implementation

* Fix `Ristretto255` deserialization

* Remove unnecessary check in `Ristretto255::random_scalar`

* Base `X25519` implementation on `curve25519-dalek`

* Constrain public and secret key to `Copy`

* Replace manual `ZeroizeOnDrop` implementation with `derive`

* Update dependencies

* Add `warn(unused_crate_dependencies)`

* Sync crate feature naming with `voprf`

* Remove unnecessary dependency crate features

* Never produce a zero scalar

* Rename `OprfGroup` to `OprfCs`

* Rename `TripleDH` to `TripleDh`

* Remove `slow-hash` crate feature

* Rename `NoOpHash` to `Identity`

* Rename `SlowHash` to `Ksf`

* Move `KeyExchange` type definitions down

* Deserialize secret and public keys from slices

* Remove `PrivateKey::from_bytes`

* Rename `From/ToBytes` to `De/Serialize`

* Re-export `serde_` as `serde`

* Custom `De/Serialize` implementation for keys

* Remove custom `De/Serialize` implementation

* Run Taplo v0.6
2022-04-01 16:10:00 -07:00
daxpeddaandGitHub b2f10858e0 Group revamp (#261)
* Revamp `KeGroup` trait

* Update dependencies

* Fix `hash_to_scalar` using `OprfGroup` instead of `KeGroup`

* Relax constraints on associated types of `KeGroup`

* Improve `KeGroup` implementation on `Curve`

* Improve `KeyExchange` trait

* Fix new Clippy 1.59 warnings
2022-02-24 22:13:22 -08:00
daxpeddaandGitHub 47a26a19c5 Format (#257)
* Add Rustfmt

* Add Taplo
2022-01-05 21:19:02 -08:00
daxpeddaandGitHub 36f0a55518 Voprf update (#255)
* Update to latest voprf

* Upgrade to Rust edition 2021

* Fix Clippy

* Remove all allocations

* Remove unnecessary `allow(type_alias_bounds)`

* Make all serialization infallible

* Remove self-dependency

* Update rustyline
2022-01-05 15:10:57 -08:00
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 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
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
daxpeddaandKevin Lewi 3d01a605df Move PrivateKey from CipherSuite to ServerSetup 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 1572ff0104 Adding support for "internal mode" and fake credential response + test vectors (#155)
* Adding support for internal and external mode
2021-06-21 01:29:39 -07:00
Kevin LewiandKevin Lewi f0c13945d1 Adding client enumeration mitigations (#153) 2021-06-21 01:29:39 -07:00
Kevin LewiandGitHub 782eeb7090 Converting to_bytes and try_from to serialize() and deserialize() (#138) 2021-02-17 02:47:00 -08:00
Kevin LewiandGitHub e694a88ef9 Exporting rand (#137) 2021-02-11 18:10:48 -08:00
Kevin LewiandGitHub 160ac47ffa Renaming shared secret to session key (#133) 2021-02-08 11:19:06 -08:00
Kevin LewiandGitHub 9d3963f98e Addressing various TODOs and minor cleanups (#127) 2021-02-02 12:12:20 -08:00
Kevin LewiandGitHub d6ace87c21 Fixing examples to use Sha512 with Ristretto instead of Sha256 (#122) 2021-01-26 13:17:15 -08:00
Kevin LewiandGitHub 6dc1c8b212 Turning KeyPair into a struct (#119) 2021-01-25 13:20:36 -08:00
Kevin LewiandGitHub e421aaad07 Fixing expect script for digital locker example (#118) 2021-01-21 22:09:34 -08:00
Kevin LewiandGitHub 511d371c9a Adding digital locker example (#117) 2021-01-21 20:18:57 -08:00