mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-04-28 03:00:18 -04:00
16 lines
246 B
Plaintext
16 lines
246 B
Plaintext
param value
|
|
|
|
private value_bits[] = unpack(value)
|
|
|
|
digit = 1
|
|
linear_combo = []
|
|
for bit in value_bits:
|
|
enforce (bit) * (1 - bit) == 0
|
|
|
|
linear_combo.append((digit bit))
|
|
|
|
digit = digit.double()
|
|
|
|
enforce (linear_combo) * (~one) == value
|
|
|