Gcm.add_masked: def of bend-collections@1.0.0.0 Import: import bend-collections@1.0.0.0/src/crypto/aes/gcm.bend as Gcm Lines 34-40 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=34&end_line=40 import Base # Z xor (V and (0 - bit)), bit being 0 or 1. def add_masked(+bit: U32, z: Block, v: Block) -> Block: match z v: case B{z0, z1, z2, z3} B{v0, v1, v2, v3}: +m = U32.sub(0, bit) B{U32.xor(z0, U32.and(m, v0)), U32.xor(z1, U32.and(m, v1)), U32.xor(z2, U32.and(m, v2)), U32.xor(z3, U32.and(m, v3))} Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.sub https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.xor https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/aes/gcm.bend&name=Block