11 lines
322 B
Plaintext
Executable File
11 lines
322 B
Plaintext
Executable File
#pragma curve bn128
|
|
|
|
import "./unpack_unchecked";
|
|
|
|
// Unpack a field element as 256 big-endian bits
|
|
// Note: uniqueness of the output is not guaranteed
|
|
// For example, `0` can map to `[0, 0, ..., 0]` or to `bits(p)`
|
|
def main(field i) -> bool[256] {
|
|
bool[254] b = unpack_unchecked(i);
|
|
return [false, false, ...b];
|
|
} |