37 lines
850 B
Plaintext
37 lines
850 B
Plaintext
import "./512bitBool.zok" as pedersen;
|
|
import "utils/casts/u32_to_bits" as to_bits;
|
|
import "utils/casts/u32_from_bits" as from_bits;
|
|
|
|
def main(u32[16] inputs) -> u32[8] {
|
|
bool[512] e = [
|
|
...to_bits(inputs[0]),
|
|
...to_bits(inputs[1]),
|
|
...to_bits(inputs[2]),
|
|
...to_bits(inputs[3]),
|
|
...to_bits(inputs[4]),
|
|
...to_bits(inputs[5]),
|
|
...to_bits(inputs[6]),
|
|
...to_bits(inputs[7]),
|
|
...to_bits(inputs[8]),
|
|
...to_bits(inputs[9]),
|
|
...to_bits(inputs[10]),
|
|
...to_bits(inputs[11]),
|
|
...to_bits(inputs[12]),
|
|
...to_bits(inputs[13]),
|
|
...to_bits(inputs[14]),
|
|
...to_bits(inputs[15])
|
|
];
|
|
|
|
bool[256] aC = pedersen(e);
|
|
return [
|
|
from_bits(aC[0..32]),
|
|
from_bits(aC[32..64]),
|
|
from_bits(aC[64..96]),
|
|
from_bits(aC[96..128]),
|
|
from_bits(aC[128..160]),
|
|
from_bits(aC[160..192]),
|
|
from_bits(aC[192..224]),
|
|
from_bits(aC[224..256])
|
|
];
|
|
}
|