107#ifndef CRYPTOPP_PPC_CRYPTO_H
108#define CRYPTOPP_PPC_CRYPTO_H
113#if defined(__ALTIVEC__)
124#ifndef CRYPTOPP_DISABLE_POWER7
125# if defined(_AIX) && defined(_ARCH_PWR7) && defined(__xlC__)
134#ifndef CRYPTOPP_DISABLE_POWER8
135# if defined(_AIX) && defined(_ARCH_PWR8) && defined(__xlC__)
145#define CONST_V8_CAST(x) ((unsigned char*)(x))
151#define CONST_V32_CAST(x) ((unsigned int*)(x))
157#define CONST_V64_CAST(x) ((unsigned long long*)(x))
163#define NCONST_V8_CAST(x) ((unsigned char*)(x))
169#define NCONST_V32_CAST(x) ((unsigned int*)(x))
175#define NCONST_V64_CAST(x) ((unsigned long long*)(x))
179#if CRYPTOPP_GCC_DIAGNOSTIC_AVAILABLE
180# pragma GCC diagnostic push
181# pragma GCC diagnostic ignored "-Wdeprecated"
186#if defined(__ALTIVEC__) || defined(CRYPTOPP_DOXYGEN_PROCESSING)
204#if defined(__VSX__) || defined(_ARCH_PWR8) || defined(CRYPTOPP_DOXYGEN_PROCESSING)
244#if defined(CRYPTOPP_BIG_ENDIAN)
245 const uint8x16_p mask = {15,14,13,12, 11,10,9,8, 7,6,5,4, 3,2,1,0};
246 return (T)vec_perm(data, data, mask);
248 const uint8x16_p mask = {0,1,2,3, 4,5,6,7, 8,9,10,11, 12,13,14,15};
249 return (T)vec_perm(data, data, mask);
265#if defined(CRYPTOPP_LITTLE_ENDIAN)
266 const uint8x16_p mask = {15,14,13,12, 11,10,9,8, 7,6,5,4, 3,2,1,0};
267 return (T)vec_perm(data, data, mask);
285#if defined(CRYPTOPP_BIG_ENDIAN)
286 const uint8x16_p mask = {15,14,13,12, 11,10,9,8, 7,6,5,4, 3,2,1,0};
287 return (T)vec_perm(data, data, mask);
311 const uintptr_t addr =
reinterpret_cast<uintptr_t
>(src);
342 const uintptr_t addr =
reinterpret_cast<uintptr_t
>(src)+off;
375 const uintptr_t addr =
reinterpret_cast<uintptr_t
>(src);
377 CRYPTOPP_UNUSED(addr);
379#if defined(_ARCH_PWR9)
405 const uintptr_t addr =
reinterpret_cast<uintptr_t
>(src)+off;
407 CRYPTOPP_UNUSED(addr);
409#if defined(_ARCH_PWR9)
434 const uintptr_t addr =
reinterpret_cast<uintptr_t
>(src);
436 CRYPTOPP_UNUSED(addr);
438#if defined(_ARCH_PWR9)
440#elif defined(__VSX__) || defined(_ARCH_PWR8)
466 const uintptr_t addr =
reinterpret_cast<uintptr_t
>(src)+off;
468 CRYPTOPP_UNUSED(addr);
470#if defined(_ARCH_PWR9)
472#elif defined(__VSX__) || defined(_ARCH_PWR8)
479#if defined(__VSX__) || defined(_ARCH_PWR8) || defined(CRYPTOPP_DOXYGEN_PROCESSING)
500 const uintptr_t addr =
reinterpret_cast<uintptr_t
>(src);
502 CRYPTOPP_UNUSED(addr);
504#if defined(_ARCH_PWR9)
506#elif defined(__VSX__) || defined(_ARCH_PWR8)
534 const uintptr_t addr =
reinterpret_cast<uintptr_t
>(src)+off;
536 CRYPTOPP_UNUSED(addr);
538#if defined(_ARCH_PWR9)
540#elif defined(__VSX__) || defined(_ARCH_PWR8)
566 const uintptr_t addr =
reinterpret_cast<uintptr_t
>(src);
568 CRYPTOPP_UNUSED(addr);
570#if defined(_ARCH_PWR9)
594 const uintptr_t addr =
reinterpret_cast<uintptr_t
>(src)+off;
596 CRYPTOPP_UNUSED(addr);
598#if defined(_ARCH_PWR9)
621 const uintptr_t addr =
reinterpret_cast<uintptr_t
>(src);
623 CRYPTOPP_UNUSED(addr);
625#if defined(_ARCH_PWR9)
627#elif defined(__VSX__) || defined(_ARCH_PWR8)
651 const uintptr_t addr =
reinterpret_cast<uintptr_t
>(src)+off;
653 CRYPTOPP_UNUSED(addr);
655#if defined(_ARCH_PWR9)
657#elif defined(__VSX__) || defined(_ARCH_PWR8)
664#if defined(__VSX__) || defined(_ARCH_PWR8) || defined(CRYPTOPP_DOXYGEN_PROCESSING)
682 const uintptr_t addr =
reinterpret_cast<uintptr_t
>(src);
684 CRYPTOPP_UNUSED(addr);
686#if defined(_ARCH_PWR9)
688#elif defined(__VSX__) || defined(_ARCH_PWR8)
713 const uintptr_t addr =
reinterpret_cast<uintptr_t
>(src)+off;
715 CRYPTOPP_UNUSED(addr);
717#if defined(_ARCH_PWR9)
719#elif defined(__VSX__) || defined(_ARCH_PWR8)
748 const uintptr_t addr =
reinterpret_cast<uintptr_t
>(src);
750 CRYPTOPP_UNUSED(addr);
752#if defined(_ARCH_PWR9)
755#elif defined(CRYPTOPP_BIG_ENDIAN)
782 const uintptr_t addr =
reinterpret_cast<uintptr_t
>(src)+off;
784 CRYPTOPP_UNUSED(addr);
786#if defined(_ARCH_PWR9)
789#elif defined(CRYPTOPP_BIG_ENDIAN)
820 uintptr_t addr =
reinterpret_cast<uintptr_t
>(dest);
860 uintptr_t addr =
reinterpret_cast<uintptr_t
>(dest)+off;
901 const uintptr_t addr =
reinterpret_cast<uintptr_t
>(dest);
903 CRYPTOPP_UNUSED(addr);
905#if defined(_ARCH_PWR9)
928inline void VecStore(
const T data,
int off,
byte dest[16])
934 const uintptr_t addr =
reinterpret_cast<uintptr_t
>(dest)+off;
936 CRYPTOPP_UNUSED(addr);
938#if defined(_ARCH_PWR9)
966 const uintptr_t addr =
reinterpret_cast<uintptr_t
>(dest);
968 CRYPTOPP_UNUSED(addr);
970#if defined(_ARCH_PWR9)
972#elif defined(__VSX__) || defined(_ARCH_PWR8)
1001 const uintptr_t addr =
reinterpret_cast<uintptr_t
>(dest)+off;
1003 CRYPTOPP_UNUSED(addr);
1005#if defined(_ARCH_PWR9)
1007#elif defined(__VSX__) || defined(_ARCH_PWR8)
1036 const uintptr_t addr =
reinterpret_cast<uintptr_t
>(dest);
1038 CRYPTOPP_UNUSED(addr);
1040#if defined(_ARCH_PWR9)
1042#elif defined(__VSX__) || defined(_ARCH_PWR8)
1073 const uintptr_t addr =
reinterpret_cast<uintptr_t
>(dest)+off;
1075 CRYPTOPP_UNUSED(addr);
1077#if defined(_ARCH_PWR9)
1079#elif defined(__VSX__) || defined(_ARCH_PWR8)
1106 const uintptr_t addr =
reinterpret_cast<uintptr_t
>(dest);
1108 CRYPTOPP_UNUSED(addr);
1110#if defined(_ARCH_PWR9)
1137 const uintptr_t addr =
reinterpret_cast<uintptr_t
>(dest)+off;
1139 CRYPTOPP_UNUSED(addr);
1141#if defined(_ARCH_PWR9)
1168 const uintptr_t addr =
reinterpret_cast<uintptr_t
>(dest);
1170 CRYPTOPP_UNUSED(addr);
1172#if defined(_ARCH_PWR9)
1174#elif defined(__VSX__) || defined(_ARCH_PWR8)
1202 const uintptr_t addr =
reinterpret_cast<uintptr_t
>(dest)+off;
1204 CRYPTOPP_UNUSED(addr);
1206#if defined(_ARCH_PWR9)
1208#elif defined(__VSX__) || defined(_ARCH_PWR8)
1237 const uintptr_t addr =
reinterpret_cast<uintptr_t
>(dest);
1239 CRYPTOPP_UNUSED(addr);
1241#if defined(_ARCH_PWR9)
1243#elif defined(CRYPTOPP_BIG_ENDIAN)
1273 const uintptr_t addr =
reinterpret_cast<uintptr_t
>(dest)+off;
1275 CRYPTOPP_UNUSED(addr);
1277#if defined(_ARCH_PWR9)
1279#elif defined(CRYPTOPP_BIG_ENDIAN)
1308 const uintptr_t addr =
reinterpret_cast<uintptr_t
>(dest);
1310 CRYPTOPP_UNUSED(addr);
1312#if defined(_ARCH_PWR9)
1314#elif defined(CRYPTOPP_BIG_ENDIAN)
1344 const uintptr_t addr =
reinterpret_cast<uintptr_t
>(dest)+off;
1346 CRYPTOPP_UNUSED(addr);
1348#if defined(_ARCH_PWR9)
1350#elif defined(CRYPTOPP_BIG_ENDIAN)
1375template <
class T1,
class T2>
1376inline T1
VecAnd(
const T1 vec1,
const T2 vec2)
1378 return (T1)vec_and(vec1, (T1)vec2);
1394template <
class T1,
class T2>
1395inline T1
VecOr(
const T1 vec1,
const T2 vec2)
1397 return (T1)vec_or(vec1, (T1)vec2);
1413template <
class T1,
class T2>
1414inline T1
VecXor(
const T1 vec1,
const T2 vec2)
1416 return (T1)vec_xor(vec1, (T1)vec2);
1437template <
class T1,
class T2>
1438inline T1
VecAdd(
const T1 vec1,
const T2 vec2)
1440 return (T1)vec_add(vec1, (T1)vec2);
1455template <
class T1,
class T2>
1456inline T1
VecSub(
const T1 vec1,
const T2 vec2)
1458 return (T1)vec_sub(vec1, (T1)vec2);
1477template <
class T1,
class T2>
1480 return (T1)vec_perm(vec, vec, (
uint8x16_p)mask);
1495template <
class T1,
class T2>
1498 return (T1)vec_perm(vec1, (T1)vec2, (
uint8x16_p)mask);
1527template <
unsigned int C,
class T>
1543#if defined(CRYPTOPP_BIG_ENDIAN)
1547 enum { R=(16-C)&0xf };
1574template <
unsigned int C,
class T>
1590#if defined(CRYPTOPP_BIG_ENDIAN)
1591 enum { R=(16-C)&0xf };
1613template <
unsigned int C,
class T>
1616#if defined(CRYPTOPP_BIG_ENDIAN)
1620 enum { R=(16-C)&0xf };
1638template <
unsigned int C,
class T>
1641#if defined(CRYPTOPP_BIG_ENDIAN)
1642 enum { R=(16-C)&0xf };
1659template<
unsigned int C>
1663 return vec_rl(vec, m);
1675template<
unsigned int C>
1678 const uint32x4_p m = {32-C, 32-C, 32-C, 32-C};
1679 return vec_rl(vec, m);
1691template<
unsigned int C>
1695 return vec_sl(vec, m);
1707template<
unsigned int C>
1711 return vec_sr(vec, m);
1715#if defined(_ARCH_PWR8) || defined(CRYPTOPP_DOXYGEN_PROCESSING)
1728template<
unsigned int C>
1732 return vec_rl(vec, m);
1746template<
unsigned int C>
1750 return vec_sl(vec, m);
1764template<
unsigned int C>
1768 return vec_rl(vec, m);
1782template<
unsigned int C>
1786 return vec_sr(vec, m);
1807 return vec_mergel(vec1, vec2);
1821 return vec_mergeh(vec1, vec2);
1833 CRYPTOPP_UNUSED(val);
1837#if defined(_ARCH_PWR4) && defined(__GNUC__)
1838 return vec_splats(val);
1842 const word32 x[4] = {val};
1843 return vec_splat(
VecLoad(x),0);
1854template <
unsigned int N>
1857 return vec_splat(val, N);
1860#if defined(__VSX__) || defined(_ARCH_PWR8) || defined(CRYPTOPP_DOXYGEN_PROCESSING)
1870 return vec_splats((
unsigned long long)val);
1880template <
unsigned int N>
1883#if defined(__VSX__) || defined(_ARCH_PWR8)
1884 return vec_splat(val, N);
1889 const uint8x16_p m = {0,1,2,3, 4,5,6,7, 0,1,2,3, 4,5,6,7};
1890 return vec_perm(val, val, m);
1894 const uint8x16_p m = {8,9,10,11, 12,13,14,15, 8,9,10,11, 12,13,14,15};
1895 return vec_perm(val, val, m);
1915#if defined(CRYPTOPP_BIG_ENDIAN) && (defined(__VSX__) || defined(_ARCH_PWR8))
1919 return VecShiftRightOctet<8>(VecShiftLeftOctet<8>(val));
1937#if defined(CRYPTOPP_BIG_ENDIAN) && (defined(__VSX__) || defined(_ARCH_PWR8))
1941 return VecShiftRightOctet<8>(val);
1974template <
class T1,
class T2>
1991template <
class T1,
class T2>
2017#if defined(_ARCH_PWR8) && !defined(CRYPTOPP_DEBUG)
2023#if defined(CRYPTOPP_BIG_ENDIAN)
2033 cy = vec_and(mask, cy);
2034 cy = vec_sld (cy, zero, 4);
2035 return vec_add(res, cy);
2039#if defined(_ARCH_PWR8) || defined(CRYPTOPP_DOXYGEN_PROCESSING)
2055#if defined(CRYPTOPP_DEBUG)
2079#if defined(_ARCH_PWR8) && !defined(CRYPTOPP_DEBUG)
2086#if defined(CRYPTOPP_BIG_ENDIAN)
2098 bw = vec_andc(mask, bw);
2099 bw = vec_sld (bw, zero, 4);
2100 return vec_sub(res, bw);
2104#if defined(_ARCH_PWR8) || defined(CRYPTOPP_DOXYGEN_PROCESSING)
2119#if defined(CRYPTOPP_DEBUG)
2141template<
unsigned int C>
2144#if defined(_ARCH_PWR8) && !defined(CRYPTOPP_DEBUG)
2149 enum {S64=C&63, S32=C&31, BR=(S64>=32)};
2158 const uint8x16_p m = {0,1,2,3, 4,5,6,7, 8,9,10,11, 12,13,14,15};
2163 const uint8x16_p m = {4,5,6,7, 0,1,2,3, 12,13,14,15, 8,9,10,11};
2168 const uint8x16_p m = {4,5,6,7, 0,1,2,3, 12,13,14,15, 8,9,10,11};
2173 const uint8x16_p m = {4,5,6,7, 0,1,2,3, 12,13,14,15, 8,9,10,11};
2177 return vec_or(t1, t2);
2193#if (CRYPTOPP_BIG_ENDIAN)
2194 const uint8x16_p m = { 1,2,3,4, 5,6,7,0, 9,10,11,12, 13,14,15,8 };
2197 const uint8x16_p m = { 7,0,1,2, 3,4,5,6, 15,8,9,10, 11,12,13,14 };
2202#if defined(_ARCH_PWR8) || defined(CRYPTOPP_DOXYGEN_PROCESSING)
2212template<
unsigned int C>
2216 const uint64x2_p res = VecRotateLeft<C>(vec);
2218#if defined(CRYPTOPP_DEBUG)
2239template<
unsigned int C>
2242#if defined(_ARCH_PWR8) && !defined(CRYPTOPP_DEBUG)
2247 enum {S64=C&63, S32=C&31, BR=(S64>=32)};
2256 const uint8x16_p m = {0,1,2,3, 4,5,6,7, 8,9,10,11, 12,13,14,15};
2261 const uint8x16_p m = {4,5,6,7, 0,1,2,3, 12,13,14,15, 8,9,10,11};
2266 const uint8x16_p m = {4,5,6,7, 0,1,2,3, 12,13,14,15, 8,9,10,11};
2271 const uint8x16_p m = {4,5,6,7, 0,1,2,3, 12,13,14,15, 8,9,10,11};
2275 return vec_or(t1, t2);
2292#if (CRYPTOPP_BIG_ENDIAN)
2293 const uint8x16_p m = { 7,0,1,2, 3,4,5,6, 15,8,9,10, 11,12,13,14 };
2296 const uint8x16_p m = { 1,2,3,4, 5,6,7,0, 9,10,11,12, 13,14,15,8 };
2301#if defined(__VSX__) || defined(_ARCH_PWR8) || defined(CRYPTOPP_DOXYGEN_PROCESSING)
2311template<
unsigned int C>
2315 const uint64x2_p res = VecRotateRight<C>(vec);
2317#if defined(CRYPTOPP_DEBUG)
2342template <
class T1,
class T2>
2345 return (T1)vec_and(vec1, (T1)vec2);
2361template <
class T1,
class T2>
2364 return (T1)vec_or(vec1, (T1)vec2);
2380template <
class T1,
class T2>
2383 return (T1)vec_xor(vec1, (T1)vec2);
2394#if defined(_ARCH_PWR8)
2396 return (
uint32x4_p)vec_splats((
unsigned long long)val);
2398 const word64 x[2] = {val,val};
2410template <
unsigned int N>
2413#if defined(__VSX__) || defined(_ARCH_PWR8)
2419 const uint8x16_p m = {0,1,2,3, 4,5,6,7, 0,1,2,3, 4,5,6,7};
2424 const uint8x16_p m = {8,9,10,11, 12,13,14,15, 8,9,10,11, 12,13,14,15};
2430#if defined(__VSX__) || defined(_ARCH_PWR8) || defined(CRYPTOPP_DOXYGEN_PROCESSING)
2436template <
unsigned int N>
2439 return vec_splat(val, N);
2449#if (defined(_ARCH_PWR8) && defined(__CRYPTO__)) || defined(CRYPTOPP_DOXYGEN_PROCESSING)
2470#if defined(__ibmxl__) || (defined(_AIX) && defined(__xlC__))
2471 return __vpmsumw (a, b);
2472#elif defined(__clang__)
2473 return __builtin_altivec_crypto_vpmsumw (a, b);
2475 return __builtin_crypto_vpmsumw (a, b);
2495#if defined(__ibmxl__) || (defined(_AIX) && defined(__xlC__))
2496 return __vpmsumd (a, b);
2497#elif defined(__clang__)
2498 return __builtin_altivec_crypto_vpmsumd (a, b);
2500 return __builtin_crypto_vpmsumd (a, b);
2519#if defined(CRYPTOPP_BIG_ENDIAN)
2541#if defined(CRYPTOPP_BIG_ENDIAN)
2563#if defined(CRYPTOPP_BIG_ENDIAN)
2585#if defined(CRYPTOPP_BIG_ENDIAN)
2608template <
class T1,
class T2>
2611#if defined(__ibmxl__) || (defined(_AIX) && defined(__xlC__))
2613#elif defined(__clang__)
2615#elif defined(__GNUC__)
2633template <
class T1,
class T2>
2636#if defined(__ibmxl__) || (defined(_AIX) && defined(__xlC__))
2638#elif defined(__clang__)
2640#elif defined(__GNUC__)
2658template <
class T1,
class T2>
2661#if defined(__ibmxl__) || (defined(_AIX) && defined(__xlC__))
2663#elif defined(__clang__)
2665#elif defined(__GNUC__)
2683template <
class T1,
class T2>
2686#if defined(__ibmxl__) || (defined(_AIX) && defined(__xlC__))
2688#elif defined(__clang__)
2690#elif defined(__GNUC__)
2713template <
int func,
int fmask,
class T>
2716#if defined(__ibmxl__) || (defined(_AIX) && defined(__xlC__))
2717 return (T)__vshasigmaw((
uint32x4_p)data, func, fmask);
2718#elif defined(__clang__)
2719 return (T)__builtin_altivec_crypto_vshasigmaw((
uint32x4_p)data, func, fmask);
2720#elif defined(__GNUC__)
2721 return (T)__builtin_crypto_vshasigmaw((
uint32x4_p)data, func, fmask);
2738template <
int func,
int fmask,
class T>
2741#if defined(__ibmxl__) || (defined(_AIX) && defined(__xlC__))
2742 return (T)__vshasigmad((
uint64x2_p)data, func, fmask);
2743#elif defined(__clang__)
2744 return (T)__builtin_altivec_crypto_vshasigmad((
uint64x2_p)data, func, fmask);
2745#elif defined(__GNUC__)
2746 return (T)__builtin_crypto_vshasigmad((
uint64x2_p)data, func, fmask);
2760#if CRYPTOPP_GCC_DIAGNOSTIC_AVAILABLE
2761# pragma GCC diagnostic pop
Library configuration file.
unsigned int word32
32-bit unsigned datatype
unsigned long long word64
64-bit unsigned datatype
Utility functions for the Crypto++ library.
Crypto++ library namespace.
uint32x4_p VecZero()
The 0 vector.
uint32x4_p VecRotateRight(const uint32x4_p vec)
Rotate a vector right.
T1 VecOr(const T1 vec1, const T2 vec2)
OR two vectors.
T VecSHA512(const T data)
SHA512 Sigma functions.
uint32x4_p VecLoadBE(const byte src[16])
Loads a vector from a byte array.
void VecStore_ALTIVEC(const T data, byte dest[16])
Stores a vector to a byte array.
T1 VecOr64(const T1 vec1, const T2 vec2)
OR two vectors as if uint64x2_p.
uint32x4_p VecLoadAligned(const byte src[16])
Loads a vector from an aligned byte array.
T VecRotateRightOctet(const T vec)
Rotate a vector right.
T VecShiftRightOctet(const T vec)
Shift a vector right.
__vector unsigned int uint32x4_p
Vector of 32-bit elements.
void VecStoreBE(const T data, byte dest[16])
Stores a vector to a byte array.
T VecShiftLeftOctet(const T vec)
Shift a vector left.
T VecSHA256(const T data)
SHA256 Sigma functions.
uint32x4_p VecSub64(const uint32x4_p &vec1, const uint32x4_p &vec2)
Subtract two vectors as if uint64x2_p.
uint32x4_p VecLoad_ALTIVEC(const byte src[16])
Loads a vector from a byte array.
T1 VecPermute(const T1 vec, const T2 mask)
Permutes a vector.
uint64x2_p VecIntelMultiply00(const uint64x2_p &a, const uint64x2_p &b)
Polynomial multiplication.
T VecReverseLE(const T data)
Reverse bytes in a vector.
T VecMergeHigh(const T vec1, const T vec2)
Merge two vectors.
uint32x4_p VecSplatElement(const uint32x4_p val)
Broadcast 32-bit element to a vector.
__vector unsigned char uint8x16_p
Vector of 8-bit elements.
bool VecNotEqual(const T1 vec1, const T2 vec2)
Compare two vectors.
T1 VecXor(const T1 vec1, const T2 vec2)
XOR two vectors.
__vector unsigned long long uint64x2_p
Vector of 64-bit elements.
T1 VecSub(const T1 vec1, const T2 vec2)
Subtract two vectors.
void VecStoreAligned(const T data, byte dest[16])
Stores a vector to a byte array.
#define NCONST_V32_CAST(x)
Cast array to vector pointer.
bool VecEqual(const T1 vec1, const T2 vec2)
Compare two vectors.
T1 VecEncryptLast(const T1 state, const T2 key)
Final round of AES encryption.
uint32x4_p VecSplatElement64(const uint32x4_p val)
Broadcast 64-bit element to a vector as if uint64x2_p.
T VecMergeLow(const T vec1, const T vec2)
Merge two vectors.
#define CONST_V8_CAST(x)
Cast array to vector pointer.
T1 VecXor64(const T1 vec1, const T2 vec2)
XOR two vectors as if uint64x2_p.
T1 VecEncrypt(const T1 state, const T2 key)
One round of AES encryption.
T1 VecDecryptLast(const T1 state, const T2 key)
Final round of AES decryption.
uint32x4_p VecPolyMultiply(const uint32x4_p &a, const uint32x4_p &b)
Polynomial multiplication.
uint32x4_p VecRotateRight64(const uint32x4_p vec)
Rotate a vector right as if uint64x2_p.
T1 VecAdd(const T1 vec1, const T2 vec2)
Add two vectors.
uint32x4_p VecRotateLeft(const uint32x4_p vec)
Rotate a vector left.
T VecRotateLeftOctet(const T vec)
Rotate a vector left.
uint32x4_p VecSplatWord64(word64 val)
Broadcast 64-bit double word to a vector.
uint64x2_p VecIntelMultiply11(const uint64x2_p &a, const uint64x2_p &b)
Polynomial multiplication.
T1 VecAnd(const T1 vec1, const T2 vec2)
AND two vectors.
uint32x4_p VecShiftRight(const uint32x4_p vec)
Shift a vector right.
T VecGetHigh(const T val)
Extract a dword from a vector.
uint32x4_p VecRotateRight64< 8 >(const uint32x4_p vec)
Rotate a vector right as if uint64x2_p.
T1 VecDecrypt(const T1 state, const T2 key)
One round of AES decryption.
#define NCONST_V8_CAST(x)
Cast array to vector pointer.
void VecStore(const T data, byte dest[16])
Stores a vector to a byte array.
T VecReverse(const T data)
Reverse bytes in a vector.
uint32x4_p VecShiftLeft(const uint32x4_p vec)
Shift a vector left.
#define CONST_V32_CAST(x)
Cast array to vector pointer.
uint32x4_p VecSplatWord(word32 val)
Broadcast 32-bit word to a vector.
uint64x2_p VecIntelMultiply01(const uint64x2_p &a, const uint64x2_p &b)
Polynomial multiplication.
uint32x4_p VecOne()
The 1 vector.
T VecReverseBE(const T data)
Reverse bytes in a vector.
T VecGetLow(const T val)
Extract a dword from a vector.
uint32x4_p VecAdd64(const uint32x4_p &vec1, const uint32x4_p &vec2)
Add two vectors as if uint64x2_p.
T VecSwapWords(const T vec)
Exchange high and low double words.
__vector unsigned short uint16x8_p
Vector of 16-bit elements.
uint32x4_p VecLoad(const byte src[16])
Loads a vector from a byte array.
uint32x4_p VecRotateLeft64(const uint32x4_p vec)
Rotate a vector left as if uint64x2_p.
uint64x2_p VecIntelMultiply10(const uint64x2_p &a, const uint64x2_p &b)
Polynomial multiplication.
uint32x4_p VecRotateLeft64< 8 >(const uint32x4_p vec)
Rotate a vector left as if uint64x2_p.
T1 VecAnd64(const T1 vec1, const T2 vec2)
AND two vectors as if uint64x2_p.
#define CRYPTOPP_ASSERT(exp)
Debugging and diagnostic assertion.