authorgravatar for 124872+jedisct1@users.noreply.github.comFrank Denis <124872+jedisct1@users.noreply.github.com> 2020-10-10 19:48:22+02:00
committergravatar for 124872+jedisct1@users.noreply.github.comFrank Denis <124872+jedisct1@users.noreply.github.com> 2020-10-10 22:45:41+02:00
log459128e05902008937205ea154e6c556e9264a4d
tree936cadca33367ffa758c3f24a050a4063c8eb515
parent9b386bda33e94c79d6b9a1db911d394c26592e71

Use an array of comptime_int for shuffle masks

Suggested by @LemonBoy - Thanks!

1 files changed, 2 insertions(+), 2 deletions(-)

lib/std/crypto/chacha20.zig+2-2
...@@ -35,8 +35,8 @@ const ChaCha20VecImpl = struct {...@@ -35,8 +35,8 @@ const ChaCha20VecImpl = struct {
35 }35 }
3636
37 inline fn chacha20Core(x: *BlockVec, input: BlockVec) void {37 inline fn chacha20Core(x: *BlockVec, input: BlockVec) void {
38 const rot8 = Vector(16, i32){ 3, 0, 1, 2, 7, 4, 5, 6, 11, 8, 9, 10, 15, 12, 13, 14 };38 const rot8 = [_]i32{ 3, 0, 1, 2, 7, 4, 5, 6, 11, 8, 9, 10, 15, 12, 13, 14 };
39 const rot16 = Vector(16, i32){ 2, 3, 0, 1, 6, 7, 4, 5, 10, 11, 8, 9, 14, 15, 12, 13 };39 const rot16 = [_]i32{ 2, 3, 0, 1, 6, 7, 4, 5, 10, 11, 8, 9, 14, 15, 12, 13 };
4040
41 x.* = input;41 x.* = input;
4242