| author | |
| committer | |
| log | 0423f0f7d8afc24e48926849515f60a8a3a1e470 |
| tree | 1868e101f582c5f26ecaae4d163ee83fb7b86b89 |
| parent | b959029f88fa033e54e72e42004bc261baada1f1 |
These functions are not used by anything yet, but run the last
round only once.2 files changed, 4 insertions(+), 16 deletions(-)
lib/std/crypto/aes/aesni.zig+2-8| ... | ... | @@ -313,10 +313,7 @@ pub fn AesEncryptCtx(comptime Aes: type) type { |
| 313 | 313 | inline while (i < rounds) : (i += 1) { |
| 314 | 314 | ts = Block.parallel.encryptWide(count, ts, round_keys[i]); |
| 315 | 315 | } |
| 316 | i = 1; | |
| 317 | inline while (i < count) : (i += 1) { | |
| 318 | ts = Block.parallel.encryptLastWide(count, ts, round_keys[i]); | |
| 319 | } | |
| 316 | ts = Block.parallel.encryptLastWide(count, ts, round_keys[i]); | |
| 320 | 317 | j = 0; |
| 321 | 318 | inline while (j < count) : (j += 1) { |
| 322 | 319 | dst[16 * j .. 16 * j + 16].* = ts[j].toBytes(); |
| ... | ... | @@ -392,10 +389,7 @@ pub fn AesDecryptCtx(comptime Aes: type) type { |
| 392 | 389 | inline while (i < rounds) : (i += 1) { |
| 393 | 390 | ts = Block.parallel.decryptWide(count, ts, inv_round_keys[i]); |
| 394 | 391 | } |
| 395 | i = 1; | |
| 396 | inline while (i < count) : (i += 1) { | |
| 397 | ts = Block.parallel.decryptLastWide(count, ts, inv_round_keys[i]); | |
| 398 | } | |
| 392 | ts = Block.parallel.decryptLastWide(count, ts, inv_round_keys[i]); | |
| 399 | 393 | j = 0; |
| 400 | 394 | inline while (j < count) : (j += 1) { |
| 401 | 395 | dst[16 * j .. 16 * j + 16].* = ts[j].toBytes(); |
lib/std/crypto/aes/armcrypto.zig+2-8| ... | ... | @@ -364,10 +364,7 @@ pub fn AesEncryptCtx(comptime Aes: type) type { |
| 364 | 364 | inline while (i < rounds) : (i += 1) { |
| 365 | 365 | ts = Block.parallel.encryptWide(count, ts, round_keys[i]); |
| 366 | 366 | } |
| 367 | i = 1; | |
| 368 | inline while (i < count) : (i += 1) { | |
| 369 | ts = Block.parallel.encryptLastWide(count, ts, round_keys[i]); | |
| 370 | } | |
| 367 | ts = Block.parallel.encryptLastWide(count, ts, round_keys[i]); | |
| 371 | 368 | j = 0; |
| 372 | 369 | inline while (j < count) : (j += 1) { |
| 373 | 370 | dst[16 * j .. 16 * j + 16].* = ts[j].toBytes(); |
| ... | ... | @@ -443,10 +440,7 @@ pub fn AesDecryptCtx(comptime Aes: type) type { |
| 443 | 440 | inline while (i < rounds) : (i += 1) { |
| 444 | 441 | ts = Block.parallel.decryptWide(count, ts, inv_round_keys[i]); |
| 445 | 442 | } |
| 446 | i = 1; | |
| 447 | inline while (i < count) : (i += 1) { | |
| 448 | ts = Block.parallel.decryptLastWide(count, ts, inv_round_keys[i]); | |
| 449 | } | |
| 443 | ts = Block.parallel.decryptLastWide(count, ts, inv_round_keys[i]); | |
| 450 | 444 | j = 0; |
| 451 | 445 | inline while (j < count) : (j += 1) { |
| 452 | 446 | dst[16 * j .. 16 * j + 16].* = ts[j].toBytes(); |