Doc: DS documentation for S2

This commit is contained in:
Jakob Hasse
2020-04-23 13:52:33 +08:00
parent d3588f53a7
commit 516680a4ff
7 changed files with 73 additions and 11 deletions

View File

@@ -50,7 +50,8 @@ typedef enum {
* @note This struct has to match to one from the ROM code! This documentation is mostly taken from there.
*/
typedef struct esp_digital_signature_data {
/* RSA LENGTH register parameters
/**
* RSA LENGTH register parameters
* (number of words in RSA key & operands, minus one).
*
* Max value 127 (for RSA 4096).
@@ -66,16 +67,19 @@ typedef struct esp_digital_signature_data {
*/
esp_digital_signature_length_t rsa_length;
/* IV value used to encrypt 'c' */
/**
* IV value used to encrypt 'c'
*/
uint8_t iv[ESP_DS_IV_LEN];
/* Encrypted Digital Signature parameters. Result of AES-CBC encryption
of plaintext values. Includes an encrypted message digest.
*/
/**
* Encrypted Digital Signature parameters. Result of AES-CBC encryption
* of plaintext values. Includes an encrypted message digest.
*/
uint8_t c[ESP_DS_C_LEN];
} esp_ds_data_t;
/* Plaintext parameters used by Digital Signature.
/** Plaintext parameters used by Digital Signature.
*
* Not used for signing with DS peripheral, but can be encrypted
* in-device by calling esp_ds_encrypt_params()
@@ -83,11 +87,11 @@ typedef struct esp_digital_signature_data {
* @note This documentation is mostly taken from the ROM code.
*/
typedef struct {
uint32_t Y[4096/32];
uint32_t M[4096/32];
uint32_t Rb[4096/32];
uint32_t M_prime;
esp_digital_signature_length_t length;
uint32_t Y[4096/32]; //!< RSA exponent
uint32_t M[4096/32]; //!< RSA modulus
uint32_t Rb[4096/32]; //!< RSA r inverse operand
uint32_t M_prime; //!< RSA M prime operand
esp_digital_signature_length_t length; //!< RSA length
} esp_ds_p_data_t;
/**