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 Lewi
c8cbf56336
Conform to voprf spec ( #71 )
2020-11-02 20:15:08 -05:00
Kevin Lewi
28645a7cea
Add key schedule / info changes in TripleDH computation ( #69 )
2020-11-02 20:15:07 -05:00
Kevin Lewi
07f8048a3d
Updating to keep in sync with issue 62 fix in spec ( #61 )
2020-11-02 20:15:06 -05: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
344e8ad8d1
Updating serialization for RegisterFirstMessage ( #35 )
2020-11-02 20:14:47 -05: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
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
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
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
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 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
Kevin Lewi
f8285c60ba
Introducing a trait for key exchange ( #20 )
2020-07-13 15:23:29 -07:00
François Garillot and KevinLewi
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 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
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
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
4f9b7fe86f
Update digest & hashes libraries to their latest versions
2020-06-16 06:24:14 -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
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
3a1aaab6cf
Merge pull request #7 from huitseeker/Cleanup_CI
...
Make CI run on PRs as well
2020-06-13 08:49:53 -04:00
François Garillot
ce1d97002c
cleaner to_bytes() for a few structures
2020-06-12 18:38:14 -04: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
2020-06-05 09:35:14 -07:00