From 0801d20fd1782ee3121d521b075193273325e1c2 Mon Sep 17 00:00:00 2001 From: zzz Date: Mon, 28 Jan 2019 15:21:15 +0000 Subject: [PATCH] EdDSA: Make more classes serializable (Github PR #68) --- core/java/src/net/i2p/crypto/eddsa/math/Encoding.java | 4 +++- core/java/src/net/i2p/crypto/eddsa/math/ScalarOps.java | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/core/java/src/net/i2p/crypto/eddsa/math/Encoding.java b/core/java/src/net/i2p/crypto/eddsa/math/Encoding.java index 6dcb0e832..a921d1192 100644 --- a/core/java/src/net/i2p/crypto/eddsa/math/Encoding.java +++ b/core/java/src/net/i2p/crypto/eddsa/math/Encoding.java @@ -1,5 +1,7 @@ package net.i2p.crypto.eddsa.math; +import java.io.Serializable; + /** * Common interface for all (b-1)-bit encodings of elements * of EdDSA finite fields. @@ -8,7 +10,7 @@ package net.i2p.crypto.eddsa.math; * @author str4d * */ -public abstract class Encoding { +public abstract class Encoding implements Serializable { protected Field f; public synchronized void setField(Field f) { diff --git a/core/java/src/net/i2p/crypto/eddsa/math/ScalarOps.java b/core/java/src/net/i2p/crypto/eddsa/math/ScalarOps.java index 8cad008fe..2243969c7 100644 --- a/core/java/src/net/i2p/crypto/eddsa/math/ScalarOps.java +++ b/core/java/src/net/i2p/crypto/eddsa/math/ScalarOps.java @@ -1,11 +1,13 @@ package net.i2p.crypto.eddsa.math; +import java.io.Serializable; + /** * * @since 0.9.15 * */ -public interface ScalarOps { +public interface ScalarOps extends Serializable { /** * Reduce the given scalar mod l. *