Make ECC 25519 the default generated key type

This commit is contained in:
segfault-bilibili
2023-03-18 10:47:31 +08:00
committed by Vincent Breitmoser
parent 5615197553
commit 0caeca0b66
2 changed files with 6 additions and 7 deletions

View File

@@ -180,13 +180,13 @@ public final class Constants {
}
/**
* Default key configuration: 3072 bit RSA (certify + sign, encrypt)
* Default key configuration: EDDSA (certify + sign), Curve25519 ECDH (encrypt)
*/
public static void addDefaultSubkeys(SaveKeyringParcel.Builder builder) {
builder.addSubkeyAdd(SubkeyAdd.createSubkeyAdd(SaveKeyringParcel.Algorithm.RSA,
3072, null, KeyFlags.CERTIFY_OTHER | KeyFlags.SIGN_DATA, 0L));
builder.addSubkeyAdd(SubkeyAdd.createSubkeyAdd(SaveKeyringParcel.Algorithm.RSA,
3072, null, KeyFlags.ENCRYPT_COMMS | KeyFlags.ENCRYPT_STORAGE, 0L));
builder.addSubkeyAdd(SubkeyAdd.createSubkeyAdd(SaveKeyringParcel.Algorithm.EDDSA,
null, null, KeyFlags.CERTIFY_OTHER | KeyFlags.SIGN_DATA, 0L));
builder.addSubkeyAdd(SubkeyAdd.createSubkeyAdd(SaveKeyringParcel.Algorithm.ECDH,
null, SaveKeyringParcel.Curve.CV25519, KeyFlags.ENCRYPT_COMMS | KeyFlags.ENCRYPT_STORAGE, 0L));
}
/**