Macros | |
#define | ECC_NISTP256_PARAM_LENGTH_BYTES 32 |
Length in bytes of NISTP256 curve parameters excluding the prepended length word. More... | |
#define | ECC_LENGTH_OFFSET_BYTES 4 |
Number of bytes for the length word prepended before all parameters passed into the ECC functions. More... | |
#define | ECC_NISTP256_PARAM_LENGTH_WITH_OFFSET_BYTES (ECC_NISTP256_PARAM_LENGTH_BYTES + ECC_LENGTH_OFFSET_BYTES) |
Length in bytes of NISTP256 curve parameters including the prepended length word. More... | |
#define | SHA256_SUCCESS 0x77 |
#define | SHA256_ERROR 0x88 |
Functions | |
uint8_t | SHA256_init (SHA256_Workzone *workzone) |
Initialize a SHA-256 operation. More... | |
uint8_t | SHA256_process (SHA256_Workzone *workzone, uint8_t *inputBuffer, uint32_t bufLength) |
Add a message segment to the hash. More... | |
uint8_t | SHA256_final (SHA256_Workzone *workzone, uint8_t *digest) |
Finalize the hash and write back the digest. More... | |
uint8_t | SHA256_full (SHA256_Workzone *workzone, uint8_t *digest, uint8_t *inputBuffer, uint32_t bufLength) |
Compute the hash of a message in one go. More... | |
#define ECC_LENGTH_OFFSET_BYTES 4 |
Number of bytes for the length word prepended before all parameters passed into the ECC functions.
#define ECC_NISTP256_PARAM_LENGTH_BYTES 32 |
Length in bytes of NISTP256 curve parameters excluding the prepended length word.
#define ECC_NISTP256_PARAM_LENGTH_WITH_OFFSET_BYTES (ECC_NISTP256_PARAM_LENGTH_BYTES + ECC_LENGTH_OFFSET_BYTES) |
Length in bytes of NISTP256 curve parameters including the prepended length word.
#define SHA256_ERROR 0x88 |
#define SHA256_SUCCESS 0x77 |
uint8_t SHA256_final | ( | SHA256_Workzone * | workzone, |
uint8_t * | digest | ||
) |
Finalize the hash and write back the digest.
[in,out] | workzone | Working memory that holds intermediate results |
[out] | digest | Resultant digest of the hash |
uint8_t SHA256_full | ( | SHA256_Workzone * | workzone, |
uint8_t * | digest, | ||
uint8_t * | inputBuffer, | ||
uint32_t | bufLength | ||
) |
Compute the hash of a message in one go.
[in,out] | workzone | Working memory that holds intermediate results |
[out] | digest | Resultant digest of the hash |
[in] | inputBuffer | Segment of an input message to process |
[in] | bufLength | Number of bytes to process |
uint8_t SHA256_init | ( | SHA256_Workzone * | workzone | ) |
Initialize a SHA-256 operation.
workzone | Working memory that holds intermediate results |
uint8_t SHA256_process | ( | SHA256_Workzone * | workzone, |
uint8_t * | inputBuffer, | ||
uint32_t | bufLength | ||
) |
Add a message segment to the hash.
[in,out] | workzone | Working memory that holds intermediate results |
[in] | inputBuffer | Segment of an input message to process |
[in] | bufLength | Number of bytes to process |