]> git.codecow.com Git - libnemo.git/commitdiff
Formatting.
authorChris Duncan <chris@zoso.dev>
Thu, 4 Dec 2025 17:30:26 +0000 (09:30 -0800)
committerChris Duncan <chris@zoso.dev>
Thu, 4 Dec 2025 17:30:26 +0000 (09:30 -0800)
src/lib/crypto/secp256k1.ts

index 2451df639b2c745ed530169e5fd8e9abec273b36..1131945ab1f3da5c7d83e9a86ee9d3324ca1153d 100644 (file)
@@ -373,9 +373,8 @@ export class Secp256k1 {
                }
        }
 
-       // ## Precomputes
-       // --------------
-
+       /** Precomputes */
+       static Gpows: Point[] | undefined = undefined // precomputes for base point G
        static W = 8 // W is window size
        static scalarBits = 256
        static pwindows = Math.ceil(this.scalarBits / this.W) + 1 // 33 for W=8, NOT 32 - see wNAF loop
@@ -395,9 +394,8 @@ export class Secp256k1 {
                }
                return points
        }
-       static Gpows: Point[] | undefined = undefined // precomputes for base point G
        // const-time negate
-       static ctneg (cnd: boolean, p: Point) {
+       static ctneg (cnd: boolean, p: Point): Point {
                const n = p.negate()
                return cnd ? n : p
        }