Skip to content

Commit e83280b

Browse files
JakujeNIIBE Yutaka
authored andcommitted
Revert "Do not allow PKCS #1.5 padding for encryption in FIPS"
This reverts commit c7709f7. The pubkey encryption has already separate explicit FIPS service indicator.
1 parent 9d56af0 commit e83280b

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

cipher/pubkey-util.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -957,10 +957,7 @@ _gcry_pk_util_data_to_mpi (gcry_sexp_t input, gcry_mpi_t *ret_mpi,
957957
void *random_override = NULL;
958958
size_t random_override_len = 0;
959959

960-
/* The RSA PKCS#1.5 encryption is no longer supported by FIPS */
961-
if (fips_mode ())
962-
rc = GPG_ERR_INV_FLAG;
963-
else if ( !(value=sexp_nth_data (lvalue, 1, &valuelen)) || !valuelen )
960+
if ( !(value=sexp_nth_data (lvalue, 1, &valuelen)) || !valuelen )
964961
rc = GPG_ERR_INV_OBJ;
965962
else
966963
{

cipher/rsa.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1460,11 +1460,6 @@ rsa_decrypt (gcry_sexp_t *r_plain, gcry_sexp_t s_data, gcry_sexp_t keyparms)
14601460
rc = GPG_ERR_INV_DATA;
14611461
goto leave;
14621462
}
1463-
if (fips_mode () && (ctx.encoding == PUBKEY_ENC_PKCS1))
1464-
{
1465-
rc = GPG_ERR_INV_FLAG;
1466-
goto leave;
1467-
}
14681463

14691464
/* Extract the key. */
14701465
rc = sexp_extract_param (keyparms, NULL, "nedp?q?u?",

0 commit comments

Comments
 (0)