Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: TYBLE16_simple_data_logger TYBLE16_MP3_Air
aesni.h File Reference
AES-NI for hardware AES acceleration on some Intel processors. More...
Go to the source code of this file.
Functions | |
int | mbedtls_aesni_has_support (unsigned int what) |
Internal function to detect the AES-NI feature in CPUs. | |
int | mbedtls_aesni_crypt_ecb (mbedtls_aes_context *ctx, int mode, const unsigned char input[16], unsigned char output[16]) |
Internal AES-NI AES-ECB block encryption and decryption. | |
void | mbedtls_aesni_gcm_mult (unsigned char c[16], const unsigned char a[16], const unsigned char b[16]) |
Internal GCM multiplication: c = a * b in GF(2^128) | |
void | mbedtls_aesni_inverse_key (unsigned char *invkey, const unsigned char *fwdkey, int nr) |
Internal round key inversion. | |
int | mbedtls_aesni_setkey_enc (unsigned char *rk, const unsigned char *key, size_t bits) |
Internal key expansion for encryption. |
Detailed Description
AES-NI for hardware AES acceleration on some Intel processors.
- Warning:
- These functions are only for internal use by other library functions; you must not call them directly.
Definition in file aesni.h.
Function Documentation
int mbedtls_aesni_crypt_ecb | ( | mbedtls_aes_context * | ctx, |
int | mode, | ||
const unsigned char | input[16], | ||
unsigned char | output[16] | ||
) |
Internal AES-NI AES-ECB block encryption and decryption.
- Note:
- This function is only for internal use by other library functions; you must not call it directly.
- Parameters:
-
ctx AES context mode MBEDTLS_AES_ENCRYPT or MBEDTLS_AES_DECRYPT input 16-byte input block output 16-byte output block
- Returns:
- 0 on success (cannot fail)
void mbedtls_aesni_gcm_mult | ( | unsigned char | c[16], |
const unsigned char | a[16], | ||
const unsigned char | b[16] | ||
) |
Internal GCM multiplication: c = a * b in GF(2^128)
- Note:
- This function is only for internal use by other library functions; you must not call it directly.
- Parameters:
-
c Result a First operand b Second operand
- Note:
- Both operands and result are bit strings interpreted as elements of GF(2^128) as per the GCM spec.
int mbedtls_aesni_has_support | ( | unsigned int | what ) |
Internal function to detect the AES-NI feature in CPUs.
- Note:
- This function is only for internal use by other library functions; you must not call it directly.
- Parameters:
-
what The feature to detect (MBEDTLS_AESNI_AES or MBEDTLS_AESNI_CLMUL)
- Returns:
- 1 if CPU has support for the feature, 0 otherwise
void mbedtls_aesni_inverse_key | ( | unsigned char * | invkey, |
const unsigned char * | fwdkey, | ||
int | nr | ||
) |
Internal round key inversion.
This function computes decryption round keys from the encryption round keys.
- Note:
- This function is only for internal use by other library functions; you must not call it directly.
- Parameters:
-
invkey Round keys for the equivalent inverse cipher fwdkey Original round keys (for encryption) nr Number of rounds (that is, number of round keys minus one)
int mbedtls_aesni_setkey_enc | ( | unsigned char * | rk, |
const unsigned char * | key, | ||
size_t | bits | ||
) |
Internal key expansion for encryption.
- Note:
- This function is only for internal use by other library functions; you must not call it directly.
- Parameters:
-
rk Destination buffer where the round keys are written key Encryption key bits Key size in bits (must be 128, 192 or 256)
- Returns:
- 0 if successful, or MBEDTLS_ERR_AES_INVALID_KEY_LENGTH
Generated on Tue Jul 12 2022 13:55:05 by
