mirror of
https://github.com/saymrwulf/curve25519-dalek-source.git
synced 2026-09-09 21:10:44 +00:00
fix typos (#740)
This commit is contained in:
parent
ea6ffc354e
commit
83ddc4b34b
6 changed files with 6 additions and 6 deletions
|
|
@ -216,7 +216,7 @@ besides the `rand_core` version bump, there are no other user-visible changes.
|
||||||
for very large input sizes.
|
for very large input sizes.
|
||||||
* Add a more extensive randomized multiscalar multiplication consistency check
|
* Add a more extensive randomized multiscalar multiplication consistency check
|
||||||
to the test suite to prevent regressions.
|
to the test suite to prevent regressions.
|
||||||
* Ensure that that multiscalar and NAF computations work correctly on extremal
|
* Ensure that multiscalar and NAF computations work correctly on extremal
|
||||||
`Scalar` values constructed via `from_bits`.
|
`Scalar` values constructed via `from_bits`.
|
||||||
|
|
||||||
### 1.2.0
|
### 1.2.0
|
||||||
|
|
|
||||||
|
|
@ -99,7 +99,7 @@ Curve arithmetic is implemented and used by one of the following backends:
|
||||||
|
|
||||||
At runtime, `curve25519-dalek` selects an arithmetic backend from the set of backends it was compiled to support. For Intel x86-64 targets, unless otherwise specified, it will build itself with `simd` support, and default to `serial` at runtime if the appropriate CPU features aren't detected. See [SIMD backend] for more details.
|
At runtime, `curve25519-dalek` selects an arithmetic backend from the set of backends it was compiled to support. For Intel x86-64 targets, unless otherwise specified, it will build itself with `simd` support, and default to `serial` at runtime if the appropriate CPU features aren't detected. See [SIMD backend] for more details.
|
||||||
|
|
||||||
In the future, `simd` backend may be extended to cover more instruction sets. This change will be non-breaking as this is considered as implementation detail.
|
In the future, `simd` backend may be extended to cover more instruction sets. This change will be non-breaking as this is considered an implementation detail.
|
||||||
|
|
||||||
## Manual Backend Override
|
## Manual Backend Override
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -136,7 +136,7 @@ i3-8121U) executes 512-bit IFMA instructions at half rate compared to
|
||||||
using 512-bit IFMA instructions, and this implementation uses 256-bit
|
using 512-bit IFMA instructions, and this implementation uses 256-bit
|
||||||
vectors.
|
vectors.
|
||||||
|
|
||||||
To extend this to 512-bit vectors, it's only only necessary to achieve
|
To extend this to 512-bit vectors, it's only necessary to achieve
|
||||||
2-way parallelism, and it's possible (with a small amount of overhead)
|
2-way parallelism, and it's possible (with a small amount of overhead)
|
||||||
to create a hybrid strategy that operates entirely within 128-bit
|
to create a hybrid strategy that operates entirely within 128-bit
|
||||||
lanes. This means that cross-lane operations can use the faster
|
lanes. This means that cross-lane operations can use the faster
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@
|
||||||
//! and passed to \\( \mathbb P\^2 \\) by setting \\( x = W\_1 / W\_3
|
//! and passed to \\( \mathbb P\^2 \\) by setting \\( x = W\_1 / W\_3
|
||||||
//! \\), \\(y = W\_2 / W\_3 \\).
|
//! \\), \\(y = W\_2 / W\_3 \\).
|
||||||
//! Up to variable naming, this is the projective representation
|
//! Up to variable naming, this is the projective representation
|
||||||
//! introduced in in [_Twisted Edwards
|
//! introduced in [_Twisted Edwards
|
||||||
//! Curves_][bernstein-birkner-joye-lange-peters-2008] by Bernstein,
|
//! Curves_][bernstein-birkner-joye-lange-peters-2008] by Bernstein,
|
||||||
//! Birkner, Joye, Lange, and Peters. In `curve25519-dalek`, it is
|
//! Birkner, Joye, Lange, and Peters. In `curve25519-dalek`, it is
|
||||||
//! represented by the `ProjectivePoint` struct.
|
//! represented by the `ProjectivePoint` struct.
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ use crate::traits::VartimeMultiscalarMul;
|
||||||
/// Bucket 0 is not needed as it would contain points multiplied by 0.
|
/// Bucket 0 is not needed as it would contain points multiplied by 0.
|
||||||
/// 2. Convert scalars to a radix-`2^w` representation with signed digits in `[-2^w/2, 2^w/2]`.
|
/// 2. Convert scalars to a radix-`2^w` representation with signed digits in `[-2^w/2, 2^w/2]`.
|
||||||
/// Note: only the last digit may equal `2^w/2`.
|
/// Note: only the last digit may equal `2^w/2`.
|
||||||
/// 3. Starting with the last window, for each point `i=[0..n)` add it to a a bucket indexed by
|
/// 3. Starting with the last window, for each point `i=[0..n)` add it to a bucket indexed by
|
||||||
/// the point's scalar's value in the window.
|
/// the point's scalar's value in the window.
|
||||||
/// 4. Once all points in a window are sorted into buckets, add buckets by multiplying each
|
/// 4. Once all points in a window are sorted into buckets, add buckets by multiplying each
|
||||||
/// by their index. Efficient way of doing it is to start with the last bucket and compute two sums:
|
/// by their index. Efficient way of doing it is to start with the last bucket and compute two sums:
|
||||||
|
|
|
||||||
|
|
@ -2043,7 +2043,7 @@ pub(crate) mod test {
|
||||||
|
|
||||||
// Check that a * b == a.reduce() * a.reduce() for ANY scalars a,b, even ones that violate
|
// Check that a * b == a.reduce() * a.reduce() for ANY scalars a,b, even ones that violate
|
||||||
// invariant #1, i.e., a,b > 2^255. Old versions of ed25519-dalek did multiplication where a
|
// invariant #1, i.e., a,b > 2^255. Old versions of ed25519-dalek did multiplication where a
|
||||||
// was reduced and b was clamped and unreduced. This checks that that was always well-defined.
|
// was reduced and b was clamped and unreduced. This checks that was always well-defined.
|
||||||
#[test]
|
#[test]
|
||||||
fn test_mul_reduction_invariance() {
|
fn test_mul_reduction_invariance() {
|
||||||
let mut rng = rand::thread_rng();
|
let mut rng = rand::thread_rng();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue