penumbra-zone / decaf377

decaf377 is a prime-order group designed for use in SNARKs over BLS12-377
https://protocol.penumbra.zone/main/crypto/decaf377.html
12 stars 12 forks source link

Use ark-serialize reexports for the Write and Read Traits #58

Closed neithanmo closed 7 months ago

neithanmo commented 7 months ago

Title: Fix no_std Compatibility in Serialization/Deserialization

Body: Encountered a compilation issue when building the crate with no_std support using:

cargo build --no-default-features

Errors:

  1. An error conversion issue with ?, where std::io::Error could not be converted to SerializationError.
  2. A trait bound error indicating that W: ark_serialize::Write was not satisfied.

Resolution: Resolved these issues by substituting std::io::Write/Read traits with equivalent traits provided by ark-serialize. This change ensures compatibility with no_std targets, maintaining the crate's functionality while extending its usability in no_std environments.