Skip to content

Commit 5e57ac5

Browse files
ValarDragonPratyush
authored andcommitted
Fix blake2s table alighnments
1 parent df6e235 commit 5e57ac5

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

crypto-primitives/src/prf/blake2s/constraints.rs

+20-20
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ use std::borrow::Borrow;
88

99
// 2.1. Parameters
1010
// The following table summarizes various parameters and their ranges:
11-
// | BLAKE2b | BLAKE2s |
11+
// | BLAKE2b | BLAKE2s |
1212
// --------------+------------------+------------------+
13-
// Bits in word | w = 64 | w = 32 |
14-
// Rounds in F | r = 12 | r = 10 |
15-
// Block bytes | bb = 128 | bb = 64 |
16-
// Hash bytes | 1 <= nn <= 64 | 1 <= nn <= 32 |
17-
// Key bytes | 0 <= kk <= 64 | 0 <= kk <= 32 |
18-
// Input bytes | 0 <= ll < 2**128 | 0 <= ll < 2**64 |
13+
// Bits in word | w = 64 | w = 32 |
14+
// Rounds in F | r = 12 | r = 10 |
15+
// Block bytes | bb = 128 | bb = 64 |
16+
// Hash bytes | 1 <= nn <= 64 | 1 <= nn <= 32 |
17+
// Key bytes | 0 <= kk <= 64 | 0 <= kk <= 32 |
18+
// Input bytes | 0 <= ll < 2**128 | 0 <= ll < 2**64 |
1919
// --------------+------------------+------------------+
20-
// G Rotation | (R1, R2, R3, R4) | (R1, R2, R3, R4) |
21-
// constants = | (32, 24, 16, 63) | (16, 12, 8, 7) |
20+
// G Rotation | (R1, R2, R3, R4) | (R1, R2, R3, R4) |
21+
// constants = | (32, 24, 16, 63) | (16, 12, 8, 7) |
2222
// --------------+------------------+------------------+
2323
//
2424

@@ -27,18 +27,18 @@ const R2: usize = 12;
2727
const R3: usize = 8;
2828
const R4: usize = 7;
2929

30-
// Round | 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
30+
// Round | 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
3131
// ----------+-------------------------------------------------+
32-
// SIGMA[0] | 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
33-
// SIGMA[1] | 14 10 4 8 9 15 13 6 1 12 0 2 11 7 5 3 |
34-
// SIGMA[2] | 11 8 12 0 5 2 15 13 10 14 3 6 7 1 9 4 |
35-
// SIGMA[3] | 7 9 3 1 13 12 11 14 2 6 5 10 4 0 15 8 |
36-
// SIGMA[4] | 9 0 5 7 2 4 10 15 14 1 11 12 6 8 3 13 |
37-
// SIGMA[5] | 2 12 6 10 0 11 8 3 4 13 7 5 15 14 1 9 |
38-
// SIGMA[6] | 12 5 1 15 14 13 4 10 0 7 6 3 9 2 8 11 |
39-
// SIGMA[7] | 13 11 7 14 12 1 3 9 5 0 15 4 8 6 2 10 |
40-
// SIGMA[8] | 6 15 14 9 11 3 0 8 12 2 13 7 1 4 10 5 |
41-
// SIGMA[9] | 10 2 8 4 7 6 1 5 15 11 9 14 3 12 13 0 |
32+
// SIGMA[0] | 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
33+
// SIGMA[1] | 14 10 4 8 9 15 13 6 1 12 0 2 11 7 5 3 |
34+
// SIGMA[2] | 11 8 12 0 5 2 15 13 10 14 3 6 7 1 9 4 |
35+
// SIGMA[3] | 7 9 3 1 13 12 11 14 2 6 5 10 4 0 15 8 |
36+
// SIGMA[4] | 9 0 5 7 2 4 10 15 14 1 11 12 6 8 3 13 |
37+
// SIGMA[5] | 2 12 6 10 0 11 8 3 4 13 7 5 15 14 1 9 |
38+
// SIGMA[6] | 12 5 1 15 14 13 4 10 0 7 6 3 9 2 8 11 |
39+
// SIGMA[7] | 13 11 7 14 12 1 3 9 5 0 15 4 8 6 2 10 |
40+
// SIGMA[8] | 6 15 14 9 11 3 0 8 12 2 13 7 1 4 10 5 |
41+
// SIGMA[9] | 10 2 8 4 7 6 1 5 15 11 9 14 3 12 13 0 |
4242
// ----------+-------------------------------------------------+
4343
//
4444

0 commit comments

Comments
 (0)