Commit Graph
77 Commits
Author SHA1 Message Date
Kevin LewiandGitHub fa6752cdc5 Adding documentation for advanced usage + optional parameters (#110) 2021-01-05 10:13:00 -08:00
Kevin LewiandGitHub 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 LewiandGitHub f5b5391ee0 Moving id_u and id_s from the client API to registration finish instead of start (#102) 2020-12-17 14:00:32 -08:00
Kevin LewiandGitHub 605d2b639b Cleaning up docs + README (#98) 2020-12-12 21:53:33 -08:00
François Garillot 6b22064863 Fold a few panics
Removes a few panics we don't need by folding them in the Error case of their enclosing Result return.
2020-12-09 13:10:05 -08:00
François GarillotandGitHub 2794dfaaa9 Fix #94 + Add slow-hash to CI (#96)
* Fixes #94

* add slow-hash testing to CI
2020-12-04 18:32:23 -08:00
9f414d4a82 Adding VOPRF draft's test vectors (#95)
Co-authored-by: Kevin Lewi <[email protected]>
2020-12-04 13:19:29 -08:00
Kevin LewiandGitHub 6f5a1fc6aa Removing protocol message bytes (#93) 2020-11-30 11:37:32 -08:00
4c82dfaf13 Adding info and einfo fields to test vectors (#92)
Co-authored-by: Kevin Lewi <[email protected]>
2020-11-29 23:06:55 -08:00
Kevin LewiandGitHub 95152c3b35 Adding API for handling info fields (#88) 2020-11-16 14:05:43 -08:00
Kevin LewiandGitHub 51b3781e5c Updating AKE message format (#85) 2020-11-16 11:49:27 -08:00
Kevin LewiandGitHub 2d7b4292ff Fixing simple_login example (#86) 2020-11-16 11:40:52 -08:00
Kevin LewiandGitHub f165310c96 Adding expand_message_xmd and RFC compliance with VOPRF and H2C (#80) 2020-11-12 10:00:09 -08:00
François Garillot 05514e49aa Correct platform size bug 2020-11-12 10:42:45 -05:00
Kevin LewiandGitHub 697cd7a788 Removing idU from RegistrationRequest and CredentialRequest (#79)
As per [cfrg/draft-irtf-cfrg-opaque#65](https://github.com/cfrg/draft-irtf-cfrg-opaque/issues/65)
2020-11-06 10:06:49 -08:00
François GarillotandGitHub d8906c092a Merge pull request #77 from huitseeker/sizedbytes
Start integrating the derivable SizedBytes
2020-11-04 20:34:51 -05:00
François Garillot 552a546b6c Uses conditional compilation to make sure postprocessing is only available in tests
See
https://github.com/rust-lang/rust/pull/64010/
2020-11-04 11:55:14 -05:00
François Garillot 230b1bcef6 Start integrating the derivable SizedBytes
- just derive it on Key and KeyPair for now
2020-11-03 16:45:37 -05:00
Kevin LewiandFrançois Garillot c8cbf56336 Conform to voprf spec (#71) 2020-11-02 20:15:08 -05:00
Kevin LewiandFrançois Garillot 28645a7cea Add key schedule / info changes in TripleDH computation (#69) 2020-11-02 20:15:07 -05:00
Kevin LewiandFrançois Garillot 07f8048a3d Updating to keep in sync with issue 62 fix in spec (#61) 2020-11-02 20:15:06 -05:00
Kevin LewiandFrançois Garillot 0fc3448777 Updating opaque interfaces to include ids from the internet draft (#56) 2020-11-02 20:15:06 -05:00
François Garillot 7cc1c0992a remove the last few constants 2020-11-02 20:15:05 -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 LewiandGitHub c7f6abb591 Adding simple login example and fixing some docs (#67) 2020-10-26 11:52:15 -07:00
François Garillot 25ae7ff9bf Make Hash module public
Fixes #63
2020-10-21 18:24:55 -04:00
François Garillot 587ef935a7 Fix use of TryFrom<Vec<u8>> in key_exchange
We can directly require the HRTB on `for<'r> TryFrom<&'r [u8]>`.
Eliminates needless to_vec.
2020-09-24 14:31:29 +00:00
François Garillot 40ea015d6d Remove the last superfluous constant
This required purgin the usage of the low-level Key access, but now we
should be able to replace the Key type piecemeal.
2020-09-22 08:50:39 -04:00
François Garillot c97ddaf5d2 Make KeyExchange generic in KeyFormat 2020-09-21 14:46:04 -04:00
François Garillot 56d38dba2c Reverse use of Tryinto<[u8; 64]> since it's not yet on stable 2020-09-20 10:13:43 -04:00
François Garillot 786bc51fdd Normalize generic parameters for LoginSecondMessage
(aka use the CipherSuite just like the others)

Repair the generics in KE trait: it makes sense that generate_ke[1-3] should operate on the same key representation.
2020-09-19 19:16:36 -04:00
François Garillot 887b4577fa fix misuse of constants in KE2Message 2020-09-19 19:16:34 -04:00
François Garillot 3c2a208606 surface the potential breakages out of copy_from_slice 2020-09-19 19:16:31 -04:00
François Garillot 3c555e82ae Make tripleDH manipulate GenericArray<u8, N> over Vec<u8>
upgrade some of the structure contents of the KE types
2020-09-19 19:16:28 -04:00
François Garillot 81353cb844 fix benchmarks 2020-09-03 15:54:46 -04:00
François GarillotandGitHub 48412c8ee4 Merge pull request #46 from huitseeker/elligator2
Implement and use Elligator2 for the Curve25519 larger subgroup instance
2020-09-03 15:21:01 -04:00
François Garillot ab8db3bf03 Propagate usage of Elligator2 map
Fixes #30, #37
2020-09-03 14:17:45 -04:00
François Garillot dede91a5b7 Add additional test vectors from Signal 2020-09-03 14:17:44 -04:00
François Garillot f1bdfcd3a0 Add elligator mapping for hash-to-curve 2020-09-03 14:17:43 -04:00
François Garillot 2c9e47d14d Proptests exercising try_from for most structures based on random data
This also fixes crashes in:
- RegisterFirstMessage,
- LoginFirstMessage,
- ClientRegistration,
- ClientLogin
2020-09-02 10:29:22 -04:00
Kevin LewiandGitHub 195a698ad8 Fix omission of nonce in hmac computation for envelope (#44) 2020-09-01 11:23:00 -07:00
François Garillot 694c51c982 remove unneeded Repr = Key 2020-08-24 15:16:51 -04:00
François Garillot 07a702c1be make clippy happier 2020-08-24 15:13:20 -04:00
François Garillot 29ba1b93b5 Check for small subgroup components when using the EdwardsPoint group for the OPRF
A malicious attacker sending a small point could lead the server / user to leak private information.

The check avoiding mixed order points (rather than just small) is prohibitively expensive, and I don't know how an attacker would extract any data from that => we focus on a small order check.

Fixes #34.
2020-08-24 14:50:29 -04:00
Kevin LewiandGitHub 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 4fda240a7d Pass the {curve, x}25519-dalek features through the build 2020-07-22 14:59:06 -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