solutions/zokrates_prover/.zokrates/stdlib/utils/pack/bool/unpack_unchecked.zok

8 lines
321 B
Plaintext
Raw Permalink Normal View History

2023-12-05 06:06:28 +00:00
from "EMBED" import unpack;
// Unpack a field element as N big endian bits without checking for overflows
// This does *not* guarantee a single output: for example, 0 can be decomposed as 0 or as P and this function does not enforce either
def main<N>(field i) -> bool[N] {
bool[N] res = unpack(i);
return res;
}