str4d / ed25519-java

Pure Java implementation of EdDSA
Creative Commons Zero v1.0 Universal
220 stars 74 forks source link

Ed25519LittleEndianEncoding is not serializable #61

Open MatthewPhinney opened 6 years ago

MatthewPhinney commented 6 years ago

I wrote an AttributeConverter to map an EdDSAPublicKey to/from bytes, but when testing it, I found

org.springframework.orm.jpa.JpaSystemException: could not serialize; nested exception is org.hibernate.type.SerializationException: could not serialize
Caused by: java.io.NotSerializableException: net.i2p.crypto.eddsa.math.ed25519.Ed25519LittleEndianEncoding

This can easily be fixed by making Encoding serializable. Ed25519ScalarOps must also be serializable for the Hibernate converter to work, and it may be sensible to have BigIntegerScalarOps serializable as well.