Skip to content

Commit

Permalink
Merge remote-tracking branch 'public/master' into releasePreparations
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaehren committed Jul 16, 2022
2 parents b58831e + efb90e2 commit ce37059
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public static byte[] computeSharedSecret(NamedGroup group, BigInteger privateKey
}
} else {
FFDHEGroup ffdheGroup = GroupFactory.getGroup(group);
BigInteger sharedElement = new BigInteger(publicKey).modPow(privateKey.abs(), ffdheGroup.getP().abs());
BigInteger sharedElement = new BigInteger(1, publicKey).modPow(privateKey.abs(), ffdheGroup.getP().abs());
return ArrayConverter.bigIntegerToNullPaddedByteArray(sharedElement,
ffdheGroup.getP().bitLength() / Bits.IN_A_BYTE);
}
Expand Down

0 comments on commit ce37059

Please sign in to comment.