mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-23 15:55:10 +01:00
Add AES-NI key expansion for 128 bits
This commit is contained in:
parent
01e31bbffb
commit
47a3536a31
3 changed files with 86 additions and 0 deletions
|
|
@ -91,6 +91,19 @@ int aesni_gcm_mult( unsigned char c[16],
|
|||
void aesni_inverse_key( unsigned char *invkey,
|
||||
const unsigned char *fwdkey, int nr );
|
||||
|
||||
/**
|
||||
* \brief Perform key expansion (for encryption)
|
||||
*
|
||||
* \param rk Destination buffer where the round keys are written
|
||||
* \param key Encryption key
|
||||
* \param bits Key size in bits (must be 128, 192 or 256)
|
||||
*
|
||||
* \return 0 if successful, or POLARSSL_ERR_AES_INVALID_KEY_LENGTH
|
||||
*/
|
||||
int aesni_setkey_enc( unsigned char *rk,
|
||||
const unsigned char *key,
|
||||
size_t bits );
|
||||
|
||||
#endif /* POLARSSL_HAVE_X86_64 */
|
||||
|
||||
#endif /* POLARSSL_AESNI_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue