}
}
-/**
- * Unpacks the first lane of a FieldElementPair into a single FieldElement.
- */
-export function fep_unpack_lane (f_a: FieldElement, f: FieldElementPair): void {
- for (let i = 0, j = 0; i < 10; i++, j += 2) {
- f_a[i] = f[j]
- }
-}
-
-/**
- * Turns `[a0, b0, a1, b1, ...]` into `[a0, a1, ..., b0, b1, ...]`
- */
-export function fep_unweave (h: FieldElementPair, f: FieldElementPair): void {
- for (let i = 0, j = 0; i < 10; i++, j += 2) {
- h[i] = f[j]
- h[i + 10] = f[j + 1]
- }
-}
-
-/**
- * Turns `[a0, a1, ..., b0, b1, ...]` into `[a0, b0, a1, b1, ...]`
- */
-export function fep_weave (h: FieldElementPair, f: FieldElementPair): void {
- for (let i = 0, j = 0; i < 10; i++, j += 2) {
- h[j] = f[i]
- h[j + 1] = f[i + 10]
- }
-}
-
/**
* Add two FieldElement pairs and store the sum.
*