hyperledger / anoncreds-clsignatures-rs

Apache License 2.0
7 stars 12 forks source link

Conditional serialization for crypto primitives (string or bytes) #33

Closed Artemkaaas closed 12 months ago

Artemkaaas commented 1 year ago

Make conditional serialization for crypto primitives:

andrewwhitehead commented 1 year ago

I had just been thinking about this recently because the string serialization of points is so bad (not normalized or compressed). The serde Serializer has an is_human_readable method which is often used to indicate support for byte strings. Maybe that could be used to choose the default serialization, and the deserializer could support bytes or strings?

Artemkaaas commented 1 year ago

I had just been thinking about this recently because the string serialization of points is so bad (not normalized or compressed). The serde Serializer has an is_human_readable method which is often used to indicate support for byte strings. Maybe that could be used to choose the default serialization, and the deserializer could support bytes or strings?

Thank you! It seems to be exactly what we need.