Go to file
dependabot[bot] 55dc5504ef Bump actions/checkout from 3.0.0 to 3.0.2
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.0.0 to 3.0.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3.0.0...v3.0.2)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-22 07:42:55 -04:00
.github Bump actions/checkout from 3.0.0 to 3.0.2 2022-04-22 07:42:55 -04:00
src Use nightly clippy 2021-06-11 18:11:42 -04:00
.gitignore Ignore emacs wastefiles 2020-05-04 17:17:57 -04:00
Cargo.toml Update proptest requirement from 0.10 to 1.0 2021-02-25 06:08:48 -05:00
README.md rust request 2020-05-08 23:54:32 -04:00
codecov.yml Add codecov.yml 2021-06-11 21:32:47 -04:00

README.md

ristretto255-dh

Diffie-Hellman key exchange using the Ristretto255 group, in pure Rust.

This crate provides a high-level API for static and ephemeral Diffie-Hellman in the Ristretto255 prime order group, as specified the IETF draft, implemented internally over Curve25519 using curve25519-dalek.

Example

use rand_core::OsRng;

use ristretto255_dh::EphemeralSecret;
use ristretto255_dh::PublicKey;

// Alice's side
let alice_secret = EphemeralSecret::new(&mut OsRng);
let alice_public = PublicKey::from(&alice_secret);

// Bob's side
let bob_secret = EphemeralSecret::new(&mut OsRng);
let bob_public = PublicKey::from(&bob_secret);

// Alice again
let alice_shared_secret = alice_secret.diffie_hellman(&bob_public);

// Bob again
let bob_shared_secret = bob_secret.diffie_hellman(&alice_public);

// Each peer's computed shared secret should be the same.
assert_eq!(<[u8; 32]>::from(alice_shared_secret), <[u8; 32]>::from(bob_shared_secret));

About

The high-level Diffie-Hellman API is inspired by x25519-dalek.