diff --git a/meerkat-common/src/test/java/meerkat/crypto/concrete/ECElGamalUtils.java b/meerkat-common/src/test/java/meerkat/crypto/concrete/ECElGamalUtils.java index c40128c..e1368e5 100644 --- a/meerkat-common/src/test/java/meerkat/crypto/concrete/ECElGamalUtils.java +++ b/meerkat-common/src/test/java/meerkat/crypto/concrete/ECElGamalUtils.java @@ -70,10 +70,10 @@ public class ECElGamalUtils { GroupElement c1encoded = cipherText.getC1(); GroupElement c2encoded = cipherText.getC2(); - ECPoint c1 = group.decode(c1encoded.toByteArray()); - ECPoint c2 = group.decode(c2encoded.toByteArray()); + ECPoint c1 = ECElGamalEncryption.decodeElement(group, c1encoded); + ECPoint c2 = ECElGamalEncryption.decodeElement(group, c2encoded); - ECPoint plaintextEncoded = secretKey.decrypt(new Pair(c1, c2)); + ECPoint plaintextEncoded = secretKey.decrypt(new Pair<>(c1, c2)); byte[] plaintext = group.injectiveDecode(plaintextEncoded);