tlsn icon indicating copy to clipboard operation
tlsn copied to clipboard

mpc-circuits byte-order/endianness

Open sinui0 opened this issue 2 years ago • 1 comments

Our current circuit model requires that all inputs and outputs be in little-endian and lsb0. It would be more ergonomic to allow the user to specify this, rather than forcing them to do order conversions on everything.

sinui0 avatar Oct 03 '22 19:10 sinui0

I think we should have big-endian by default for better UX because this is the default format all other circuit builder's components will be in like e.g. sha hashes and aes keys.

themighty1 avatar Oct 05 '22 14:10 themighty1

So, allowing the User to specify the internal representation of bit order is not required.

With #212 , the circuit model stores values in LSB0, but that detail is not exposed to the User and byte-order is totally up to them. All our circuits have been updated to use big-endian.

sinui0 avatar Apr 24 '23 19:04 sinui0