Fix sometimes erroneous Ed25519 public key to X25519 public key conversion.

Added mass (x1000) testing of key conversion and shared secret calculations.

Fix incorrect proxy private key test that has expected result from previous
algorithm.

Added another test HTML/JS file.
This commit is contained in:
catbref
2019-05-25 19:18:01 +01:00
parent 1b4369e5e8
commit f3c588d90f
3 changed files with 70 additions and 1 deletions

View File

@@ -71,6 +71,8 @@ public class BouncyCastle25519 {
int[] u = new int[X25519Field.SIZE];
X25519Field.mul(onePlusY, oneMinusYInverted, u);
X25519Field.normalize(u);
byte[] x25519PublicKey = new byte[X25519.SCALAR_SIZE];
X25519Field.encode(u, x25519PublicKey, 0);