Kevin Lewi
3fe6bbb80f
Updating to version 08 ( #271 )
2022-04-17 16:23:31 -07:00
daxpedda
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
Kevin Lewi
f952a26e29
Publishing v2.0.0-pre.1 ( #270 )
2022-03-15 19:51:40 -07:00
daxpedda
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
daxpedda
47a26a19c5
Format ( #257 )
...
* Add Rustfmt
* Add Taplo
2022-01-05 21:19:02 -08:00
daxpedda
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
daxpedda
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 Lewi
adbd50f523
Updating to dual-license ( #252 )
2021-12-03 14:38:11 -08:00
Kevin Lewi
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 Lewi
65a0c2f98d
General cleanups and reorganizing code ( #236 )
2021-09-25 16:36:00 -07:00
Aidan Gilmore
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
Kevin Lewi
390db51910
Updating test vectors based on latest spec changes ( #233 )
2021-08-26 03:07:59 -07:00
Kevin Lewi
aee4b5d50e
Simplifying error handling ( #232 )
2021-08-22 12:28:19 -07:00
daxpedda
6c7840514d
Fix no_std support ( #229 )
2021-08-16 20:11:53 -07:00
daxpedda and Kevin Lewi
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
daxpedda
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
daxpedda
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
dAxpeDDa
a5b9330b63
Improve types and documentation
2021-07-30 14:45:27 -07:00
dAxpeDDa
49dc5b9050
Implement auth_key test
2021-07-30 14:45:27 -07:00
Kevin Lewi
e6b5a5dcf6
Adding i2osp error checking condition
2021-07-08 19:38:30 -07:00
daxpedda
52d68d6f77
Constraint Scalar with Copy
2021-07-08 18:55:53 -07:00
daxpedda
dd97a81641
Generic PublicKey and PrivateKey
2021-07-08 18:55:53 -07:00
daxpedda
eb59676a94
Implement common traits
2021-06-22 20:46:34 -07:00
daxpedda
ed086c9528
Update dependencies
2021-06-22 14:35:14 -07:00
Kevin 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 Lewi
f0c13945d1
Adding client enumeration mitigations ( #153 )
2021-06-21 01:29:39 -07:00
Valentin Tolmer
210e0e99df
Enforce public vs private keys via types
2021-06-15 14:47:35 -07:00
Kevin Lewi
51b14f34e0
Fixing some clippy errors and CI
2021-06-12 23:24:27 -07:00
Kevin Lewi
8bc5e7dc02
Add zeroize on drop for remaining intermediate API states and tests
2021-06-04 16:37:54 -07:00
Kevin Lewi
fa0fb48654
Fixing test vector bug with envelope ciphertext serialization and updating VOPRF ( #145 )
2021-02-21 18:44:36 -08:00
Kevin Lewi
4da6bbce0c
Fixing key sizes and removing serialization ( #144 )
2021-02-20 03:51:04 -08:00
Kevin Lewi
782eeb7090
Converting to_bytes and try_from to serialize() and deserialize() ( #138 )
2021-02-17 02:47:00 -08:00
Kevin Lewi
e694a88ef9
Exporting rand ( #137 )
2021-02-11 18:10:48 -08:00
Kevin Lewi
e35410ab95
Fixing envelope mode inconsistency and matching against latest test vectors ( #130 )
2021-02-05 13:17:02 -08:00
Kevin Lewi
099f887530
Applying envelope simplified construction and km3 mac changes ( #128 )
2021-02-04 15:57:06 -08:00
Kevin Lewi
9d3963f98e
Addressing various TODOs and minor cleanups ( #127 )
2021-02-02 12:12:20 -08:00
Kevin Lewi
6eeeb0db28
Fixing test vectors and use of SHA512 ( #120 )
2021-01-26 09:27:30 -08:00
Kevin Lewi
ba53089199
Fixing construct_aad() bug ( #112 )
2021-01-07 17:44:27 -08:00
Kevin Lewi
9f6b32a5ea
Updating envelope structure to support two fixed modes ( #108 )
...
* Moving id_u and id_s from ClientLoginStartParameters to ClientLoginFinishParameters
* Updating envelope format to support two fixed modes
2021-01-04 14:27:20 -08:00
Kevin Lewi
51b3781e5c
Updating AKE message format ( #85 )
2020-11-16 11:49:27 -08:00
Kevin Lewi
0fc3448777
Updating opaque interfaces to include ids from the internet draft ( #56 )
2020-11-02 20:15:06 -05:00
François Garillot
9c06c98ad6
Introduce enum structs to replicate TLS message format
...
This PR favors native coercions of enums to numerical types to help ser/de operations.
Small rearrangement of the serialization module.
2020-11-02 20:15:02 -05:00
François Garillot
344e8ad8d1
Updating serialization for RegisterFirstMessage ( #35 )
2020-11-02 20:14:47 -05:00
Kevin Lewi
195a698ad8
Fix omission of nonce in hmac computation for envelope ( #44 )
2020-09-01 11:23:00 -07:00
Kevin Lewi
c2edb2d95e
Adding a hash type to CipherSuite ( #24 )
2020-07-27 15:25:04 -07:00
François Garillot
7b11da3bd6
Remove 2x superfluous to_vec
2020-07-23 13:45:46 -04:00
François Garillot
41cd80ccb5
Make oprf::generate_oprf1 generic in the Digest, as long as it matches the hash-to-curve intake of the group
...
We used to have three problems:
- overuse of the <Sha256 as Digest>::OutputSize, which is just, well, U32. Sometimes used as a parameter (as in generate_oprf1), sometimes as a constant (as in generate_oprf3).
- the `hash_to_curve` operation for `RistrettoPoint` which requires 64 bits of input entropy, is fed 64 bits of which the last 32 are zero,
- the `hash_to_curve` operation for `Curve25519Point` which requires 32 bits of input entropy, is fed 64 bits of which the last 32 are discarded,
This corrects all three and uses U32 where the size of the digest is not meant to be a constraint.
Addresses #15 partially.
2020-07-03 18:28:34 -04:00
Kevin Lewi
6d02c72aae
Updating to draft-krawczyk-cfrg-opaque-06, reworking envelope construction and removing AEAD ( #14 )
...
Updating to draft-krawczyk-cfrg-opaque-06, reworking envelope construction and removing AEAD
2020-07-02 12:24:53 -07:00