law hmac_sha1_split

bend-osdev-crypto@0.1.0.0 · LAWS.bend:1340

import bend-osdev-crypto@0.1.0.0/LAWS.bend as LAWS
import Base
import bend-osdev-bytes@0.1.0.0/bytes.bend as B
import bend-osdev-crypto@0.1.0.0/hmac.bend as Hm
import bend-osdev-hashes@0.1.0.0/hashes.bend as Hs
import bend-osdev-hashes@0.1.0.0/sha1.bend as HS1

1340# HMAC over SHA-1 (hashes): the tag in pieces is the tag in one call, for every split
1341law hmac_sha1_split:
1342  for +kk: Hm.CrHmacKey
1343  for +a: B.Octets
1344  for +b: B.Octets
1345  {Hm.CrHmac.finish(~Hs.HsMdState<Hs.HsW5>, ~HS1.HsSha1.init(), ~HS1.HsSha1.update, ~HS1.HsSha1.final, Hm.CrHmac.update(~Hs.HsMdState<Hs.HsW5>, ~HS1.HsSha1.update, Hm.CrHmac.update(~Hs.HsMdState<Hs.HsW5>, ~HS1.HsSha1.update, Hm.CrHmac.start(~Hs.HsMdState<Hs.HsW5>, ~HS1.HsSha1.init(), ~HS1.HsSha1.update, kk), a), b)) == Hm.CrHmac.mac(~HS1.HsSha1.digest, kk, B.Octets.append(a, b)) : B.Octets}

Uses (16)

Used by (0)

No other definition uses this definition.