These methods provide a software implementation of various crypto algorithms.
|
int | atcac_sw_ecdsa_verify_p256 (const uint8_t msg[ATCA_ECC_P256_FIELD_SIZE], const uint8_t signature[ATCA_ECC_P256_SIGNATURE_SIZE], const uint8_t public_key[ATCA_ECC_P256_PUBLIC_KEY_SIZE]) |
| return software generated ECDSA verification result and the function is currently not implemented More...
|
|
int | atcac_sw_random (uint8_t *data, size_t data_size) |
| return software generated random number and the function is currently not implemented More...
|
|
int | atcac_sw_sha1 (const uint8_t *data, size_t data_size, uint8_t digest[ATCA_SHA1_DIGEST_SIZE]) |
| Perform SHA1 hash of data in software. More...
|
|
int | atcac_sw_sha1_finish (atcac_sha1_ctx *ctx, uint8_t digest[ATCA_SHA1_DIGEST_SIZE]) |
| Complete the SHA1 hash in software and return the digest. More...
|
|
int | atcac_sw_sha1_init (atcac_sha1_ctx *ctx) |
| Initialize context for performing SHA1 hash in software. More...
|
|
int | atcac_sw_sha1_update (atcac_sha1_ctx *ctx, const uint8_t *data, size_t data_size) |
| Add arbitrary data to a SHA1 hash. More...
|
|
int | atcac_sw_sha2_256 (const uint8_t *data, size_t data_size, uint8_t digest[ATCA_SHA2_256_DIGEST_SIZE]) |
| single call convenience function which computes Hash of given data using SHA256 software More...
|
|
int | atcac_sw_sha2_256_finish (atcac_sha2_256_ctx *ctx, uint8_t digest[ATCA_SHA2_256_DIGEST_SIZE]) |
| completes the final SHA256 calculation and returns the final digest/hash More...
|
|
int | atcac_sw_sha2_256_init (atcac_sha2_256_ctx *ctx) |
| initializes the SHA256 software More...
|
|
int | atcac_sw_sha2_256_update (atcac_sha2_256_ctx *ctx, const uint8_t *data, size_t data_size) |
| updates the running hash with the next block of data, called iteratively for the entire stream of data to be hashed using the SHA256 software More...
|
|
#define ATCA_ECC_P256_FIELD_SIZE (256 / 8) |
#define ATCA_SHA1_DIGEST_SIZE (20) |
#define ATCA_SHA2_256_DIGEST_SIZE (32) |
int atcac_sw_ecdsa_verify_p256 |
( |
const uint8_t |
msg[ATCA_ECC_P256_FIELD_SIZE], |
|
|
const uint8_t |
signature[ATCA_ECC_P256_SIGNATURE_SIZE], |
|
|
const uint8_t |
public_key[ATCA_ECC_P256_PUBLIC_KEY_SIZE] |
|
) |
| |
return software generated ECDSA verification result and the function is currently not implemented
- Parameters
-
[in] | msg | ptr to message or challenge |
[in] | signature | ptr to the signature to verify |
[in] | public_key | ptr to public key of device which signed the challenge return ATCA_UNIMPLEMENTED , as the function is currently not implemented |
int atcac_sw_random |
( |
uint8_t * |
data, |
|
|
size_t |
data_size |
|
) |
| |
return software generated random number and the function is currently not implemented
- Parameters
-
[out] | data | ptr to space to receive the random number |
[in] | data_size | size of data buffer return ATCA_UNIMPLEMENTED , as the function is not implemented |
int atcac_sw_sha1 |
( |
const uint8_t * |
data, |
|
|
size_t |
data_size, |
|
|
uint8_t |
digest[ATCA_SHA1_DIGEST_SIZE] |
|
) |
| |
int atcac_sw_sha1_finish |
( |
atcac_sha1_ctx * |
ctx, |
|
|
uint8_t |
digest[ATCA_SHA1_DIGEST_SIZE] |
|
) |
| |
Complete the SHA1 hash in software and return the digest.
- Parameters
-
[in] | ctx | Hash context |
[out] | digest | Digest is returned here (20 bytes) |
- Returns
- ATCA_SUCCESS
References CL_hashFinal().
Referenced by atcac_sw_sha1().
Initialize context for performing SHA1 hash in software.
- Parameters
-
- Returns
- ATCA_SUCCESS on success, otherwise an error code.
References CL_hashInit().
Referenced by atcac_sw_sha1().
int atcac_sw_sha1_update |
( |
atcac_sha1_ctx * |
ctx, |
|
|
const uint8_t * |
data, |
|
|
size_t |
data_size |
|
) |
| |
Add arbitrary data to a SHA1 hash.
- Parameters
-
[in] | ctx | Hash context |
[in] | data | Data to be added to the hash |
[in] | data_size | Data size in bytes |
- Returns
- ATCA_SUCCESS
References CL_hashUpdate().
Referenced by atcac_sw_sha1().
int atcac_sw_sha2_256 |
( |
const uint8_t * |
data, |
|
|
size_t |
data_size, |
|
|
uint8_t |
digest[ATCA_SHA2_256_DIGEST_SIZE] |
|
) |
| |
single call convenience function which computes Hash of given data using SHA256 software
- Parameters
-
[in] | data | pointer to stream of data to hash |
[in] | data_size | size of data stream to hash |
[out] | digest | result |
- Returns
- ATCA_SUCCESS on success, otherwise an error code.
References atcac_sw_sha2_256_finish(), atcac_sw_sha2_256_init(), and atcac_sw_sha2_256_update().
Referenced by atcah_check_mac(), atcah_derive_key(), atcah_derive_key_mac(), atcah_gen_dig(), atcah_gen_key_msg(), atcah_gen_mac(), atcah_hmac(), atcah_mac(), atcah_nonce(), atcah_privwrite_auth_mac(), atcah_sha256(), atcah_sign_internal_msg(), and atcah_write_auth_mac().
int atcac_sw_sha2_256_finish |
( |
atcac_sha2_256_ctx * |
ctx, |
|
|
uint8_t |
digest[ATCA_SHA2_256_DIGEST_SIZE] |
|
) |
| |
int atcac_sw_sha2_256_update |
( |
atcac_sha2_256_ctx * |
ctx, |
|
|
const uint8_t * |
data, |
|
|
size_t |
data_size |
|
) |
| |