Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
Keccak1600.cs
1using System;
2using System.IO;
4
6{
12 public abstract class Keccak1600
13 {
14 private static readonly bool[] rcs = GetRcs();
15 private static readonly ulong[] RCs = new ulong[] { 0x01, 0x02, 0x08, 0x80, 0x8000, 0x80000000, 0x8000000000000000 };
16 private static readonly ulong[] RC_ir = GetRcIr();
17 private ulong A_0, A_1, A_2, A_3, A_4, A_5, A_6, A_7, A_8, A_9, A_10, A_11, A_12, A_13, A_14, A_15, A_16, A_17, A_18, A_19, A_20, A_21, A_22, A_23, A_24;
18 private ulong A2_0, A2_1, A2_2, A2_3, A2_4, A2_5, A2_6, A2_7, A2_8, A2_9, A2_10, A2_11, A2_12, A2_13, A2_14, A2_15, A2_16, A2_17, A2_18, A2_19, A2_20, A2_21, A2_22, A2_23, A2_24;
19 private ulong C_0, C_1, C_2, C_3, C_4;
20 private readonly int r;
21 private readonly int c;
22 private readonly int r8;
23 private readonly int r8m1;
24 private readonly int dByteSize;
25 private readonly byte suffix;
26 private readonly byte suffixBits;
27 private bool reportStates = false;
28 private bool inA2 = false;
29
40 public Keccak1600(int Capacity, byte Suffix, byte SuffixBits, int DigestSize)
41 {
42 this.c = Capacity;
43 this.r = 1600 - this.c;
44 this.r8 = this.r >> 3;
45 this.r8m1 = this.r8 - 1;
46 this.dByteSize = DigestSize / 8;
47 this.suffix = Suffix;
48 this.suffixBits = SuffixBits;
49
50 if ((DigestSize & 7) != 0)
51 throw new ArgumentException("Invalid digest size.", nameof(DigestSize));
52
53 if (this.c <= 0 || this.r <= 0 || this.r8m1 < 0 || (Capacity & 7) != 0)
54 throw new ArgumentException("Invalid capacity.", nameof(Capacity));
55
56 if (this.suffixBits > 6)
57 throw new ArgumentException("Invalid suffix.", nameof(Suffix));
58
59 this.suffix |= (byte)(1 << this.suffixBits); // First bit of pad10*1
60 }
61
66 public void InitState(byte[] Data)
67 {
68 if (Data.Length != 200)
69 throw new ArgumentException("Expected array of 200 bytes.", nameof(Data));
70
71 this.A_0 = BitConverter.ToUInt64(Data, 0);
72 this.A_1 = BitConverter.ToUInt64(Data, 8);
73 this.A_2 = BitConverter.ToUInt64(Data, 16);
74 this.A_3 = BitConverter.ToUInt64(Data, 24);
75 this.A_4 = BitConverter.ToUInt64(Data, 32);
76 this.A_5 = BitConverter.ToUInt64(Data, 40);
77 this.A_6 = BitConverter.ToUInt64(Data, 48);
78 this.A_7 = BitConverter.ToUInt64(Data, 56);
79 this.A_8 = BitConverter.ToUInt64(Data, 64);
80 this.A_9 = BitConverter.ToUInt64(Data, 72);
81 this.A_10 = BitConverter.ToUInt64(Data, 80);
82 this.A_11 = BitConverter.ToUInt64(Data, 88);
83 this.A_12 = BitConverter.ToUInt64(Data, 96);
84 this.A_13 = BitConverter.ToUInt64(Data, 104);
85 this.A_14 = BitConverter.ToUInt64(Data, 112);
86 this.A_15 = BitConverter.ToUInt64(Data, 120);
87 this.A_16 = BitConverter.ToUInt64(Data, 128);
88 this.A_17 = BitConverter.ToUInt64(Data, 136);
89 this.A_18 = BitConverter.ToUInt64(Data, 144);
90 this.A_19 = BitConverter.ToUInt64(Data, 152);
91 this.A_20 = BitConverter.ToUInt64(Data, 160);
92 this.A_21 = BitConverter.ToUInt64(Data, 168);
93 this.A_22 = BitConverter.ToUInt64(Data, 176);
94 this.A_23 = BitConverter.ToUInt64(Data, 184);
95 this.A_24 = BitConverter.ToUInt64(Data, 192);
96 }
97
102 public byte[] GetState()
103 {
104 byte[] Data = new byte[200]; // this.byteSize
105
106 Buffer.BlockCopy(BitConverter.GetBytes(this.inA2 ? this.A2_0 : this.A_0), 0, Data, 0, 8);
107 Buffer.BlockCopy(BitConverter.GetBytes(this.inA2 ? this.A2_1 : this.A_1), 0, Data, 8, 8);
108 Buffer.BlockCopy(BitConverter.GetBytes(this.inA2 ? this.A2_2 : this.A_2), 0, Data, 16, 8);
109 Buffer.BlockCopy(BitConverter.GetBytes(this.inA2 ? this.A2_3 : this.A_3), 0, Data, 24, 8);
110 Buffer.BlockCopy(BitConverter.GetBytes(this.inA2 ? this.A2_4 : this.A_4), 0, Data, 32, 8);
111 Buffer.BlockCopy(BitConverter.GetBytes(this.inA2 ? this.A2_5 : this.A_5), 0, Data, 40, 8);
112 Buffer.BlockCopy(BitConverter.GetBytes(this.inA2 ? this.A2_6 : this.A_6), 0, Data, 48, 8);
113 Buffer.BlockCopy(BitConverter.GetBytes(this.inA2 ? this.A2_7 : this.A_7), 0, Data, 56, 8);
114 Buffer.BlockCopy(BitConverter.GetBytes(this.inA2 ? this.A2_8 : this.A_8), 0, Data, 64, 8);
115 Buffer.BlockCopy(BitConverter.GetBytes(this.inA2 ? this.A2_9 : this.A_9), 0, Data, 72, 8);
116 Buffer.BlockCopy(BitConverter.GetBytes(this.inA2 ? this.A2_10 : this.A_10), 0, Data, 80, 8);
117 Buffer.BlockCopy(BitConverter.GetBytes(this.inA2 ? this.A2_11 : this.A_11), 0, Data, 88, 8);
118 Buffer.BlockCopy(BitConverter.GetBytes(this.inA2 ? this.A2_12 : this.A_12), 0, Data, 96, 8);
119 Buffer.BlockCopy(BitConverter.GetBytes(this.inA2 ? this.A2_13 : this.A_13), 0, Data, 104, 8);
120 Buffer.BlockCopy(BitConverter.GetBytes(this.inA2 ? this.A2_14 : this.A_14), 0, Data, 112, 8);
121 Buffer.BlockCopy(BitConverter.GetBytes(this.inA2 ? this.A2_15 : this.A_15), 0, Data, 120, 8);
122 Buffer.BlockCopy(BitConverter.GetBytes(this.inA2 ? this.A2_16 : this.A_16), 0, Data, 128, 8);
123 Buffer.BlockCopy(BitConverter.GetBytes(this.inA2 ? this.A2_17 : this.A_17), 0, Data, 136, 8);
124 Buffer.BlockCopy(BitConverter.GetBytes(this.inA2 ? this.A2_18 : this.A_18), 0, Data, 144, 8);
125 Buffer.BlockCopy(BitConverter.GetBytes(this.inA2 ? this.A2_19 : this.A_19), 0, Data, 152, 8);
126 Buffer.BlockCopy(BitConverter.GetBytes(this.inA2 ? this.A2_20 : this.A_20), 0, Data, 160, 8);
127 Buffer.BlockCopy(BitConverter.GetBytes(this.inA2 ? this.A2_21 : this.A_21), 0, Data, 168, 8);
128 Buffer.BlockCopy(BitConverter.GetBytes(this.inA2 ? this.A2_22 : this.A_22), 0, Data, 176, 8);
129 Buffer.BlockCopy(BitConverter.GetBytes(this.inA2 ? this.A2_23 : this.A_23), 0, Data, 184, 8);
130 Buffer.BlockCopy(BitConverter.GetBytes(this.inA2 ? this.A2_24 : this.A_24), 0, Data, 192, 8);
131
132 return Data;
133 }
134
140 private static bool Rc(int t)
141 {
142 int i = t % 255;
143 if (i == 0)
144 return true;
145 else if (i < 0)
146 i += 255;
147
148 byte R = 1;
149
150 while (i-- > 0)
151 {
152 if ((R & 0x80) != 0)
153 {
154 R <<= 1;
155 R ^= 0b01110001;
156 }
157 else
158 R <<= 1;
159 }
160
161 return (R & 1) != 0;
162 }
163
164 private static bool[] GetRcs()
165 {
166 bool[] Result = new bool[255];
167 int t;
168
169 for (t = 0; t < 255; t++)
170 Result[t] = Rc(t);
171
172 return Result;
173 }
174
175 private static ulong[] GetRcIr()
176 {
177 ulong[] Result = new ulong[24];
178 int ir, i, j;
179
180 for (ir = 0; ir < 24; ir++)
181 {
182 ulong RC = 0;
183
184 for (j = 0; j <= 6; j++)
185 {
186 i = (j + 7 * ir) % 255;
187 if (i < 0)
188 i += 255;
189
190 if (rcs[i])
191 RC |= RCs[j];
192 }
193
194 Result[ir] = RC;
195 }
196
197 return Result;
198 }
199
205 public byte[] ComputeFixed(byte[] S)
206 {
207 ulong v;
208 int ir;
209
210 this.InitState(S);
211
212 if (this.reportStates)
213 {
214 EventHandler h = this.NewState;
215 if (!(h is null))
216 h(this, EventArgs.Empty);
217 }
218
219 for (ir = 0; ir < 24; ir++)
220 {
221 // Rnd function, as defined in section 3.3 of NIST FIPS 202.
222 // θ function, as defined in section 3.2.1 of NIST FIPS 202.
223
224 this.C_0 = this.A_0 ^ this.A_5 ^ this.A_10 ^ this.A_15 ^ this.A_20;
225 this.C_1 = this.A_1 ^ this.A_6 ^ this.A_11 ^ this.A_16 ^ this.A_21;
226 this.C_2 = this.A_2 ^ this.A_7 ^ this.A_12 ^ this.A_17 ^ this.A_22;
227 this.C_3 = this.A_3 ^ this.A_8 ^ this.A_13 ^ this.A_18 ^ this.A_23;
228 this.C_4 = this.A_4 ^ this.A_9 ^ this.A_14 ^ this.A_19 ^ this.A_24;
229
230 v = this.C_4 ^ ((this.C_1 << 1) | ((this.C_1 >> 63) & 1));
231 this.A_0 ^= v;
232 this.A_5 ^= v;
233 this.A_10 ^= v;
234 this.A_15 ^= v;
235 this.A_20 ^= v;
236
237 v = this.C_0 ^ ((this.C_2 << 1) | ((this.C_2 >> 63) & 1));
238 this.A_1 ^= v;
239 this.A_6 ^= v;
240 this.A_11 ^= v;
241 this.A_16 ^= v;
242 this.A_21 ^= v;
243
244 v = this.C_1 ^ ((this.C_3 << 1) | ((this.C_3 >> 63) & 1));
245 this.A_2 ^= v;
246 this.A_7 ^= v;
247 this.A_12 ^= v;
248 this.A_17 ^= v;
249 this.A_22 ^= v;
250
251 v = this.C_2 ^ ((this.C_4 << 1) | ((this.C_4 >> 63) & 1));
252 this.A_3 ^= v;
253 this.A_8 ^= v;
254 this.A_13 ^= v;
255 this.A_18 ^= v;
256 this.A_23 ^= v;
257
258 v = this.C_3 ^ ((this.C_0 << 1) | ((this.C_0 >> 63) & 1));
259 this.A_4 ^= v;
260 this.A_9 ^= v;
261 this.A_14 ^= v;
262 this.A_19 ^= v;
263 this.A_24 ^= v;
264
265 if (this.reportStates)
266 {
267 EventHandler h = this.NewState;
268 if (!(h is null))
269 h(this, EventArgs.Empty);
270 }
271
272 // ρ function, as defined in section 3.2.2 of NIST FIPS 202.
273
274 this.A_1 = ((v = this.A_1) << 1) | (v >> 63);
275 this.A_10 = ((v = this.A_10) << 3) | (v >> 61);
276 this.A_7 = ((v = this.A_7) << 6) | (v >> 58);
277 this.A_11 = ((v = this.A_11) << 10) | (v >> 54);
278 this.A_17 = ((v = this.A_17) << 15) | (v >> 49);
279 this.A_18 = ((v = this.A_18) << 21) | (v >> 43);
280 this.A_3 = ((v = this.A_3) << 28) | (v >> 36);
281 this.A_5 = ((v = this.A_5) << 36) | (v >> 28);
282 this.A_16 = ((v = this.A_16) << 45) | (v >> 19);
283 this.A_8 = ((v = this.A_8) << 55) | (v >> 9);
284 this.A_21 = ((v = this.A_21) << 2) | (v >> 62);
285 this.A_24 = ((v = this.A_24) << 14) | (v >> 50);
286 this.A_4 = ((v = this.A_4) << 27) | (v >> 37);
287 this.A_15 = ((v = this.A_15) << 41) | (v >> 23);
288 this.A_23 = ((v = this.A_23) << 56) | (v >> 8);
289 this.A_19 = ((v = this.A_19) << 8) | (v >> 56);
290 this.A_13 = ((v = this.A_13) << 25) | (v >> 39);
291 this.A_12 = ((v = this.A_12) << 43) | (v >> 21);
292 this.A_2 = ((v = this.A_2) << 62) | (v >> 2);
293 this.A_20 = ((v = this.A_20) << 18) | (v >> 46);
294 this.A_14 = ((v = this.A_14) << 39) | (v >> 25);
295 this.A_22 = ((v = this.A_22) << 61) | (v >> 3);
296 this.A_9 = ((v = this.A_9) << 20) | (v >> 44);
297 this.A_6 = ((v = this.A_6) << 44) | (v >> 20);
298
299 if (this.reportStates)
300 {
301 EventHandler h = this.NewState;
302 if (!(h is null))
303 h(this, EventArgs.Empty);
304 }
305
306 // π function, as defined in section 3.2.3 of NIST FIPS 202.
307
308 this.A2_0 = this.A_0;
309 this.A2_5 = this.A_3;
310 this.A2_10 = this.A_1;
311 this.A2_15 = this.A_4;
312 this.A2_20 = this.A_2;
313
314 this.A2_1 = this.A_6;
315 this.A2_6 = this.A_9;
316 this.A2_11 = this.A_7;
317 this.A2_16 = this.A_5;
318 this.A2_21 = this.A_8;
319
320 this.A2_2 = this.A_12;
321 this.A2_7 = this.A_10;
322 this.A2_12 = this.A_13;
323 this.A2_17 = this.A_11;
324 this.A2_22 = this.A_14;
325
326 this.A2_3 = this.A_18;
327 this.A2_8 = this.A_16;
328 this.A2_13 = this.A_19;
329 this.A2_18 = this.A_17;
330 this.A2_23 = this.A_15;
331
332 this.A2_4 = this.A_24;
333 this.A2_9 = this.A_22;
334 this.A2_14 = this.A_20;
335 this.A2_19 = this.A_23;
336 this.A2_24 = this.A_21;
337
338 if (this.reportStates)
339 {
340 this.inA2 = true;
341
342 EventHandler h = this.NewState;
343 if (!(h is null))
344 h(this, EventArgs.Empty);
345 }
346
347 // χ function, as defined in section 3.2.4 of NIST FIPS 202.
348
349 this.A_0 = this.A2_0 ^ (this.A2_2 & ~this.A2_1);
350 this.A_5 = this.A2_5 ^ (this.A2_7 & ~this.A2_6);
351 this.A_10 = this.A2_10 ^ (this.A2_12 & ~this.A2_11);
352 this.A_15 = this.A2_15 ^ (this.A2_17 & ~this.A2_16);
353 this.A_20 = this.A2_20 ^ (this.A2_22 & ~this.A2_21);
354
355 this.A_1 = this.A2_1 ^ (this.A2_3 & ~this.A2_2);
356 this.A_6 = this.A2_6 ^ (this.A2_8 & ~this.A2_7);
357 this.A_11 = this.A2_11 ^ (this.A2_13 & ~this.A2_12);
358 this.A_16 = this.A2_16 ^ (this.A2_18 & ~this.A2_17);
359 this.A_21 = this.A2_21 ^ (this.A2_23 & ~this.A2_22);
360
361 this.A_2 = this.A2_2 ^ (this.A2_4 & ~this.A2_3);
362 this.A_7 = this.A2_7 ^ (this.A2_9 & ~this.A2_8);
363 this.A_12 = this.A2_12 ^ (this.A2_14 & ~this.A2_13);
364 this.A_17 = this.A2_17 ^ (this.A2_19 & ~this.A2_18);
365 this.A_22 = this.A2_22 ^ (this.A2_24 & ~this.A2_23);
366
367 this.A_3 = this.A2_3 ^ (this.A2_0 & ~this.A2_4);
368 this.A_8 = this.A2_8 ^ (this.A2_5 & ~this.A2_9);
369 this.A_13 = this.A2_13 ^ (this.A2_10 & ~this.A2_14);
370 this.A_18 = this.A2_18 ^ (this.A2_15 & ~this.A2_19);
371 this.A_23 = this.A2_23 ^ (this.A2_20 & ~this.A2_24);
372
373 this.A_4 = this.A2_4 ^ (this.A2_1 & ~this.A2_0);
374 this.A_9 = this.A2_9 ^ (this.A2_6 & ~this.A2_5);
375 this.A_14 = this.A2_14 ^ (this.A2_11 & ~this.A2_10);
376 this.A_19 = this.A2_19 ^ (this.A2_16 & ~this.A2_15);
377 this.A_24 = this.A2_24 ^ (this.A2_21 & ~this.A2_20);
378
379 if (this.reportStates)
380 {
381 this.inA2 = false;
382
383 EventHandler h = this.NewState;
384 if (!(h is null))
385 h(this, EventArgs.Empty);
386 }
387
388 // ι function, as defined in section 3.2.5 of NIST FIPS 202.
389
390 this.A_0 ^= RC_ir[ir];
391
392 if (this.reportStates)
393 {
394 EventHandler h = this.NewState;
395 if (!(h is null))
396 h(this, EventArgs.Empty);
397 }
398 }
399
400 return this.GetState();
401 }
402
408 public byte[] ComputeVariable(byte[] N)
409 {
410 this.reportStates = !(this.NewState is null);
411
412 int Len = N.Length;
413 int m = Len << 3;
414 int nm1 = m / this.r;
415 byte[] S = new byte[200];
416 int Pos = 0;
417 int i, k;
418
419 for (i = 0; i < nm1; i++)
420 {
421 for (k = 0; k < this.r8; k++)
422 S[k] ^= N[Pos++];
423
424 S = this.ComputeFixed(S);
425 }
426
427 k = 0;
428 while (Pos < Len)
429 S[k++] ^= N[Pos++];
430
431 S[k] ^= this.suffix;
432 S[this.r8m1] ^= 0x80; // Last bit of pad10*1
433 S = this.ComputeFixed(S);
434
435 byte[] Z = new byte[this.dByteSize];
436
437 Pos = 0;
438 while (true)
439 {
440 i = Math.Min(this.r8, this.dByteSize - Pos);
441 Buffer.BlockCopy(S, 0, Z, Pos, i);
442 Pos += i;
443
444 if (Pos >= this.dByteSize)
445 return Z;
446
447 S = this.ComputeFixed(S);
448 }
449 }
450
456 public byte[] ComputeVariable(Stream N)
457 {
458 this.reportStates = !(this.NewState is null);
459
460 long Len = N.Length;
461 long m = Len << 3;
462 long nm1 = m / this.r;
463 byte[] S = new byte[200];
464 byte[] r8Buf = new byte[this.r8];
465 int i, k;
466
467 N.Position = 0;
468
469 for (i = 0; i < nm1; i++)
470 {
471 N.ReadAll(r8Buf, 0, this.r8);
472
473 for (k = 0; k < this.r8; k++)
474 S[k] ^= r8Buf[k];
475
476 S = this.ComputeFixed(S);
477 }
478
479 int Rest = (int)(Len - N.Position);
480 if (Len > 0)
481 {
482 N.ReadAll(r8Buf, 0, Rest);
483
484 for (k = 0; k < Rest; k++)
485 S[k] ^= r8Buf[k];
486 }
487 else
488 k = 0;
489
490 S[k] ^= this.suffix;
491 S[this.r8m1] ^= 0x80; // Last bit of pad10*1
492 S = this.ComputeFixed(S);
493
494 byte[] Z = new byte[this.dByteSize];
495
496 int Pos = 0;
497 while (true)
498 {
499 i = Math.Min(this.r8, this.dByteSize - Pos);
500 Buffer.BlockCopy(S, 0, Z, Pos, i);
501 Pos += i;
502
503 if (Pos >= this.dByteSize)
504 return Z;
505
506 S = this.ComputeFixed(S);
507 }
508 }
509
514 public event EventHandler NewState = null;
515
524 public Context Absorb(byte[] N)
525 {
526 this.reportStates = !(this.NewState is null);
527
528 int Len = N.Length;
529 int m = Len << 3;
530 int nm1 = m / this.r;
531 byte[] S = new byte[200];
532 int Pos = 0;
533 int i, k;
534
535 for (i = 0; i < nm1; i++)
536 {
537 for (k = 0; k < this.r8; k++)
538 S[k] ^= N[Pos++];
539
540 S = this.ComputeFixed(S);
541 }
542
543 k = 0;
544 while (Pos < Len)
545 S[k++] ^= N[Pos++];
546
547 S[k] ^= this.suffix;
548 S[this.r8m1] ^= 0x80; // Last bit of pad10*1
549 S = this.ComputeFixed(S);
550
551 return new Context(S, this);
552 }
553
557 public class Context
558 {
559 private readonly Keccak1600 hashFunction;
560 private byte[] state;
561 private int statePosition;
562
568 public Context(byte[] S, Keccak1600 H)
569 {
570 this.state = S;
571 this.hashFunction = H;
572 this.statePosition = 0;
573 }
574
581 public byte[] Squeeze(int NrBytes)
582 {
583 byte[] Z = new byte[NrBytes];
584 int Pos = 0;
585 int i;
586
587 if (this.statePosition >= this.hashFunction.r8)
588 {
589 this.state = this.hashFunction.ComputeFixed(this.state);
590 this.statePosition = 0;
591 }
592
593 while (true)
594 {
595 i = Math.Min(this.hashFunction.r8 - this.statePosition, NrBytes - Pos);
596 Buffer.BlockCopy(this.state, this.statePosition, Z, Pos, i);
597 Pos += i;
598 this.statePosition += i;
599
600 if (Pos >= NrBytes)
601 return Z;
602
603 this.state = this.hashFunction.ComputeFixed(this.state);
604 this.statePosition = 0;
605 }
606 }
607
612 public byte Squeeze1()
613 {
614 if (this.statePosition >= this.hashFunction.r8)
615 {
616 this.state = this.hashFunction.ComputeFixed(this.state);
617 this.statePosition = 0;
618 }
619
620 return this.state[this.statePosition++];
621 }
622 }
623 }
624}
Hash digest computation context.
Definition: Keccak1600.cs:558
Context(byte[] S, Keccak1600 H)
Hash digest computation context.
Definition: Keccak1600.cs:568
byte[] Squeeze(int NrBytes)
Calculates another NrBytes number of bytes of the digest.
Definition: Keccak1600.cs:581
byte Squeeze1()
Calculates another byte of the digest.
Definition: Keccak1600.cs:612
Implementation of the KECCAK-p permutations, with a bitsize of 1600 bits, as defined in section 3 in ...
Definition: Keccak1600.cs:13
byte[] GetState()
Gets a copy of the internal state.
Definition: Keccak1600.cs:102
EventHandler NewState
Event raised when the internal state has changed. You can use this event in unit tests to validate th...
Definition: Keccak1600.cs:514
void InitState(byte[] Data)
Initializes the internal state.
Definition: Keccak1600.cs:66
Context Absorb(byte[] N)
Initiates a variable length digest computation using the SPONGE function, absorbing the input data,...
Definition: Keccak1600.cs:524
byte[] ComputeVariable(Stream N)
Computes the SPONGE function, as defined in section 4 of NIST FIPS 202.
Definition: Keccak1600.cs:456
byte[] ComputeFixed(byte[] S)
Computes the KECCAK-p[b, nr=24] algorithm, as defined in section 3.3 of NIST FIPS 202.
Definition: Keccak1600.cs:205
Keccak1600(int Capacity, byte Suffix, byte SuffixBits, int DigestSize)
Implementation of the KECCAK-p permutations, with a bitsize of 1600 bits, as defined in section 3 in ...
Definition: Keccak1600.cs:40
byte[] ComputeVariable(byte[] N)
Computes the SPONGE function, as defined in section 4 of NIST FIPS 202.
Definition: Keccak1600.cs:408