Skip to content

Commit

Permalink
fips update: indicate minimum RSA public exponent in function list
Browse files Browse the repository at this point in the history
Signed-off-by: Joerg Schmidbauer <[email protected]>
  • Loading branch information
jschmidb committed Dec 12, 2024
1 parent 3928f38 commit 34efc10
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions include/ica_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ typedef ica_adapter_handle_t ICA_ADAPTER_HANDLE;

#define ICA_PROPERTY_RSA_ALL 0x0000000F /* All RSA key lengths */
#define ICA_PROPERTY_RSA_FIPS 0x0000000C /* RSA 2k and higher */
#define ICA_PROPERTY_RSA_NO_SMALL_EXP 0x00010000 /* e >= 65537 */
#define ICA_PROPERTY_EC_BP 0x00000001 /* Brainpool curves */
#define ICA_PROPERTY_EC_NIST 0x00000002 /* NIST curves */
#define ICA_PROPERTY_EC_ED 0x00000004 /* Edwards curves */
Expand Down
6 changes: 4 additions & 2 deletions src/s390_crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -726,10 +726,12 @@ int s390_get_functionlist(libica_func_list_element *pmech_list,
case RSA_KEY_GEN_CRT:
case RSA_ME:
case RSA_CRT:
if (pmech_list[x].flags)
if (pmech_list[x].flags) {
pmech_list[x].property = ICA_PROPERTY_RSA_FIPS;
else
pmech_list[x].property |= ICA_PROPERTY_RSA_NO_SMALL_EXP;
} else {
pmech_list[x].property = 0;
}
break;
default:
break;
Expand Down

0 comments on commit 34efc10

Please sign in to comment.