internal/ed25519: add precomputed NAF table for basepoint

This commit is contained in:
Henry de Valence 2019-05-08 22:51:06 -07:00 committed by Filippo Valsorda
parent 0da0c530f4
commit 7b8b390b63
2 changed files with 10 additions and 1 deletions

View File

@ -105,7 +105,6 @@ func TestBasepointTableGeneration(t *testing.T) {
tmp1.Double(tmp2)
tmp3.FromP1xP1(tmp1)
}
}
func TestScalarMulMatchesBasepointMul(t *testing.T) {
@ -146,3 +145,12 @@ func TestMultiScalarMulMatchesBasepointMul(t *testing.T) {
t.Error(err)
}
}
func TestBasepointNafTableGeneration(t *testing.T) {
var table NafLookupTable8
table.FromP3(&B)
if table != basepointNafTable {
t.Error("BasepointNafTable does not match")
}
}

File diff suppressed because one or more lines are too long