Skip to content

Commit fdac63c

Browse files
committed
Fix CUDA with WOLFSSL_AES_SMALL_TABLES
1 parent d00a137 commit fdac63c

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

wolfcrypt/src/port/cuda/aes-cuda.cu

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ __global__ void AesEncrypt_C_CUDA(word32* rkBase, const byte* inBlockBase, byte*
670670
byte* outBlock = outBlockBase;
671671
word32* rk;
672672

673-
for (int i = index; i < sz; i += stride) {
673+
for (int i = idx; i < sz; i += stride) {
674674
rk = rkBase;
675675
inBlock = inBlockBase + i * 4 * sizeof(s0);
676676
outBlock = outBlockBase + i * 4 * sizeof(s0);
@@ -842,7 +842,8 @@ __global__ void AesEncrypt_C_CUDA(word32* rkBase, const byte* inBlockBase, byte*
842842
#endif
843843
#else
844844
#ifndef WC_NO_CACHE_RESISTANT
845-
s0 |= PreFetchSBox();
845+
PreFetchSBox(sBox);
846+
s0 |= sBox;
846847
#endif
847848

848849
r *= 2;

0 commit comments

Comments
 (0)