mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-04-27 17:33:47 +02:00
Small fix for VAES.
This commit is contained in:
parent
b39d4bed16
commit
38fcefceee
1 changed files with 4 additions and 4 deletions
|
@ -429,7 +429,7 @@ void AES::CTR::p_aesNICrypt(const uint8_t *in, uint8_t *out, unsigned int len) n
|
||||||
if (likely(len >= 64)) {
|
if (likely(len >= 64)) {
|
||||||
|
|
||||||
#if defined(ZT_AES_VAES512) && defined(ZT_AES_VAES256)
|
#if defined(ZT_AES_VAES512) && defined(ZT_AES_VAES256)
|
||||||
if (Utils::CPUID.vaes && (len >= 256)) {
|
if (Utils::CPUID.vaes) {
|
||||||
if (Utils::CPUID.avx512f) {
|
if (Utils::CPUID.avx512f) {
|
||||||
p_aesCtrInnerVAES512(len, _ctr[0], c1, in, out, k);
|
p_aesCtrInnerVAES512(len, _ctr[0], c1, in, out, k);
|
||||||
} else {
|
} else {
|
||||||
|
@ -441,9 +441,9 @@ void AES::CTR::p_aesNICrypt(const uint8_t *in, uint8_t *out, unsigned int len) n
|
||||||
|
|
||||||
#if !defined(ZT_AES_VAES512) && defined(ZT_AES_VAES256)
|
#if !defined(ZT_AES_VAES512) && defined(ZT_AES_VAES256)
|
||||||
if (Utils::CPUID.vaes && (len >= 256)) {
|
if (Utils::CPUID.vaes && (len >= 256)) {
|
||||||
p_aesCtrInnerVAES256(len, _ctr[0], c1, in, out, k);
|
p_aesCtrInnerVAES256(len, _ctr[0], c1, in, out, k);
|
||||||
goto skip_conventional_aesni_64;
|
goto skip_conventional_aesni_64;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const uint8_t *const eof64 = in + (len & ~((unsigned int)63));
|
const uint8_t *const eof64 = in + (len & ~((unsigned int)63));
|
||||||
|
|
Loading…
Add table
Reference in a new issue