mirror of
https://github.com/saymrwulf/curve25519-dalek-source.git
synced 2026-09-05 20:30:57 +00:00
Merge branch 'release/0.1.0'
This commit is contained in:
commit
9970b8d17b
3 changed files with 4 additions and 3 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "x25519-dalek"
|
name = "x25519-dalek"
|
||||||
version = "0.0.0"
|
version = "0.1.0"
|
||||||
authors = ["Isis Lovecruft <isis@patternsinthevoid.net>"]
|
authors = ["Isis Lovecruft <isis@patternsinthevoid.net>"]
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
license = "BSD-3-Clause"
|
license = "BSD-3-Clause"
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,7 @@ Documentation is available [here](https://docs.rs/x25519-dalek).
|
||||||
To install, add the following to your project's `Cargo.toml`:
|
To install, add the following to your project's `Cargo.toml`:
|
||||||
|
|
||||||
[dependencies.x25519-dalek]
|
[dependencies.x25519-dalek]
|
||||||
version = "^0.0"
|
version = "^0.1"
|
||||||
|
|
||||||
Then, in your library or executable source, add:
|
Then, in your library or executable source, add:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,6 @@ pub fn diffie_hellman(my_secret: &[u8; 32], their_public: &[u8; 32]) -> [u8; 32]
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod test {
|
mod test {
|
||||||
use curve25519_dalek::constants::BASE_COMPRESSED_MONTGOMERY;
|
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
fn do_rfc7748_ladder_test1(input_scalar: &Scalar,
|
fn do_rfc7748_ladder_test1(input_scalar: &Scalar,
|
||||||
|
|
@ -124,6 +123,8 @@ mod test {
|
||||||
#[test]
|
#[test]
|
||||||
#[ignore] // Run only if you want to burn a lot of CPU doing 1,000,000 DH operations
|
#[ignore] // Run only if you want to burn a lot of CPU doing 1,000,000 DH operations
|
||||||
fn rfc7748_ladder_test2() {
|
fn rfc7748_ladder_test2() {
|
||||||
|
use curve25519_dalek::constants::BASE_COMPRESSED_MONTGOMERY;
|
||||||
|
|
||||||
let mut k: Scalar = Scalar(BASE_COMPRESSED_MONTGOMERY.0);
|
let mut k: Scalar = Scalar(BASE_COMPRESSED_MONTGOMERY.0);
|
||||||
let mut u: CompressedMontgomeryU = BASE_COMPRESSED_MONTGOMERY;
|
let mut u: CompressedMontgomeryU = BASE_COMPRESSED_MONTGOMERY;
|
||||||
let mut result: CompressedMontgomeryU;
|
let mut result: CompressedMontgomeryU;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue