Commit Graph
347 Commits
Author SHA1 Message Date
François Garillot 8885fe5aa1 Re-establish cargo check --all-targets
The bench in benches/oprf.rs requires a feature to have visibility over private members, and doesn't work without it.
`cargo check --all-targets` is the standard quick way to check code under build & test targets, but does not specify features.

This simply skips the `benches` when the `"bench"` feature it depends on is not activated.
2020-07-22 15:22:47 -04:00
François Garillot b0b9cd0ab2 Restructure GH tests, run on u64 & u32 2020-07-22 15:04:06 -04:00
François Garillot 4fda240a7d Pass the {curve, x}25519-dalek features through the build 2020-07-22 14:59:06 -04:00
François GarillotandGitHub 5a7b60bec7 Merge pull request #26 from huitseeker/basic-benches
Benchmarks for the OPRF
2020-07-22 14:38:34 -04:00
François Garillot 91137903c6 Add benchmarks for OPRF functions (under a bench feature) 2020-07-22 14:32:58 -04:00
François Garillot e93e8fd5a8 Make the group mod public 2020-07-22 11:58:00 -04:00
Kevin LewiandGitHub f8285c60ba Introducing a trait for key exchange (#20) 2020-07-13 15:23:29 -07:00
François GarillotandGitHub 2959290582 Merge pull request #22 from huitseeker/missing_docs
Activate #![deny(missing_docs)], #![deny(unsafe_code)]
2020-07-06 16:01:42 -04:00
François Garillot 69449cca3e Activate #![deny(missing_docs)], #![deny(unsafe_code)] 2020-07-06 15:40:35 -04:00
François GarillotandGitHub 988b9bae77 Merge pull request #21 from huitseeker/digest-on-group
Restructure password-hashing-to-the-curve as an extension trait of Group
2020-07-03 21:10:11 -04:00
François GarillotandKevinLewi 9d40aa7659 As a way to roll back the genericity, implement an extension trait of group for password-to-curve hashing,
This supersedes #18.

Co-authored-by: KevinLewi <[email protected]>
2020-07-03 21:05:18 -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
François GarillotandGitHub 45ea7b6e84 Merge pull request #19 from huitseeker/simplify_types
Straightforward cleanups
2020-07-03 17:37:28 -04:00
François Garillot 52429dd2fa fix a clone-on-copy-type 2020-07-03 17:30:33 -04:00
François Garillot bb9c365998 Rename Group::to_bytes() into Group::to_arr(),
This brings the `Group` and `SizedBytes` traits into some sort of name
coherence (they both return a GenericArray). This also uses
`&my_generic_array[..]` (i.e. the `Deref` impl) over
`my_generic_array.as_slice()`.
2020-07-03 17:30:32 -04:00
François Garillot 3e41f2441d mention issue for direct call into uniform_bytes in RistrattoPoint 2020-07-03 16:12:14 -04:00
François Garillot 59d997900e Simplify "<CS as CipherSuite>" where possible 2020-07-03 15:58:42 -04:00
Kevin LewiandGitHub 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
François GarillotandKevin Lewi 4a638b8a22 add deny check to CI 2020-06-29 15:52:30 -07:00
zer0x64andKevin Lewi 1a5e704cf6 updated CONTRIBUTING.md 2020-06-22 12:26:24 -07:00
François GarillotandGitHub d5e585db1d Merge pull request #12 from huitseeker/backports
Backports from the Key Exchange customization PR
2020-06-19 15:33:31 -04:00
François Garillot 642d5188f5 Run CI with all-features 2020-06-19 15:24:04 -04:00
François Garillot c9d467e368 Add (normal) macros showing how to generate SizedBytes to/from TryFrom + to_bytes
This is useful for getting serialization of the KEXState, KEXMessage formats without too much boilerplate

Add client_login, login_first_message roundtrip serialization tests
2020-06-19 15:23:21 -04:00
François Garillot 738b90188d add build badge 2020-06-19 15:23:04 -04:00
François Garillot 7a2d309263 Moves the keypair generation to an extension trait
This technical change lets us avoid polluting the code with derives of Debug.
2020-06-19 15:23:03 -04:00
François GarillotandGitHub f989330807 Merge pull request #9 from huitseeker/updates
Update digest & hash libraries to their latest versions
2020-06-16 09:27:23 -04:00
François Garillot 4f9b7fe86f Update digest & hashes libraries to their latest versions 2020-06-16 06:24:14 -07:00
Kevin LewiandGitHub aab8ff8e19 Merge pull request #8 from kevinlewi/bundle_api
Adding CipherSuite trait to handle bundling of underlying crypto primitives
2020-06-15 17:42:18 -07:00
Kevin Lewi 2cf6808665 Adding documentation to each component of CipherSuite 2020-06-15 16:40:46 -07:00
Kevin Lewi ab1b1d6209 Adding CipherSuite trait to handle bundling of underlying crypto primitives 2020-06-14 23:29:25 -07:00
Kevin Lewi 0cf13c2266 Adding CipherSuite trait to handle bundling of underlying crypto primitives 2020-06-14 23:25:31 -07:00
Kevin Lewi f030fca1cb index on bundle_api: 57e152b Adding password hashing functionality 2020-06-14 06:10:26 -07:00
François GarillotandGitHub 5cf29fba62 Merge pull request #6 from huitseeker/key_cleanup
Key cleanup: prove X25519KeyPair == SignalKeyPair, remove SignalKeyPair
2020-06-13 09:24:55 -04:00
François Garillot 3ae1c58d46 test DH as well 2020-06-13 09:07:57 -04:00
François Garillot e9fa474c58 Remove SignalKeyPair, rename all instances of SignalKeyPair to X25519KeyPair, pass all tests. 2020-06-13 09:07:55 -04:00
François Garillot e9add9fd7a add tests showing X25519KeyPair == SignalKeyPair 2020-06-13 09:07:53 -04:00
François Garillot b401cfc89c Added proptest strategy to generate a random keypair 2020-06-13 09:07:51 -04:00
François GarillotandGitHub 3a1aaab6cf Merge pull request #7 from huitseeker/Cleanup_CI
Make CI run on PRs as well
2020-06-13 08:49:53 -04:00
Kevin LewiandGitHub 5a374562d1 Merge pull request #2 from kevinlewi/add_pw_hash
Adding password hashing functionality
2020-06-12 18:32:33 -07:00
François Garillot cd46a42634 Have CI run more often 2020-06-12 18:49:32 -04:00
François Garillot ce1d97002c cleaner to_bytes() for a few structures 2020-06-12 18:38:14 -04:00
Kevin Lewi 80fc493a60 Adding slow-hash feature 2020-06-11 14:56:37 -07:00
Kevin LewiandGitHub 8362804946 Merge branch 'master' into add_pw_hash 2020-06-10 14:54:27 -07:00
Kevin LewiandGitHub 05fb76d5b7 Merge pull request #5 from kevinlewi/add_readme_precaution
Adding note on draft status in doc comments
2020-06-10 14:53:06 -07:00
Kevin Lewi af22bfa54f Adding note on draft status in doc comments 2020-06-09 15:13:42 -07:00
Kevin Lewi 57e152b028 Adding password hashing functionality 2020-06-08 21:02:01 -07:00
Kevin Lewi 88696763cc Initial commit
Rust CI / test + Clippy + rustfmt (push) Has been cancelled
v0.1.0
2020-06-05 09:35:14 -07:00