Add link to specific implementation of computing the non-adjacent form from curve25519-dalek

This commit is contained in:
Deirdre Connolly 2021-06-30 15:58:27 -04:00
parent 681ccdb974
commit ffdaf073aa
1 changed files with 3 additions and 1 deletions

View File

@ -67,7 +67,9 @@ pub trait VartimeMultiscalarMul {
impl NonAdjacentForm for pallas::Scalar {
/// Compute a width-\\(w\\) "Non-Adjacent Form" of this scalar.
///
/// Thanks to curve25519-dalek
/// Thanks to [`curve25519-dalek`].
///
/// [`curve25519-dalek`]: https://github.com/dalek-cryptography/curve25519-dalek/blob/3e189820da03cc034f5fa143fc7b2ccb21fffa5e/src/scalar.rs#L907
fn non_adjacent_form(&self, w: usize) -> [i8; 256] {
// required by the NAF definition
debug_assert!(w >= 2);