tlsn
tlsn copied to clipboard
mpc-circuits byte-order/endianness
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.
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.
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.