def ghash_bytes.go

qasim-bend-kit@0.1.0.2 · libs/AES256GCMCore.bend:408

import qasim-bend-kit@0.1.0.2/libs/AES256GCMCore.bend as AES256GCMCore
import Base

408def ghash_bytes.go(fuel: Nat, bytes: List<&2, U32>, space: Nat,
409                   +block_rev: List<&2, U32>, +h: List<&2, U32>, +y: List<&2, U32>) -> List<&2, U32>:
410    match fuel bytes space:
411        case 0n Nil{} _: ghash_finish(space, block_rev, h, y)
412        case 0n _ _: ghash_finish(space, block_rev, h, y)
413        case 1n+p Nil{} _: ghash_finish(space, block_rev, h, y)
414        case 1n+p byte <> tail 0n:
415            y2 = ghash_update(y, h, List.reverse(&2, U32, block_rev))
416            ghash_bytes.go(p, tail, 15n, [byte], h, y2)
417        case 1n+p byte <> tail 1n+s:
418            ghash_bytes.go(p, tail, s, byte <> block_rev, h, y)

Uses (6)

Used by (1)