diff options
author | Anton Kling <anton@kling.gg> | 2024-02-21 00:14:29 +0100 |
---|---|---|
committer | Anton Kling <anton@kling.gg> | 2024-02-21 00:14:29 +0100 |
commit | 8ff63b062d724826d8017504063df9b92f8e6703 (patch) | |
tree | 03bf0b5a278a4908da8912f956e5651bea9412f1 /kernel/crypto | |
parent | a85eacdd2406fede4d6ff5cb130b1758978cabb3 (diff) |
New clang-format options
Diffstat (limited to 'kernel/crypto')
-rw-r--r-- | kernel/crypto/ChaCha20/chacha20.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/crypto/ChaCha20/chacha20.c b/kernel/crypto/ChaCha20/chacha20.c index 4486d00..9f5d6a5 100644 --- a/kernel/crypto/ChaCha20/chacha20.c +++ b/kernel/crypto/ChaCha20/chacha20.c @@ -10,8 +10,9 @@ void chacha_block(u32 out[16], u32 const in[16]) { int i; u32 x[16]; - for (i = 0; i < 16; ++i) + for (i = 0; i < 16; ++i) { x[i] = in[i]; + } for (i = 0; i < ROUNDS; i += 2) { QR(x[0], x[4], x[8], x[12]); QR(x[1], x[5], x[9], x[13]); @@ -23,6 +24,7 @@ void chacha_block(u32 out[16], u32 const in[16]) { QR(x[2], x[7], x[8], x[13]); QR(x[3], x[4], x[9], x[14]); } - for (i = 0; i < 16; ++i) + for (i = 0; i < 16; ++i) { out[i] = x[i] + in[i]; + } } |