Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement PQ key exchange #73

Merged
merged 1 commit into from Dec 3, 2021
Merged

Implement PQ key exchange #73

merged 1 commit into from Dec 3, 2021

Conversation

jrick
Copy link
Member

@jrick jrick commented Sep 7, 2021

This implements a protocol change adding an additional round of
communication to share Streamlined NTRU Prime 4591^761 ciphertexts
between all peers. This key exchange occurs in addition to an x25519
key exchange as previously, such that if a weakness in sntrup4591761
is discovered, the security won't reduce to anything worse than just
x25519.

Due to the large size of sntrup4591761 public keys and ciphertexts,
only a single key is exchanged between any two peers, regardless of
how many messages are being mixed. The resulting shared key is used
to seed a shared ChaCha20 CSPRNG which derives shared keys for the SR
and DC mixes. This differs from the previous key exchange where
x25519 keys were exchanged for every message in the DC-net.

The module's major version is bumped to v2 to represent the breaking
change. There is no other API change for consumers, but v2 clients
are not compatible with v1 servers and vice-versa.

@jrick
Copy link
Member Author

jrick commented Sep 13, 2021

This can be tested by using my dcrwallet pqcspp branch with cspp.zettaport.com:15760. The server is ipv6 only. If you don't have ipv6 access, add an entry for cspp.zettaport.com 24.247.127.78 to your /etc/hosts, but i won't be adding that to public DNS.

@alexlyp
Copy link
Member

alexlyp commented Oct 1, 2021

tested with dcrwallet pqcspp branch for a few weeks now, with no errors and smooth mixing

This implements a protocol change adding an additional round of
communication to share Streamlined NTRU Prime 4591^761 ciphertexts
between all peers.  This key exchange occurs in addition to an x25519
key exchange as previously, such that if a weakness in sntrup4591761
is discovered, the security won't reduce to anything worse than just
x25519.

Due to the large size of sntrup4591761 public keys and ciphertexts,
only a single key is exchanged between any two peers, regardless of
how many messages are being mixed.  The resulting shared key is used
to seed a shared ChaCha20 CSPRNG which derives shared keys for the SR
and DC mixes.  This differs from the previous key exchange where
x25519 keys were exchanged for every message in the DC-net.

The module's major version is bumped to v2 to represent the breaking
change.  There is no other API change for consumers, but v2 clients
are not compatible with v1 servers and vice-versa.
@jrick jrick merged commit ee00e49 into decred:master Dec 3, 2021
@jrick jrick deleted the pq branch December 3, 2021 15:39
xaur added a commit to xaur/decred-news that referenced this pull request Dec 8, 2021
GitHub reports it was merged Dec 3:

decred/cspp#73
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants