Mistake on this page?
Report an issue in GitHub or email us
Data Structures | Macros | Typedefs | Enumerations
CryptoCell RSA used definitions and enums

Data Structures

struct  CRYSRSAPubKey_t
 
struct  CRYS_RSAUserPubKey_t
 
struct  CRYSRSAPrivNonCRTKey_t
 
struct  CRYSRSAPrivCRTKey_t
 
struct  CRYSRSAPrivKey_t
 
struct  CRYS_RSAUserPrivKey_t
 
struct  CRYS_RSAPrimeData_t
 
union  CRYS_RSAKGData_t
 
struct  RSAPrivContext_t
 
struct  CRYS_RSAPrivUserContext_t
 
struct  RSAPubContext_t
 
struct  CRYS_RSAPubUserContext_t
 
struct  CRYS_RSAKGFipsContext_t
 
struct  CRYS_RSAFipsKatContext_t
 

Macros

#define CRYS_PKA_RSA_HASH_CTX_SIZE_IN_WORDS   CRYS_HASH_USER_CTX_SIZE_IN_WORDS
 
#define CRYS_RSA_MAX_VALID_KEY_SIZE_VALUE_IN_BYTES   (CRYS_RSA_MAX_VALID_KEY_SIZE_VALUE_IN_BITS / SASI_BITS_IN_BYTE)
 
#define CRYS_RSA_MIN_VALID_KEY_SIZE_VALUE_IN_BITS   512
 
#define CRYS_RSA_VALID_KEY_SIZE_MULTIPLE_VALUE_IN_BITS   256
 
#define CRYS_RSA_MAX_KEY_GENERATION_SIZE_BITS   CRYS_RSA_MAX_KEY_GENERATION_HW_SIZE_BITS
 
#define CRYS_RSA_FIPS_KEY_SIZE_1024_BITS   1024
 
#define CRYS_RSA_FIPS_KEY_SIZE_2048_BITS   2048
 
#define CRYS_RSA_FIPS_KEY_SIZE_3072_BITS   3072
 
#define CRYS_RSA_FIPS_MODULUS_SIZE_BITS   CRYS_RSA_FIPS_KEY_SIZE_2048_BITS
 
#define CRYS_DH_FIPS_KEY_SIZE_1024_BITS   1024
 
#define CRYS_DH_FIPS_KEY_SIZE_2048_BITS   2048
 
#define CRYS_RSA_VERIFY_SALT_LENGTH_UNKNOWN   0xFFFF
 
#define CRYS_RSA_MIN_PUB_EXP_VALUE   3
 
#define CRYS_RSA_MIN_PRIV_EXP_VALUE   1
 
#define CRYS_RSA_TMP_BUFF_SIZE   (CRYS_RSA_OAEP_ENCODE_MAX_MASKDB_SIZE + CRYS_RSA_OAEP_ENCODE_MAX_SEEDMASK_SIZE + CRYS_PKA_RSA_HASH_CTX_SIZE_IN_WORDS*sizeof(uint32_t) + sizeof(CRYS_HASH_Result_t))
 
#define CRYS_PKCS1_HashFunc_t   CRYS_HASH_OperationMode_t
 
#define CRYS_RSA_OAEP_MAX_HLEN   CRYS_HASH_SHA512_DIGEST_SIZE_IN_BYTES
 
#define CRYS_RSA_MGF_2_POWER_32   65535
 
#define CRYS_RSA_SIZE_OF_T_STRING_BYTES   (CRYS_RSA_MAXIMUM_MOD_BUFFER_SIZE_IN_WORDS*sizeof(uint32_t))
 
#define CRYS_RSA_OAEP_ENCODE_MAX_SEEDMASK_SIZE   CRYS_RSA_OAEP_MAX_HLEN
 
#define CRYS_RSA_PSS_SALT_LENGTH   CRYS_RSA_OAEP_MAX_HLEN
 
#define CRYS_RSA_PSS_PAD1_LEN   8
 
#define CRYS_RSA_OAEP_ENCODE_MAX_MASKDB_SIZE   (CRYS_RSA_MAXIMUM_MOD_BUFFER_SIZE_IN_WORDS*sizeof(uint32_t))
 
#define CRYS_RSA_OAEP_DECODE_MAX_DBMASK_SIZE   (CRYS_RSA_MAXIMUM_MOD_BUFFER_SIZE_IN_WORDS*sizeof(uint32_t))
 
#define CRYS_RSA_SIZE_IN_WORDS_OF_CRYSRSAPrivCRTKey_t   (CRYS_RSA_MAXIMUM_MOD_BUFFER_SIZE_IN_WORDS*7/2 + 5)
 

Typedefs

typedef struct CRYS_RSAUserPubKey_t CRYS_RSAUserPubKey_t
 
typedef struct CRYS_RSAUserPrivKey_t CRYS_RSAUserPrivKey_t
 
typedef struct CRYS_RSAPrimeData_t CRYS_RSAPrimeData_t
 
typedef union CRYS_RSAKGData_t CRYS_RSAKGData_t
 
typedef struct CRYS_RSAPrivUserContext_t CRYS_RSAPrivUserContext_t
 
typedef struct CRYS_RSAPubUserContext_t CRYS_RSAPubUserContext_t
 
typedef struct CRYS_RSAKGFipsContext_t CRYS_RSAKGFipsContext_t
 
typedef struct CRYS_RSAFipsKatContext_t CRYS_RSAFipsKatContext_t
 

Enumerations

Detailed Description

Macro Definition Documentation

#define CRYS_DH_FIPS_KEY_SIZE_1024_BITS   1024

FIPS 184-4 DH key size - 1024 bits.

Definition at line 88 of file crys_rsa_types.h.

#define CRYS_DH_FIPS_KEY_SIZE_2048_BITS   2048

FIPS 184-4 DH key size - 2048 bits.

Definition at line 90 of file crys_rsa_types.h.

#define CRYS_PKA_RSA_HASH_CTX_SIZE_IN_WORDS   CRYS_HASH_USER_CTX_SIZE_IN_WORDS

Definition of HASH context size.

Definition at line 64 of file crys_rsa_types.h.

#define CRYS_PKCS1_HashFunc_t   CRYS_HASH_OperationMode_t

Hash structure definition.

Definition at line 108 of file crys_rsa_types.h.

#define CRYS_RSA_FIPS_KEY_SIZE_1024_BITS   1024

FIPS 184-4 allowed key size - 1024 bits.

Definition at line 79 of file crys_rsa_types.h.

#define CRYS_RSA_FIPS_KEY_SIZE_2048_BITS   2048

FIPS 184-4 allowed key size - 2048 bits.

Definition at line 81 of file crys_rsa_types.h.

#define CRYS_RSA_FIPS_KEY_SIZE_3072_BITS   3072

FIPS 184-4 allowed key size - 3072 bits.

Definition at line 83 of file crys_rsa_types.h.

#define CRYS_RSA_FIPS_MODULUS_SIZE_BITS   CRYS_RSA_FIPS_KEY_SIZE_2048_BITS

FIPS 184-4 allowed modulus size in bits.

Definition at line 85 of file crys_rsa_types.h.

#define CRYS_RSA_MAX_KEY_GENERATION_SIZE_BITS   CRYS_RSA_MAX_KEY_GENERATION_HW_SIZE_BITS

Maximal RSA generated key size in bits.

Definition at line 75 of file crys_rsa_types.h.

#define CRYS_RSA_MAX_VALID_KEY_SIZE_VALUE_IN_BYTES   (CRYS_RSA_MAX_VALID_KEY_SIZE_VALUE_IN_BITS / SASI_BITS_IN_BYTE)

Maximal key size in bytes.

Definition at line 67 of file crys_rsa_types.h.

#define CRYS_RSA_MGF_2_POWER_32   65535

MGF1 definitions

Definition at line 114 of file crys_rsa_types.h.

#define CRYS_RSA_MIN_PRIV_EXP_VALUE   1

Minimal private exponent value

Definition at line 101 of file crys_rsa_types.h.

#define CRYS_RSA_MIN_PUB_EXP_VALUE   3

Minimal public exponent value

Definition at line 99 of file crys_rsa_types.h.

#define CRYS_RSA_MIN_VALID_KEY_SIZE_VALUE_IN_BITS   512

Minimal key size in bits.

Definition at line 70 of file crys_rsa_types.h.

#define CRYS_RSA_OAEP_DECODE_MAX_DBMASK_SIZE   (CRYS_RSA_MAXIMUM_MOD_BUFFER_SIZE_IN_WORDS*sizeof(uint32_t))

OAEP decode mask size.

Definition at line 133 of file crys_rsa_types.h.

#define CRYS_RSA_OAEP_ENCODE_MAX_MASKDB_SIZE   (CRYS_RSA_MAXIMUM_MOD_BUFFER_SIZE_IN_WORDS*sizeof(uint32_t))

OAEP encode mask size.

Definition at line 131 of file crys_rsa_types.h.

#define CRYS_RSA_OAEP_ENCODE_MAX_SEEDMASK_SIZE   CRYS_RSA_OAEP_MAX_HLEN

Size of OEAP seed.

Definition at line 124 of file crys_rsa_types.h.

#define CRYS_RSA_OAEP_MAX_HLEN   CRYS_HASH_SHA512_DIGEST_SIZE_IN_BYTES

OAEP maximal H length.

Definition at line 111 of file crys_rsa_types.h.

#define CRYS_RSA_PSS_PAD1_LEN   8

PSS padding length.

Definition at line 128 of file crys_rsa_types.h.

#define CRYS_RSA_PSS_SALT_LENGTH   CRYS_RSA_OAEP_MAX_HLEN

Maximal PSS salt size.

Definition at line 126 of file crys_rsa_types.h.

#define CRYS_RSA_SIZE_IN_WORDS_OF_CRYSRSAPrivCRTKey_t   (CRYS_RSA_MAXIMUM_MOD_BUFFER_SIZE_IN_WORDS*7/2 + 5)

Size of CRYSRSAPrivCRTKey_t structure in words (used for temp buffers allocation).

Definition at line 307 of file crys_rsa_types.h.

#define CRYS_RSA_SIZE_OF_T_STRING_BYTES   (CRYS_RSA_MAXIMUM_MOD_BUFFER_SIZE_IN_WORDS*sizeof(uint32_t))

MGF1 definitions

Definition at line 116 of file crys_rsa_types.h.

Temporary buffer size definition.

Definition at line 105 of file crys_rsa_types.h.

#define CRYS_RSA_VALID_KEY_SIZE_MULTIPLE_VALUE_IN_BITS   256

Valid key size multiplications in RSA.

Definition at line 72 of file crys_rsa_types.h.

#define CRYS_RSA_VERIFY_SALT_LENGTH_UNKNOWN   0xFFFF

Salt length definition - if the salt length is not available in verify operation, the user can use this define and the algorithm will calculate the salt length alone

Note
Security wise: it is not recommended to use this flag.

Definition at line 96 of file crys_rsa_types.h.

Typedef Documentation

Required for internal FIPS verification for RSA KAT. The RSA KAT tests defined for scheme 2.1 with modulus key size of 2048.

KG data type.

Required for internal FIPS verification for RSA key generation.

Temporary buffers for RSA usage.

The user's context prototype - the argument type that is passed by the user to the RSA APIs. The context saves the state of the operation and must be saved by the user till the end of the APIs flow .

Temporary buffers for the RSA usage.

The private key's user structure prototype. This structure must be saved by the user, and is used as input to the RSA functions (such as SaSi_RsaSchemesDecrypt etc.).

The public key's user structure prototype. This structure must be saved by the user, and is used as input to the RSA functions (such as SaSi_RsaSchemesEncrypt etc.)

Enumeration Type Documentation

MGF values.

Enumerator
CRYS_PKCS1_NO_MGF 

MGF1.

CRYS_RSA_NumOfMGFFunctions 

No MGF.

CRYS_PKCS1_MGFLast 

Maximal number of MGF options.

Definition at line 185 of file crys_rsa_types.h.

Defines the enum of the various PKCS1 versions.

Enumerator
CRYS_PKCS1_VER21 

PKCS1 version 15.

CRYS_RSA_NumOf_PKCS1_versions 

PKCS1 version 21.

CRYS_PKCS1_versionLast 

Maximal number of PKCS versions.

Definition at line 196 of file crys_rsa_types.h.

Defines the enum of the RSA decryption mode.

Enumerator
CRYS_RSA_NoCrt 

Decryption no CRT mode.

CRYS_RSA_Crt 

Decryption CRT mode.

CRYS_RSA_DecryptionModeLast 

Reserved.

Definition at line 163 of file crys_rsa_types.h.

Enum defining primality testing mode in Rabin-Miller and Lucas-Lehmer tests (internal tests).

Enumerator
CRYS_RSA_PRIME_TEST_MODE 

PRIME test.

CRYS_DH_PRIME_TEST_MODE 

DH Prime test.

CRYS_RSA_DH_PRIME_TEST_OFF_MODE 

Reserved.

Definition at line 210 of file crys_rsa_types.h.

Defines the enum for the HASH operation mode.

Enumerator
CRYS_RSA_HASH_MD5_mode 

For PKCS1 v1.5 only. The input data will be hashed with MD5

CRYS_RSA_HASH_SHA1_mode 

The input data will be hashed with SHA1.

CRYS_RSA_HASH_SHA224_mode 

The input data will be hashed with SHA224.

CRYS_RSA_HASH_SHA256_mode 

The input data will be hashed with SHA256.

CRYS_RSA_HASH_SHA384_mode 

The input data will be hashed with SHA384.

CRYS_RSA_HASH_SHA512_mode 

The input data will be hashed with SHA512.

CRYS_RSA_After_MD5_mode 

For PKCS1 v1.5 only. The input data is a digest of MD5 and will not be hashed.

CRYS_RSA_After_SHA1_mode 

The input data is a digest of SHA1 and will not be hashed.

CRYS_RSA_After_SHA224_mode 

The input data is a digest of SHA224 and will not be hashed.

CRYS_RSA_After_SHA256_mode 

The input data is a digest of SHA256 and will not be hashed.

CRYS_RSA_After_SHA384_mode 

The input data is a digest of SHA384 and will not be hashed.

CRYS_RSA_After_SHA512_mode 

The input data is a digest of SHA512 and will not be hashed.

CRYS_RSA_HASH_NO_HASH_mode 

Used for PKCS1 v1.5 Encrypt and Decrypt.

CRYS_RSA_HASH_NumOfModes 

Maximal number of hash operations modes.

Definition at line 138 of file crys_rsa_types.h.

RSA Key source definition.

Enumerator
CRYS_RSA_ExternalKey 

External key.

CRYS_RSA_InternalKey 

Internal key.

CRYS_RSA_KeySourceLast 

Reserved.

Definition at line 175 of file crys_rsa_types.h.

Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.