Fix protobuf decoding bug

android-scanner
Tal Moran 2017-01-23 15:41:27 +02:00
parent 5b7fbffb09
commit ce0e0e0d62
1 changed files with 3 additions and 3 deletions

View File

@ -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);