Skip to content

Commit 5170e38

Browse files
bwesterbarmfazh
authored andcommitted
kyber/ntt: fix documentation typos
1 parent f3c1b0d commit 5170e38

File tree

1 file changed

+7
-7
lines changed
  • pke/kyber/internal/common

1 file changed

+7
-7
lines changed

pke/kyber/internal/common/ntt.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ var InvNTTReductions = [...]int{
5959
// their proper order by calling Detangle().
6060
func (p *Poly) nttGeneric() {
6161
// Note that ℤ_q does not have a primitive 512ᵗʰ root of unity (as 512
62-
// does not divide into q) and so we cannot do a regular NTT. ℤ_q
62+
// does not divide into q-1) and so we cannot do a regular NTT. ℤ_q
6363
// does have a primitive 256ᵗʰ root of unity, the smallest of which
6464
// is ζ := 17.
6565
//
@@ -73,12 +73,12 @@ func (p *Poly) nttGeneric() {
7373
// ⋮
7474
// = (x² - ζ)(x² + ζ)(x² - ζ⁶⁵)(x² + ζ⁶⁵) … (x² + ζ¹²⁷)
7575
//
76-
// Note that the powers of ζ that appear (from th second line down) are
76+
// Note that the powers of ζ that appear (from the second line down) are
7777
// in binary
7878
//
79-
// 010000 110000
80-
// 001000 101000 011000 111000
81-
// 000100 100100 010100 110100 001100 101100 011100 111100
79+
// 0100000 1100000
80+
// 0010000 1010000 0110000 1110000
81+
// 0001000 1001000 0101000 1101000 0011000 1011000 0111000 1111000
8282
// …
8383
//
8484
// That is: brv(2), brv(3), brv(4), …, where brv(x) denotes the 7-bit
@@ -89,7 +89,7 @@ func (p *Poly) nttGeneric() {
8989
//
9090
// ℤ_q[x]/(x²⁵⁶+1) → ℤ_q[x]/(x²-ζ) x … x ℤ_q[x]/(x²+ζ¹²⁷)
9191
//
92-
// given by a ↦ ( a mod x²-z, …, a mod x²+z¹²⁷ )
92+
// given by a ↦ ( a mod x²-ζ, …, a mod x²+ζ¹²⁷ )
9393
// is an isomorphism, which is the "NTT". It can be efficiently computed by
9494
//
9595
//
@@ -105,7 +105,7 @@ func (p *Poly) nttGeneric() {
105105
//
106106
// Each cross is a Cooley-Tukey butterfly: it's the map
107107
//
108-
// (a, b) ↦ (a + ζ, a - ζ)
108+
// (a, b) ↦ (a + ζb, a - ζb)
109109
//
110110
// for the appropriate power ζ for that column and row group.
111111

0 commit comments

Comments
 (0)