@@ -181,7 +181,7 @@ pub fn (mut c Aead128) encrypt(msg []u8, nonce []u8, ad []u8) ![]u8 {
181181 c.State.e4 = n1
182182
183183 // Update state by permutation
184- ascon_pnr (mut c.State, ascon_prnd_12 )
184+ ascon_pnr (mut c.State, . ascon_prnd_12 )
185185 // XOR-ing with the cipher's key
186186 c.State.e3 ^= c.key[0 ]
187187 c.State.e4 ^= c.key[1 ]
@@ -229,7 +229,7 @@ pub fn (mut c Aead128) decrypt(ciphertext []u8, nonce []u8, ad []u8) ![]u8 {
229229 c.State.e4 = n1
230230
231231 // scrambled with permutation routine
232- ascon_pnr (mut c.State, ascon_prnd_12 )
232+ ascon_pnr (mut c.State, . ascon_prnd_12 )
233233 // xor-ing with the cipher's key
234234 c.State.e3 ^= c.key[0 ]
235235 c.State.e4 ^= c.key[1 ]
@@ -288,7 +288,7 @@ fn aead128_init(mut s State, key []u8, nonce []u8) (u64, u64) {
288288 s.e4 = n1
289289
290290 // updates State using the permutation 𝐴𝑠𝑐𝑜𝑛-𝑝[12], S ← 𝐴𝑠𝑐𝑜𝑛-𝑝[12](S)
291- ascon_pnr (mut s, ascon_prnd_12 )
291+ ascon_pnr (mut s, . ascon_prnd_12 )
292292
293293 // Then XORing the secret key 𝐾 into the last 128 bits of internal state:
294294 // S ← S ⊕ (0¹⁹² ∥ 𝐾).
@@ -312,7 +312,7 @@ fn aead128_process_ad(mut s State, ad []u8) {
312312 s.e1 ^= binary.little_endian_u64 (block[8 ..16 ])
313313
314314 // Apply permutation 𝐴𝑠𝑐𝑜𝑛-𝑝[8] to the state
315- ascon_pnr (mut s, ascon_prnd_8 )
315+ ascon_pnr (mut s, . ascon_prnd_8 )
316316 // Updates index
317317 ad_length - = aead128_ block_size
318318 ad_idx + = aead128_ block_size
@@ -339,7 +339,7 @@ fn aead128_process_ad(mut s State, ad []u8) {
339339 }
340340 }
341341 // Apply permutation 𝐴𝑠𝑐𝑜𝑛-𝑝[8] to the state
342- ascon_pnr (mut s, ascon_prnd_8 )
342+ ascon_pnr (mut s, . ascon_prnd_8 )
343343 }
344344 // The final step of processing associated data is to update the state
345345 // with a constant that provides domain separation.
@@ -361,7 +361,7 @@ fn aead128_process_msg(mut out []u8, mut s State, msg []u8) int {
361361 binary.little_endian_put_u64 (mut out[pos..pos + 8 ], s.e0 )
362362 binary.little_endian_put_u64 (mut out[pos + 8 ..], s.e1 )
363363 // apply permutation
364- ascon_pnr (mut s, ascon_prnd_8 )
364+ ascon_pnr (mut s, . ascon_prnd_8 )
365365
366366 // updates index
367367 mlen - = aead128_ block_size
@@ -413,7 +413,7 @@ fn aead128_partial_dec(mut out []u8, mut s State, cmsg []u8) {
413413 s.e0 = c0
414414 s.e1 = c1
415415
416- ascon_pnr (mut s, ascon_prnd_8 )
416+ ascon_pnr (mut s, . ascon_prnd_8 )
417417 // updates index
418418 pos + = aead128_ block_size
419419 cmsg_len - = aead128_ block_size
@@ -448,7 +448,7 @@ fn aead128_finalize(mut s State, k0 u64, k1 u64) {
448448 s.e2 ^= k0
449449 s.e3 ^= k1
450450 // then updated using the permutation 𝐴𝑠𝑐𝑜𝑛-𝑝[12]
451- ascon_pnr (mut s, ascon_prnd_12 )
451+ ascon_pnr (mut s, . ascon_prnd_12 )
452452
453453 // Finally, the tag 𝑇 is generated by XORing the key with the last 128 bits of the state:
454454 // 𝑇 ← 𝑆[192∶319] ⊕ 𝐾.
0 commit comments