#include <botan/aes.h>
#include <botan/cpuid.h>
#include <altivec.h>
Go to the source code of this file.
|
#define | AES_DECRYPT_4(B0, B1, B2, B3, K) |
|
#define | AES_DECRYPT_4_LAST(B0, B1, B2, B3, K) |
|
#define | AES_ENCRYPT_4(B0, B1, B2, B3, K) |
|
#define | AES_ENCRYPT_4_LAST(B0, B1, B2, B3, K) |
|
#define | AES_XOR_4(B0, B1, B2, B3, K) |
|
◆ AES_DECRYPT_4
#define AES_DECRYPT_4 |
( |
|
B0, |
|
|
|
B1, |
|
|
|
B2, |
|
|
|
B3, |
|
|
|
K |
|
) |
| |
Value: do { \
B0 = __builtin_crypto_vncipher(B0, K); \
B1 = __builtin_crypto_vncipher(B1, K); \
B2 = __builtin_crypto_vncipher(B2, K); \
B3 = __builtin_crypto_vncipher(B3, K); \
} while(0)
Definition at line 87 of file aes_power8.cpp.
87 { \
88 B0 = __builtin_crypto_vncipher(B0, K); \
89 B1 = __builtin_crypto_vncipher(B1, K); \
90 B2 = __builtin_crypto_vncipher(B2, K); \
91 B3 = __builtin_crypto_vncipher(B3, K); \
92 } while(0)
◆ AES_DECRYPT_4_LAST
#define AES_DECRYPT_4_LAST |
( |
|
B0, |
|
|
|
B1, |
|
|
|
B2, |
|
|
|
B3, |
|
|
|
K |
|
) |
| |
Value: do { \
B0 = __builtin_crypto_vncipherlast(B0, K); \
B1 = __builtin_crypto_vncipherlast(B1, K); \
B2 = __builtin_crypto_vncipherlast(B2, K); \
B3 = __builtin_crypto_vncipherlast(B3, K); \
} while(0)
Definition at line 94 of file aes_power8.cpp.
94 { \
95 B0 = __builtin_crypto_vncipherlast(B0, K); \
96 B1 = __builtin_crypto_vncipherlast(B1, K); \
97 B2 = __builtin_crypto_vncipherlast(B2, K); \
98 B3 = __builtin_crypto_vncipherlast(B3, K); \
99 } while(0)
◆ AES_ENCRYPT_4
#define AES_ENCRYPT_4 |
( |
|
B0, |
|
|
|
B1, |
|
|
|
B2, |
|
|
|
B3, |
|
|
|
K |
|
) |
| |
Value: do { \
B0 = __builtin_crypto_vcipher(B0, K); \
B1 = __builtin_crypto_vcipher(B1, K); \
B2 = __builtin_crypto_vcipher(B2, K); \
B3 = __builtin_crypto_vcipher(B3, K); \
} while(0)
Definition at line 73 of file aes_power8.cpp.
73 { \
74 B0 = __builtin_crypto_vcipher(B0, K); \
75 B1 = __builtin_crypto_vcipher(B1, K); \
76 B2 = __builtin_crypto_vcipher(B2, K); \
77 B3 = __builtin_crypto_vcipher(B3, K); \
78 } while(0)
◆ AES_ENCRYPT_4_LAST
#define AES_ENCRYPT_4_LAST |
( |
|
B0, |
|
|
|
B1, |
|
|
|
B2, |
|
|
|
B3, |
|
|
|
K |
|
) |
| |
Value: do { \
B0 = __builtin_crypto_vcipherlast(B0, K); \
B1 = __builtin_crypto_vcipherlast(B1, K); \
B2 = __builtin_crypto_vcipherlast(B2, K); \
B3 = __builtin_crypto_vcipherlast(B3, K); \
} while(0)
Definition at line 80 of file aes_power8.cpp.
80 { \
81 B0 = __builtin_crypto_vcipherlast(B0, K); \
82 B1 = __builtin_crypto_vcipherlast(B1, K); \
83 B2 = __builtin_crypto_vcipherlast(B2, K); \
84 B3 = __builtin_crypto_vcipherlast(B3, K); \
85 } while(0)
◆ AES_XOR_4
#define AES_XOR_4 |
( |
|
B0, |
|
|
|
B1, |
|
|
|
B2, |
|
|
|
B3, |
|
|
|
K |
|
) |
| |
Value: do { \
B0 = vec_xor(B0, K); \
B1 = vec_xor(B1, K); \
B2 = vec_xor(B2, K); \
B3 = vec_xor(B3, K); \
} while(0)
Definition at line 66 of file aes_power8.cpp.
66 { \
67 B0 = vec_xor(B0, K); \
68 B1 = vec_xor(B1, K); \
69 B2 = vec_xor(B2, K); \
70 B3 = vec_xor(B3, K); \
71 } while(0)