Synergy Software Package User's Manual

RSA cryptographic functions for signature generation, verification, encryption and decryption. More...

Data Structures

struct  rsa_key_t
 
struct  rsa_ctrl_t
 
struct  rsa_cfg_t
 
struct  rsa_api_t
 
struct  rsa_instance_t
 

Macros

#define RSA_API_VERSION_MAJOR   (1U)
 
#define RSA_MODULUS_SIZE_BYTES(RSA_SIZE_BITS)   ((RSA_SIZE_BITS)/8U)
 
#define RSA_PLAIN_TEXT_PUBLIC_KEY_SIZE_BYTES(RSA_SIZE_BITS)   (((uint32_t)32+(uint32_t)RSA_SIZE_BITS)/8U)
 
#define RSA_PLAIN_TEXT_PRIVATE_KEY_SIZE_BYTES(RSA_SIZE_BITS)   (((uint32_t)2*(uint32_t)RSA_SIZE_BITS)/8U)
 
#define RSA_PLAIN_TEXT_CRT_KEY_SIZE_BYTES(RSA_SIZE_BITS)   (((uint32_t)5*((uint32_t)RSA_SIZE_BITS))/16U)
 
#define RSA_WRAPPPED_PRIVATE_KEY_SIZE_BYTES(RSA_SIZE_BITS)   ((((uint32_t)2 * (uint32_t)RSA_SIZE_BITS)+(uint32_t)160)/8U)
 
#define RSA_WRAPPPED_PRIVATE_CRT_KEY_SIZE_BYTES(RSA_SIZE_BITS)   ((RSA_PLAIN_TEXT_CRT_KEY_SIZE_BYTES(RSA_SIZE_BITS))+20U)
 

Enumerations

enum  rsa_key_format_t {
  RSA_KEY_FORMAT_PLAIN_TEXT_PUBLIC_KEY, RSA_KEY_FORMAT_PLAIN_TEXT_PRIVATE_KEY, RSA_KEY_FORMAT_PLAIN_TEXT_CRT_KEY, RSA_KEY_FORMAT_WRAPPED_PRIVATE_KEY,
  RSA_KEY_FORMAT_WRAPPED_PRIVATE_CRT_KEY
}
 

Variables

const rsa_api_t g_rsa1024_on_sce
 
const rsa_api_t g_rsa1024_on_sce_hrk
 
const rsa_api_t g_rsa2048_on_sce_hrk
 

Detailed Description

RSA cryptographic functions for signature generation, verification, encryption and decryption.

Macro Definition Documentation

◆ RSA_API_VERSION_MAJOR

#define RSA_API_VERSION_MAJOR   (1U)

Register definitions, common services and error codes.

◆ RSA_MODULUS_SIZE_BYTES

#define RSA_MODULUS_SIZE_BYTES (   RSA_SIZE_BITS)    ((RSA_SIZE_BITS)/8U)

Return RSA modulus size in bytes from the specified RSA modulus size in bits

◆ RSA_PLAIN_TEXT_CRT_KEY_SIZE_BYTES

#define RSA_PLAIN_TEXT_CRT_KEY_SIZE_BYTES (   RSA_SIZE_BITS)    (((uint32_t)5*((uint32_t)RSA_SIZE_BITS))/16U)

Return RSA CRT private key size in bytes from the specified RSA modulus size in bits

◆ RSA_PLAIN_TEXT_PRIVATE_KEY_SIZE_BYTES

#define RSA_PLAIN_TEXT_PRIVATE_KEY_SIZE_BYTES (   RSA_SIZE_BITS)    (((uint32_t)2*(uint32_t)RSA_SIZE_BITS)/8U)

Return RSA private key size in bytes from the specified RSA modulus size in bits

◆ RSA_PLAIN_TEXT_PUBLIC_KEY_SIZE_BYTES

#define RSA_PLAIN_TEXT_PUBLIC_KEY_SIZE_BYTES (   RSA_SIZE_BITS)    (((uint32_t)32+(uint32_t)RSA_SIZE_BITS)/8U)

Return RSA public key size in bytes from the specified RSA modulus size in bits

◆ RSA_WRAPPPED_PRIVATE_CRT_KEY_SIZE_BYTES

#define RSA_WRAPPPED_PRIVATE_CRT_KEY_SIZE_BYTES (   RSA_SIZE_BITS)    ((RSA_PLAIN_TEXT_CRT_KEY_SIZE_BYTES(RSA_SIZE_BITS))+20U)

Return RSA wrapped private CRT key size in bytes from the specified RSA modulus size in bits

◆ RSA_WRAPPPED_PRIVATE_KEY_SIZE_BYTES

#define RSA_WRAPPPED_PRIVATE_KEY_SIZE_BYTES (   RSA_SIZE_BITS)    ((((uint32_t)2 * (uint32_t)RSA_SIZE_BITS)+(uint32_t)160)/8U)

Return RSA wrapped private key size in bytes from the specified RSA modulus size in bits

Enumeration Type Documentation

◆ rsa_key_format_t

RSA key format definitions

Enumerator
RSA_KEY_FORMAT_PLAIN_TEXT_PUBLIC_KEY 

RSA public key in plain text format.

RSA_KEY_FORMAT_PLAIN_TEXT_PRIVATE_KEY 

RSA private key in plain text format.

RSA_KEY_FORMAT_PLAIN_TEXT_CRT_KEY 

RSA CRT Key in plain text format.

RSA_KEY_FORMAT_WRAPPED_PRIVATE_KEY 

RSA private Key wrapped using device specific key.

RSA_KEY_FORMAT_WRAPPED_PRIVATE_CRT_KEY 

RSA private CRT Key wrapped using device specific key.

Variable Documentation

◆ g_rsa1024_on_sce

const rsa_api_t g_rsa1024_on_sce

RSA interface is only available on S7G2, S5D9 and S5D5.

SCE/RSA implementation of RSA API.

◆ g_rsa1024_on_sce_hrk

const rsa_api_t g_rsa1024_on_sce_hrk

SCE/RSA implementation of RSA API.

◆ g_rsa2048_on_sce_hrk

const rsa_api_t g_rsa2048_on_sce_hrk

SCE/RSA implementation of RSA API.