mratsim / constantine

Constantine: modular, high-performance, zero-dependency cryptography stack for verifiable computation, proof systems and blockchain protocols.
Other
413 stars 44 forks source link

add: endianness option to scalar serde for Banderwagon #342

Closed agnxsh closed 10 months ago

agnxsh commented 10 months ago

Adding an endianness param, set to BigEndian by default in Banderwagon scalar serde, using this because in the Verkle Spec sometimes conversion to and from in littleEndian byte arrays are also prevalent. In those cases, this provides a decent layer of abstraction for someone not knowing about the internals of Constantine.

advaita-saha commented 10 months ago

Have you run the tests once after making these changes ?

agnxsh commented 10 months ago

Have you run the tests once after making these changes ?

Yes, tests are fine. Since it is calling marshal and unmarshal internally, and they are tested, I hadn't added for a little endian scenario, but okay I will be adding.