]> git.codecow.com Git - nano25519.git/commitdiff
Fix doc comments.
authorChris Duncan <chris@codecow.com>
Mon, 2 Nov 2026 22:19:09 +0000 (14:19 -0800)
committerChris Duncan <chris@codecow.com>
Mon, 2 Nov 2026 22:19:09 +0000 (14:19 -0800)
src/assembly/ed25519/fe.ts

index 303d3ca1346586e78e8d14e207ee3c4cc999e197..7b2029e3cc8877c467336b8c5e0768d41f0054b6 100644 (file)
@@ -13,7 +13,7 @@
  *
  * They are represented as 10 limbs of alternating 25- and 26-bit values so that
  *
- * `n = 2⁰a[0] + 2²⁶a[1] + 2��a[2] ... + 2²³⁰a[9]`
+ * `n = 2⁰a[0] + 2²⁶a[1] + 2��¹a[2] ... + 2²³⁰a[9]`
  */
 import { load_3, load_4 } from './utils'
 
@@ -1022,6 +1022,8 @@ function fe_extmul_pair_dbl (f_0: FieldElement, a_0: FieldElement, b_0: FieldEle
 }
 
 /**
+ * `f₀ = a₀b₀`
+ *
  * Multiply two FieldElements and store the product.
  *
  * @param f FieldElement product destination
@@ -1055,6 +1057,8 @@ export function fe_mul (f: FieldElement, a: FieldElement, b: FieldElement): void
 }
 
 /**
+ * `f₀ = a₀b₀√-1`
+ *
  * Multiply a FieldElement with the Ed25519 constant `√-1` and store the product.
  *
  * @param f FieldElement product destination
@@ -1065,6 +1069,8 @@ export function fe_mul_sqrtm1 (f: FieldElement, a: FieldElement): void {
 }
 
 /**
+ * `f₀ = a₀b₀; f₁ = a₁b₁√-1`
+ *
  * For two pairs of FieldElements, multiply pairwise in parallel, multiply the
  * second lane by the Ed25519 constant `√-1`, and store the product.
  *
@@ -1079,6 +1085,8 @@ export function fe_mul_pair_sqrtm1 (f_0: FieldElement, a_0: FieldElement, b_0: F
 }
 
 /**
+ * `f₀ = a₀b₀d`
+ *
  * Multiply a FieldElement with the Ed25519 constant `d` and store the product.
  *
  * @param f FieldElement product destination
@@ -1089,6 +1097,8 @@ export function fe_mul_d (f: FieldElement, a: FieldElement): void {
 }
 
 /**
+ * `f₀ = 2a₀b₀d`
+ *
  * Multiply a FieldElement with the Ed25519 constant `2d` and store the product.
  *
  * @param f FieldElement product destination
@@ -1099,6 +1109,8 @@ export function fe_mul_2d (f: FieldElement, a: FieldElement): void {
 }
 
 /**
+ * `f₀ = a₀b₀; f₁ = a₁b₁d`
+ *
  * For two pairs of FieldElements, multiply pairwise in parallel and store the
  * product.
  *
@@ -1119,13 +1131,15 @@ export function fe_mul_pair (f_0: FieldElement, a_0: FieldElement, b_0: FieldEle
 }
 
 /**
+ * `f₀ = a₀b₀; f₁ = 2a₁b₁d`
+ *
  * For two pairs of FieldElements, multiply pairwise in parallel, multiply the
  * second lane by the Ed25519 constant `2d`, and store the product.
  *
  * @param f_0 FieldElement A product destination
  * @param a_0 FieldElement A multiplicand source
  * @param b_0 FieldElement A multiplicand source
- * @param f_1 FieldElement B product destination
+ * @param f_1 FieldElement B product destination * 2d
  * @param a_1 FieldElement B multiplicand source
  * @param b_1 FieldElement B multiplicand source
  *
@@ -1138,6 +1152,8 @@ export function fe_mul_pair_2d (f_0: FieldElement, a_0: FieldElement, b_0: Field
 }
 
 /**
+ * `f₀ = 2a₀b₀; f₁ = a₁b₁`
+ *
  * For two pairs of FieldElements, multiply pairwise in parallel, double the
  * first lane, and store the product.
  *
@@ -1158,6 +1174,8 @@ export function fe_mul_pair_dbl (f_0: FieldElement, a_0: FieldElement, b_0: Fiel
 }
 
 /**
+ * `f₀ = 2a₀b₀; f₁ = 2a₁b₁d`
+ *
  * For two pairs of FieldElements, multiply pairwise in parallel, double the
  * first lane, multiply the second lane by the Ed25519 constant `2d`, and store
  * the product.
@@ -1601,7 +1619,7 @@ export function fe_sq_n (f: FieldElement, a: FieldElement, n: i32): void {
 }
 
 /**
- * `f�� = a₁²; f₂ = a₂²`
+ * `f�� = a₀²; f₁ = a₁²`
  *
  * Square two FieldElement values in parallel and store the results.
  *
@@ -1731,7 +1749,7 @@ export function fe_sq_pair (f_0: FieldElement, a_0: FieldElement, f_1: FieldElem
 }
 
 /**
- * `f�� = 2a₁; f₂ = 2a₂`
+ * `f�� = a₀²; f₁ = 2a₁²`
  *
  * Square two FieldElement values in parallel, double the second one, and store
  * the results.