]> git.codecow.com Git - nano25519.git/commitdiff
Rename parameter for consistency.
authorChris Duncan <chris@codecow.com>
Sat, 7 Nov 2026 18:22:55 +0000 (10:22 -0800)
committerChris Duncan <chris@codecow.com>
Sat, 7 Nov 2026 18:22:55 +0000 (10:22 -0800)
src/assembly/ed25519/p.ts

index d15c1b45223c54a985306465bad18c59c8a57dc0..cebb138bb7e5f64f700ad7f89de7997d53bcafee 100644 (file)
@@ -378,9 +378,9 @@ export function p3_sub_precomp (r: p1p1, p: p3, q: p_precomp): void {
 }
 
 /**
- * s = h
+ * `s = p`
  *
- * Encodes `h` as 32 bytes where bits 0 to 254 are `y` little-endian and bit 255
+ * Encodes `p` as 32 bytes where bits 0 to 254 are `y` little-endian and bit 255
  * is the sign of `x` which is its least significant bit.
  *
  * ```
@@ -389,9 +389,9 @@ export function p3_sub_precomp (r: p1p1, p: p3, q: p_precomp): void {
  * s = y + 2²⁵⁵(x mod 2)
  * ```
  */
-export function p3_tobytes (s: StaticArray<u8>, h: p3): void {
-       fe_invert(t.Z, h.Z)
-       fe_mul_pair(t.X, h.X, t.Z, t.Y, h.Y, t.Z)
+export function p3_tobytes (s: StaticArray<u8>, p: p3): void {
+       fe_invert(t.Z, p.Z)
+       fe_mul_pair(t.X, p.X, t.Z, t.Y, p.Y, t.Z)
        fe_tobytes(s, t.Y)
        s[31] ^= fe_isnegative(t.X) << 7
        p1p1_0(t)