enforce RSA_PRIME1 > RSA_PRIME2 (p > q) in PGP

This commit is contained in:
Martin Willi
2009-08-26 11:23:51 +02:00
parent 5ef478aaee
commit cbfafc1125
2 changed files with 5 additions and 4 deletions
+3 -2
View File
@@ -202,10 +202,11 @@ static private_key_t *parse_rsa_private_key(chunk_t blob)
return NULL;
}
}
/* PGP has uses p < q, but we use p > q */
return lib->creds->create(lib->creds, CRED_PRIVATE_KEY, KEY_RSA,
BUILD_RSA_MODULUS, mpi[0], BUILD_RSA_PUB_EXP, mpi[1],
BUILD_RSA_PRIV_EXP, mpi[2], BUILD_RSA_PRIME1, mpi[3],
BUILD_RSA_PRIME2, mpi[4], BUILD_RSA_COEFF, mpi[5],
BUILD_RSA_PRIV_EXP, mpi[2], BUILD_RSA_PRIME2, mpi[3],
BUILD_RSA_PRIME1, mpi[4], BUILD_RSA_COEFF, mpi[5],
BUILD_END);
}