Skip to content

Commit ce37059

Browse files
committed
Merge remote-tracking branch 'public/master' into releasePreparations
2 parents b58831e + efb90e2 commit ce37059

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

TLS-Core/src/main/java/de/rub/nds/tlsattacker/core/crypto/KeyShareCalculator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public static byte[] computeSharedSecret(NamedGroup group, BigInteger privateKey
9696
}
9797
} else {
9898
FFDHEGroup ffdheGroup = GroupFactory.getGroup(group);
99-
BigInteger sharedElement = new BigInteger(publicKey).modPow(privateKey.abs(), ffdheGroup.getP().abs());
99+
BigInteger sharedElement = new BigInteger(1, publicKey).modPow(privateKey.abs(), ffdheGroup.getP().abs());
100100
return ArrayConverter.bigIntegerToNullPaddedByteArray(sharedElement,
101101
ffdheGroup.getP().bitLength() / Bits.IN_A_BYTE);
102102
}

0 commit comments

Comments
 (0)