Botan: src/block/aes_ni/aes_ni.cpp File Reference

Botan 1.10.17

Namespaces | Macros
aes_ni.cpp File Reference
`#include <botan/aes_ni.h>`
`#include <botan/loadstor.h>`
`#include <wmmintrin.h>`

Go to the source code of this file.

## Namespaces
| Botan

## Macros
#define | AES_128_key_exp(K, RCON) aes_128_key_expansion(K, _mm_aeskeygenassist_si128(K, RCON))
#define | AES_192_key_exp(RCON, EK_OFF)
#define | AES_DEC_4_LAST_ROUNDS(K)
#define | AES_DEC_4_ROUNDS(K)
#define | AES_ENC_4_LAST_ROUNDS(K)
#define | AES_ENC_4_ROUNDS(K)

## Macro Definition Documentation

## ◆ AES_128_key_exp

#define AES_128_key_exp | ( |  | K,
|  |  | RCON
| ) |  | aes_128_key_expansion(K, _mm_aeskeygenassist_si128(K, RCON))

## ◆ AES_192_key_exp

#define AES_192_key_exp | ( |  | RCON,
|  |  | EK_OFF
| ) |  |

Value:
aes_192_key_expansion(&K0, &K1, \
_mm_aeskeygenassist_si128(K1, RCON), \
EK + EK_OFF, EK_OFF == 48)

## ◆ AES_DEC_4_LAST_ROUNDS

#define AES_DEC_4_LAST_ROUNDS | ( |  | K | ) |

Value:
do \
{ \
B0 = _mm_aesdeclast_si128(B0, K); \
B1 = _mm_aesdeclast_si128(B1, K); \
B2 = _mm_aesdeclast_si128(B2, K); \
B3 = _mm_aesdeclast_si128(B3, K); \
} while(0)

Definition at line 94 of file aes_ni.cpp.

Referenced by Botan::AES_128_NI::decrypt_n(), Botan::AES_192_NI::decrypt_n(), and Botan::AES_256_NI::decrypt_n().

## ◆ AES_DEC_4_ROUNDS

#define AES_DEC_4_ROUNDS | ( |  | K | ) |

Value:
do \
{ \
B0 = _mm_aesdec_si128(B0, K); \
B1 = _mm_aesdec_si128(B1, K); \
B2 = _mm_aesdec_si128(B2, K); \
B3 = _mm_aesdec_si128(B3, K); \
} while(0)

Definition at line 85 of file aes_ni.cpp.

Referenced by Botan::AES_128_NI::decrypt_n(), Botan::AES_192_NI::decrypt_n(), and Botan::AES_256_NI::decrypt_n().

## ◆ AES_ENC_4_LAST_ROUNDS

#define AES_ENC_4_LAST_ROUNDS | ( |  | K | ) |

Value:
do \
{ \
B0 = _mm_aesenclast_si128(B0, K); \
B1 = _mm_aesenclast_si128(B1, K); \
B2 = _mm_aesenclast_si128(B2, K); \
B3 = _mm_aesenclast_si128(B3, K); \
} while(0)

Definition at line 76 of file aes_ni.cpp.

Referenced by Botan::AES_128_NI::encrypt_n(), Botan::AES_192_NI::encrypt_n(), and Botan::AES_256_NI::encrypt_n().

## ◆ AES_ENC_4_ROUNDS

#define AES_ENC_4_ROUNDS | ( |  | K | ) |

Value:
do \
{ \
B0 = _mm_aesenc_si128(B0, K); \
B1 = _mm_aesenc_si128(B1, K); \
B2 = _mm_aesenc_si128(B2, K); \
B3 = _mm_aesenc_si128(B3, K); \
} while(0)

Definition at line 67 of file aes_ni.cpp.

Referenced by Botan::AES_128_NI::encrypt_n(), Botan::AES_192_NI::encrypt_n(), and Botan::AES_256_NI::encrypt_n().