Botan 3.6.1
Crypto and TLS for C&
aes_power8.cpp File Reference
#include <botan/internal/aes.h>
#include <botan/internal/cpuid.h>
#include <altivec.h>

Go to the source code of this file.

Namespaces

namespace  Botan
 

Macros

#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)
 

Typedefs

typedef __vector unsigned int Botan::Altivec32x4
 
typedef __vector unsigned long long Botan::Altivec64x2
 
typedef __vector unsigned char Botan::Altivec8x16
 

Macro Definition Documentation

◆ 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 81 of file aes_power8.cpp.

81#define AES_DECRYPT_4(B0, B1, B2, B3, K) \
82 do { \
83 B0 = __builtin_crypto_vncipher(B0, K); \
84 B1 = __builtin_crypto_vncipher(B1, K); \
85 B2 = __builtin_crypto_vncipher(B2, K); \
86 B3 = __builtin_crypto_vncipher(B3, K); \
87 } 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 89 of file aes_power8.cpp.

89#define AES_DECRYPT_4_LAST(B0, B1, B2, B3, K) \
90 do { \
91 B0 = __builtin_crypto_vncipherlast(B0, K); \
92 B1 = __builtin_crypto_vncipherlast(B1, K); \
93 B2 = __builtin_crypto_vncipherlast(B2, K); \
94 B3 = __builtin_crypto_vncipherlast(B3, K); \
95 } 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 65 of file aes_power8.cpp.

65#define AES_ENCRYPT_4(B0, B1, B2, B3, K) \
66 do { \
67 B0 = __builtin_crypto_vcipher(B0, K); \
68 B1 = __builtin_crypto_vcipher(B1, K); \
69 B2 = __builtin_crypto_vcipher(B2, K); \
70 B3 = __builtin_crypto_vcipher(B3, K); \
71 } 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 73 of file aes_power8.cpp.

73#define AES_ENCRYPT_4_LAST(B0, B1, B2, B3, K) \
74 do { \
75 B0 = __builtin_crypto_vcipherlast(B0, K); \
76 B1 = __builtin_crypto_vcipherlast(B1, K); \
77 B2 = __builtin_crypto_vcipherlast(B2, K); \
78 B3 = __builtin_crypto_vcipherlast(B3, K); \
79 } 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 57 of file aes_power8.cpp.

57#define AES_XOR_4(B0, B1, B2, B3, K) \
58 do { \
59 B0 = vec_xor(B0, K); \
60 B1 = vec_xor(B1, K); \
61 B2 = vec_xor(B2, K); \
62 B3 = vec_xor(B3, K); \
63 } while(0)