HAL PKA Types ¶
HAL PKA Types ¶
Note
This section is not available for STM32C562xx.
- group PKA_Exported_Types
-
Typedefs
-
typedef
hal_pka_ecdsa_signature_result_ext_config_t
hal_pka_ecc_projective_to_affine_result_t
¶
-
typedef
hal_pka_ecdsa_signature_result_ext_config_t
hal_pka_ecc_double_base_ladder_result_t
¶
-
typedef
hal_pka_ecdsa_signature_result_ext_config_t
hal_pka_ecc_mul_protect_result_t
¶
-
typedef
struct
hal_pka_add_config_t
hal_pka_sub_config_t
¶
-
typedef
struct
hal_pka_add_config_t
hal_pka_mul_config_t
¶
-
typedef
struct
hal_pka_add_config_t
hal_pka_cmp_config_t
¶
-
typedef
struct
hal_pka_mod_add_config_t
hal_pka_mod_sub_config_t
¶
-
typedef
struct
hal_pka_mod_add_config_t
hal_pka_montgomery_mul_config_t
¶
-
typedef
struct
hal_pka_handle_s
hal_pka_handle_t
¶
-
PKA Handle Structure type
-
typedef
void
(
*
hal_pka_cb_t
)
(
hal_pka_handle_t
*
hpka
)
¶
-
PKA Callback pointer definition
Enums
-
enum
hal_pka_t
¶
-
PKA instance enumeration definition.
Values:
-
enumerator
HAL_PKA1
¶
-
HAL PKA instance
-
enumerator
HAL_PKA1
¶
-
enum
hal_pka_state_t
¶
-
PKA state enumeration definition.
Values:
-
enumerator
HAL_PKA_STATE_RESET
¶
-
PKA not yet initialized or disabled
-
enumerator
HAL_PKA_STATE_INIT
¶
-
PKA is initialized but not yet configured
-
enumerator
HAL_PKA_STATE_IDLE
¶
-
PKA is initialized and configured
-
enumerator
HAL_PKA_STATE_ACTIVE
¶
-
PKA internal processing is ongoing
-
enumerator
HAL_PKA_STATE_RESET
¶
-
enum
hal_pka_rsa_signature_status_t
¶
-
PKA RSA signature state.
Values:
-
enumerator
PKA_RSA_SIGNATURE_NOT_VALID
¶
-
The RSA signature is not valid
-
enumerator
PKA_RSA_SIGNATURE_VALID
¶
-
The RSA signature is valid
-
enumerator
PKA_RSA_SIGNATURE_NOT_VALID
¶
-
struct
hal_pka_ecc_mul_protect_config_t
¶
-
#include <stm32c5xx_hal_pka.h>
PKA ECC scalar multiplication protected configuration structure definition.
Public Members
-
uint32_t
prime_order_size_byte
¶
-
Number of elements in p_prime_order array
-
uint32_t
scalar_mul_size_byte
¶
-
Number of elements in p_scalar_mul array
-
uint32_t
modulus_size_byte
¶
-
Number of elements in p_modulus, p_coeff_a, p_pt_x and p_pt_y arrays
-
uint32_t
coeff_sign
¶
-
Curve coefficient a sign
-
const
uint8_t
*
p_coeff_a
¶
-
Pointer to curve coefficient |a|
-
const
uint8_t
*
p_coeff_b
¶
-
Pointer to curve coefficient b
-
const
uint8_t
*
p_modulus
¶
-
Pointer to curve modulus value p (Array of modulus_size_byte elements)
-
const
uint8_t
*
p_pt_x
¶
-
Pointer to point P coordinate xP (Array of modulus_size_byte elements)
-
const
uint8_t
*
p_pt_y
¶
-
Pointer to point P coordinate yP (Array of modulus_size_byte elements)
-
const
uint8_t
*
p_scalar_mul
¶
-
Pointer to scalar multiplier k (Array of scalar_mul_size_byte elements)
-
const
uint8_t
*
p_prime_order
¶
-
Pointer to curve prime order (Array of prime_order_size_byte elements)
-
uint32_t
prime_order_size_byte
¶
-
struct
hal_pka_point_check_config_t
¶
-
#include <stm32c5xx_hal_pka.h>
PKA point-on-elliptic-curve check configuration structure definition.
Public Members
-
uint32_t
modulus_size_byte
¶
-
Number of elements in p_coeff_a, p_coeff_b, p_modulus, p_pt_x and p_pt_y arrays
-
uint32_t
coeff_sign
¶
-
Curve coefficient a sign
-
const
uint8_t
*
p_montgomery_param
¶
-
Pointer to Montgomery parameter (Array of modulus_size_byte)
-
const
uint8_t
*
p_coeff_a
¶
-
Pointer to curve coefficient |a| (Array of modulus_size_byte elements)
-
const
uint8_t
*
p_coeff_b
¶
-
Pointer to curve coefficient b (Array of modulus_size_byte elements)
-
const
uint8_t
*
p_modulus
¶
-
Pointer to curve modulus value p (Array of modulus_size_byte elements)
-
const
uint8_t
*
p_pt_x
¶
-
Pointer to point P coordinate xP (Array of modulus_size_byte elements)
-
const
uint8_t
*
p_pt_y
¶
-
Pointer to point P coordinate yP (Array of modulus_size_byte elements)
-
uint32_t
modulus_size_byte
¶
-
struct
hal_pka_rsa_crt_exp_config_t
¶
-
#include <stm32c5xx_hal_pka.h>
PKA RSA CRT exponentiation configuration structure definition.
Public Members
-
uint32_t
size_byte
¶
-
Number of elements in p_operand_a array
-
const
uint8_t
*
p_operand_dp
¶
-
Pointer to operand dP (Array of size_byte/2 elements)
-
const
uint8_t
*
p_operand_dq
¶
-
Pointer to operand dQ (Array of size_byte/2 elements)
-
const
uint8_t
*
p_operand_qinv
¶
-
Pointer to operand qinv (Array of size_byte/2 elements)
-
const
uint8_t
*
p_prime_p
¶
-
Pointer to prime p (Array of size_byte/2 elements)
-
const
uint8_t
*
p_prime_q
¶
-
Pointer to prime Q (Array of size_byte/2 elements)
-
const
uint8_t
*
p_operand_a
¶
-
Pointer to operand A (Array of size_byte elements)
-
uint32_t
size_byte
¶
-
struct
hal_pka_rsa_signature_config_t
¶
-
#include <stm32c5xx_hal_pka.h>
PKA RSA signature configuration structure definition.
Public Members
-
uint32_t
private_key_size_byte
¶
-
Number of elements in p_private_key array
-
uint32_t
hash_size_byte
¶
-
Number of elements in p_hash array
-
const
uint8_t
*
p_modulus
¶
-
Pointer to curve modulus value p (Array of hash_size_byte elements)
-
const
uint8_t
*
p_private_key
¶
-
Pointer to private key d (Array of private_key_size_byte elements)
-
const
uint8_t
*
p_hash
¶
-
Pointer to hash of the message (Array of hash_size_byte elements)
-
uint32_t
private_key_size_byte
¶
-
struct
hal_pka_rsa_signature_fast_config_t
¶
-
#include <stm32c5xx_hal_pka.h>
PKA RSA signature fast configuration structure definition.
Public Members
-
uint32_t
private_key_size_byte
¶
-
Number of elements in p_private_key array
-
uint32_t
hash_size_byte
¶
-
Number of elements in p_hash array
-
const
uint8_t
*
p_modulus
¶
-
Pointer to curve modulus value p (Array of hash_size_byte elements)
-
const
uint8_t
*
p_private_key
¶
-
Pointer to private key d (Array of private_key_size_byte elements)
-
const
uint8_t
*
p_hash
¶
-
Pointer to hash of the message (Array of hash_size_byte elements)
-
const
uint8_t
*
p_montgomery_param
¶
-
Pointer to Montgomery parameter (Array of exponent_size_byte elements)
-
uint32_t
private_key_size_byte
¶
-
struct
hal_pka_rsa_signature_protect_config_t
¶
-
#include <stm32c5xx_hal_pka.h>
PKA RSA signature protected configuration structure definition.
Public Members
-
uint32_t
private_key_size_byte
¶
-
Number of elements in p_private_key array
-
uint32_t
hash_size_byte
¶
-
Number of elements in p_hash array
-
const
uint8_t
*
p_modulus
¶
-
Pointer to curve modulus value p (Array of hash_size_byte elements)
-
const
uint8_t
*
p_private_key
¶
-
Pointer to private key d (Array of private_key_size_byte elements)
-
const
uint8_t
*
p_hash
¶
-
Pointer to hash of the message (Array of hash_size_byte elements)
-
const
uint8_t
*
p_phi
¶
-
Pointer to Phi value
-
uint32_t
private_key_size_byte
¶
-
struct
hal_pka_rsa_verif_config_t
¶
-
#include <stm32c5xx_hal_pka.h>
PKA RSA verification configuration structure definition.
Public Members
-
uint32_t
public_key_size_byte
¶
-
Number of elements in p_public_key array
-
uint32_t
sign_size_byte
¶
-
Number of elements in p_sign array
-
const
uint8_t
*
p_modulus
¶
-
Pointer to curve modulus value p (Array of sign_size_byte elements)
-
const
uint8_t
*
p_public_key
¶
-
Pointer to public key d (Array of public_key_size_byte elements)
-
const
uint8_t
*
p_sign
¶
-
Pointer to RSA signature (Array of sign_size_byte elements)
-
uint32_t
public_key_size_byte
¶
-
struct
hal_pka_ecdsa_verif_config_t
¶
-
#include <stm32c5xx_hal_pka.h>
PKA elliptic curves over prime fields verification configuration structure definition.
Public Members
-
uint32_t
prime_order_size_byte
¶
-
Number of elements in prime order array
-
uint32_t
modulus_size_byte
¶
-
Number of elements in modulus array
-
uint32_t
coeff_sign
¶
-
Curve coefficient a sign
-
const
uint8_t
*
p_coeff
¶
-
Pointer to curve coefficient |a| (Array of modulus_size_byte elements)
-
const
uint8_t
*
p_modulus
¶
-
Pointer to curve modulus value p (Array of modulus_size_byte elements)
-
const
uint8_t
*
p_base_pt_x
¶
-
Pointer to curve base point xG (Array of modulus_size_byte elements)
-
const
uint8_t
*
p_base_pt_y
¶
-
Pointer to curve base point yG (Array of modulus_size_byte elements)
-
const
uint8_t
*
p_pub_key_curve_pt_x
¶
-
Pointer to public key curve point xG (Array of modulus_size_byte elements)
-
const
uint8_t
*
p_pub_key_curve_pt_y
¶
-
Pointer to public key curve point yG (Array of modulus_size_byte elements)
-
const
uint8_t
*
p_r_sign
¶
-
Pointer to signature part r (Array of prime_order_size_byte elements)
-
const
uint8_t
*
p_s_sign
¶
-
Pointer to signature part s (Array of prime_order_size_byte elements)
-
const
uint8_t
*
p_hash
¶
-
Pointer to hash of message z (Array of prime_order_size_byte elements)
-
const
uint8_t
*
p_prime_order
¶
-
Pointer to order of the curve n (Array of prime_order_size_byte elements)
-
uint32_t
prime_order_size_byte
¶
-
struct
hal_pka_ecdsa_signature_protect_config_t
¶
-
#include <stm32c5xx_hal_pka.h>
PKA elliptic curves over prime fields signature configuration structure definition (protected mode).
Public Members
-
uint32_t
prime_order_size_byte
¶
-
Number of elements in p_prime_order array
-
uint32_t
modulus_size_byte
¶
-
Number of elements in p_modulus array
-
uint32_t
coeff_sign
¶
-
Curve coefficient a sign
-
const
uint8_t
*
p_coeff
¶
-
Pointer to curve coefficient |a| (Array of modulus_size_byte elements)
-
const
uint8_t
*
p_coeff_b
¶
-
Pointer to B coefficient (Array of modulus_size_byte elements)
-
const
uint8_t
*
p_modulus
¶
-
Pointer to curve modulus value p (Array of modulus_size_byte elements)
-
const
uint8_t
*
p_integer
¶
-
Pointer to random integer k (Array of primeOrderSize elements)
-
const
uint8_t
*
p_base_pt_x
¶
-
Pointer to curve base point xG (Array of modulus_size_byte elements)
-
const
uint8_t
*
p_base_pt_y
¶
-
Pointer to curve base point yG (Array of modulus_size_byte elements)
-
const
uint8_t
*
p_hash
¶
-
Pointer to hash of the message (Array of primeOrderSize elements)
-
const
uint8_t
*
p_private_key
¶
-
Pointer to private key d (Array of primeOrderSize elements)
-
const
uint8_t
*
p_prime_order
¶
-
Pointer to order of the curve n (Array of primeOrderSize elements)
-
uint32_t
prime_order_size_byte
¶
-
struct
hal_pka_ecdsa_signature_protect_result_t
¶
-
#include <stm32c5xx_hal_pka.h>
PKA elliptic curves over prime fields output structure definition (protected mode)
-
struct
hal_pka_ecdsa_signature_result_ext_config_t
¶
-
#include <stm32c5xx_hal_pka.h>
PKA curve operations output structure definition.
-
struct
hal_pka_mod_exp_config_t
¶
-
#include <stm32c5xx_hal_pka.h>
PKA Modular exponentiation configuration structure definition.
Public Members
-
uint32_t
exponent_size_byte
¶
-
Number of elements in p_exponent array
-
uint32_t
operand_size_byte
¶
-
Number of elements in p_operand and pMod arrays
-
const
uint8_t
*
p_exponent
¶
-
Pointer to Exponent (Array of exponent_size_byte elements)
-
const
uint8_t
*
p_operand
¶
-
Pointer to Operand (Array of operand_size_byte elements)
-
const
uint8_t
*
p_modulus
¶
-
Pointer to modulus (Array of operand_size_byte elements)
-
uint32_t
exponent_size_byte
¶
-
struct
hal_pka_mod_exp_protect_config_t
¶
-
#include <stm32c5xx_hal_pka.h>
PKA Modular exponentiation protected configuration structure definition.
Public Members
-
uint32_t
exponent_size_byte
¶
-
Size of the exponent in bytes
-
uint32_t
operand_size_byte
¶
-
Size of the operand in bytes
-
const
uint8_t
*
p_operand
¶
-
Pointer to Operand (Array of exponent_size_byte elements)
-
const
uint8_t
*
p_exponent
¶
-
Pointer to Exponent (Array of operand_size_byte elements)
-
const
uint8_t
*
p_modulus
¶
-
Pointer to modulus value n (Array of operand_size_byte elements)
-
const
uint8_t
*
p_phi
¶
-
Pointer to Phi value
-
uint32_t
exponent_size_byte
¶
-
struct
hal_pka_mod_exp_fast_config_t
¶
-
#include <stm32c5xx_hal_pka.h>
PKA Modular exponentiation (fast) configuration structure definition.
Public Members
-
uint32_t
exponent_size_byte
¶
-
Number of elements in p_exponent and p_montgomery_param arrays
-
uint32_t
operand_size_byte
¶
-
Number of elements in p_operand and p_modulus arrays
-
const
uint8_t
*
p_exponent
¶
-
Pointer to Exponent (Array of exponent_size_byte elements)
-
const
uint8_t
*
p_operand
¶
-
Pointer to Operand (Array of operand_size_byte elements)
-
const
uint8_t
*
p_modulus
¶
-
Pointer to modulus (Array of operand_size_byte elements)
-
const
uint8_t
*
p_montgomery_param
¶
-
Pointer to Montgomery parameter (Array of exponent_size_byte elements)
-
uint32_t
exponent_size_byte
¶
-
struct
hal_pka_montgomery_config_t
¶
-
#include <stm32c5xx_hal_pka.h>
PKA Montgomery parameter computation configuration structure definition.
-
struct
hal_pka_add_config_t
¶
-
#include <stm32c5xx_hal_pka.h>
PKA Arithmetic configuration structure definition.
-
struct
hal_pka_mod_inv_config_t
¶
-
#include <stm32c5xx_hal_pka.h>
PKA Modular inversion configuration structure definition.
-
struct
hal_pka_mod_red_config_t
¶
-
#include <stm32c5xx_hal_pka.h>
PKA Modular reduction configuration structure definition.
Public Members
-
uint32_t
operand_size_byte
¶
-
Number of elements in p_operand array
-
uint32_t
modulus_size_byte
¶
-
Number of elements in p_modulus array
-
const
uint8_t
*
p_operand
¶
-
Pointer to Operand (Array of operand_size_byte elements)
-
const
uint8_t
*
p_modulus
¶
-
Pointer to modulus value n (Array of modulus_size_byte elements)
-
uint32_t
operand_size_byte
¶
-
struct
hal_pka_mod_add_config_t
¶
-
#include <stm32c5xx_hal_pka.h>
PKA Modular arithmetic configuration structure definition.
Public Members
-
uint32_t
size_byte
¶
-
Number of elements in p_operand_1 and p_operand_2 arrays
-
const
uint8_t
*
p_operand_1
¶
-
Pointer to Operand 1 (Array of size_byte elements)
-
const
uint8_t
*
p_operand_2
¶
-
Pointer to Operand 2 (Array of size_byte elements)
-
const
uint8_t
*
p_operand_3
¶
-
Pointer to Operand 3 (Array of size_byte elements)
-
uint32_t
size_byte
¶
-
struct
hal_pka_ecc_double_base_ladder_config_t
¶
-
#include <stm32c5xx_hal_pka.h>
PKA ECC double base ladder configuration structure definition.
Public Members
-
uint32_t
prime_order_size_byte
¶
-
Curve prime order n length
-
uint32_t
modulus_size_byte
¶
-
Curve modulus p length
-
uint32_t
coeff_sign
¶
-
Curve coefficient a sign
-
const
uint8_t
*
p_coeff_a
¶
-
Pointer to curve coefficient |a|
-
const
uint8_t
*
p_modulus
¶
-
Pointer to curve modulus value p
-
const
uint8_t
*
p_integer_k
¶
-
Pointer to cryptographically secure random integer k
-
const
uint8_t
*
p_integer_m
¶
-
Pointer to cryptographically secure random integer m
-
const
uint8_t
*
p_base_pt_x_1
¶
-
Pointer to curve base first point coordinate x
-
const
uint8_t
*
p_base_pt_y_1
¶
-
Pointer to curve base first point coordinate y
-
const
uint8_t
*
p_base_pt_z_1
¶
-
Pointer to curve base first point coordinate z
-
const
uint8_t
*
p_base_pt_x_2
¶
-
Pointer to curve base second point coordinate x
-
const
uint8_t
*
p_base_pt_y_2
¶
-
Pointer to curve base second point coordinate y
-
const
uint8_t
*
p_base_pt_z_2
¶
-
Pointer to curve base second point coordinate z
-
uint32_t
prime_order_size_byte
¶
-
struct
hal_pka_ecc_projective_to_affine_config_t
¶
-
#include <stm32c5xx_hal_pka.h>
PKA ECC projective to affine configuration structure definition.
Public Members
-
uint32_t
modulus_size_byte
¶
-
Curve modulus p length
-
const
uint8_t
*
p_modulus
¶
-
Pointer to curve modulus value p
-
const
uint8_t
*
p_base_pt_x
¶
-
Pointer to curve base point coordinate x
-
const
uint8_t
*
p_base_pt_y
¶
-
Pointer to curve base point coordinate y
-
const
uint8_t
*
p_base_pt_z
¶
-
Pointer to curve base point coordinate z
-
const
uint8_t
*
p_montgomery_param
¶
-
Pointer to Montgomery parameter R2 modulus n
-
uint32_t
modulus_size_byte
¶
-
struct
hal_pka_ecc_complete_add_config_t
¶
-
#include <stm32c5xx_hal_pka.h>
PKA ECC complete addition configuration structure definition.
Public Members
-
uint32_t
modulus_size_byte
¶
-
Curve modulus p length
-
uint32_t
coeff_sign
¶
-
Curve coefficient a sign
-
const
uint8_t
*
p_modulus
¶
-
Pointer to curve modulus value p
-
const
uint8_t
*
p_coeff_a
¶
-
Pointer to curve coefficient |a|
-
const
uint8_t
*
p_base_pt_x_1
¶
-
Pointer to curve base first point coordinate x
-
const
uint8_t
*
p_base_pt_y_1
¶
-
Pointer to curve base first point coordinate y
-
const
uint8_t
*
p_base_pt_z_1
¶
-
Pointer to curve base first point coordinate z
-
const
uint8_t
*
p_base_pt_x_2
¶
-
Pointer to curve base second point coordinate x
-
const
uint8_t
*
p_base_pt_y_2
¶
-
Pointer to curve base second point coordinate y
-
const
uint8_t
*
p_base_pt_z_2
¶
-
Pointer to curve base second point coordinate z
-
uint32_t
modulus_size_byte
¶
-
struct
hal_pka_ecc_complete_add_result_t
¶
-
#include <stm32c5xx_hal_pka.h>
PKA output ECC complete addition structure definition.
-
struct
hal_pka_handle_s
¶
-
#include <stm32c5xx_hal_pka.h>
PKA handle Structure definition.
Public Members
-
volatile
hal_pka_state_t
global_state
¶
-
PKA state
-
uint32_t
operation
¶
-
PKA operating mode
-
volatile
uint32_t
last_error_codes
¶
-
PKA last error codes
-
hal_pka_cb_t
p_operation_cplt_cb
¶
-
PKA End of operation callback
-
hal_pka_cb_t
p_error_cb
¶
-
PKA Last error callback
-
const
void
*
p_user_data
¶
-
PKA user data
-
volatile
hal_pka_state_t
global_state
¶
-
typedef
hal_pka_ecdsa_signature_result_ext_config_t
hal_pka_ecc_projective_to_affine_result_t
¶
Note
This section is not available for STM32C542xx.