Gcm.tag: def of bend-collections@1.0.0.0 Import: import bend-collections@1.0.0.0/src/crypto/aes/gcm.bend as Gcm Lines 146-150 of bend-collections@1.0.0.0/src/crypto/aes/gcm.bend: https://jend.leeeet.dev/read.txt?path=bend-collections@1.0.0.0/src/crypto/aes/gcm.bend&start_line=146&end_line=150 import Base import bend-collections@1.0.0.0/src/crypto/aes/types.bend as T import bend-collections@1.0.0.0/src/crypto/aes/aes.bend as A # The tag of ciphertext c: GHASH over A || 0^v || C || 0^u || lengths, # encrypted with the counter block J0 = nonce || 1. def tag(+sched: A.Schedule, +n0: T.Quad, +n1: T.Quad, +n2: T.Quad, +aad: List<&2, U32>, +c: List<&2, U32>) -> List<&2, U32>: +h = hash_key(sched) gctr(sched, unpack(ghash(h, lengths(aad, c), ghash(h, c, ghash(h, aad, zero())))), n0, n1, n2, 1) Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/aes/aes.bend&name=Schedule https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/aes/gcm.bend&name=gctr https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/aes/gcm.bend&name=ghash https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/aes/gcm.bend&name=hash_key https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/aes/gcm.bend&name=lengths https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/aes/gcm.bend&name=unpack https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/aes/gcm.bend&name=zero https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/aes/types.bend&name=Quad