Fix protobuf decoding bug
parent
5b7fbffb09
commit
ce0e0e0d62
|
@ -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<ECPoint, ECPoint>(c1, c2));
|
||||
ECPoint plaintextEncoded = secretKey.decrypt(new Pair<>(c1, c2));
|
||||
|
||||
byte[] plaintext = group.injectiveDecode(plaintextEncoded);
|
||||
|
||||
|
|
Loading…
Reference in New Issue