|
PebbleOS v4.47.0
|
Hardware hash and cipher acceleration used by Cryptography. More...
Modules | |
| SiFli SF32LB AES and hash accelerator | |
| AES and hash units of the SF32LB52 crypto engine, behind the pbl_crypto_hw_*() functions. | |
Functions | |
| size_t | pbl_crypto_hw_sha256_blocks (uint32_t state[8], const void *data, size_t nblocks) |
| Accelerated SHA-256 compression. | |
| size_t | pbl_crypto_hw_aes_ecb_encrypt (const uint8_t *key, size_t key_len, uint8_t *out, const uint8_t *in, size_t nblocks) |
| Accelerated AES encryption in ECB mode. | |
| size_t | pbl_crypto_hw_aes_ecb_decrypt (const uint8_t *key, size_t key_len, uint8_t *out, const uint8_t *in, size_t nblocks) |
| Accelerated AES decryption in ECB mode. | |
Hardware hash and cipher acceleration used by Cryptography.
SHA-256 is provided by drivers that select CRYPTO_SHA256_HW_ACCEL, AES by drivers that select CRYPTO_AES_HW_ACCEL.
Each function processes a prefix of the blocks and returns how many. A driver processes none when the hardware cannot take the request, before it is ready or for any other reason; the crypto subsystem processes whatever is left in software.
| size_t pbl_crypto_hw_aes_ecb_decrypt | ( | const uint8_t * | key, |
| size_t | key_len, | ||
| uint8_t * | out, | ||
| const uint8_t * | in, | ||
| size_t | nblocks | ||
| ) |
Accelerated AES decryption in ECB mode.
| key | Key. | |
| key_len | Length of key in bytes: 16, 24 or 32. | |
| [out] | out | Plaintext, which may be in. |
| in | Ciphertext. | |
| nblocks | Number of 16-byte blocks in in. |
| size_t pbl_crypto_hw_aes_ecb_encrypt | ( | const uint8_t * | key, |
| size_t | key_len, | ||
| uint8_t * | out, | ||
| const uint8_t * | in, | ||
| size_t | nblocks | ||
| ) |
Accelerated AES encryption in ECB mode.
| key | Key. | |
| key_len | Length of key in bytes: 16, 24 or 32. | |
| [out] | out | Ciphertext, which may be in. |
| in | Plaintext. | |
| nblocks | Number of 16-byte blocks in in. |
| size_t pbl_crypto_hw_sha256_blocks | ( | uint32_t | state[8], |
| const void * | data, | ||
| size_t | nblocks | ||
| ) |
Accelerated SHA-256 compression.
Compresses blocks into a running chaining value, without padding.
| [in,out] | state | Chaining value, H0 to H7. |
| data | Blocks to hash. | |
| nblocks | Number of 64-byte blocks in data. |
state reflects exactly those.