Curve25519 keys to 1 mod 8 for ephemerals.

This commit is contained in:
Moxie Marlinspike
2014-03-19 15:25:50 -07:00
parent fd1a18d2d0
commit 5a3daf4846
17 changed files with 34 additions and 32 deletions

View File

@@ -48,7 +48,7 @@ public class PreKeyUtil {
for (int i=0;i<BATCH_SIZE;i++) {
int preKeyId = (preKeyIdOffset + i) % Medium.MAX_VALUE;
ECKeyPair keyPair = Curve25519.generateKeyPair();
ECKeyPair keyPair = Curve25519.generateKeyPair(true);
PreKeyRecord record = new PreKeyRecord(context, masterSecret, preKeyId, keyPair);
record.save();
@@ -69,7 +69,7 @@ public class PreKeyUtil {
}
}
ECKeyPair keyPair = Curve25519.generateKeyPair();
ECKeyPair keyPair = Curve25519.generateKeyPair(true);
PreKeyRecord record = new PreKeyRecord(context, masterSecret, Medium.MAX_VALUE, keyPair);
record.save();