law hmac_sm3_split

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

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/sm3.bend as HSM

1418# HMAC over SM3 (hashes): the tag in pieces is the tag in one call, for every split
1419law hmac_sm3_split:
1420  for +kk: Hm.CrHmacKey
1421  for +a: B.Octets
1422  for +b: B.Octets
1423  {Hm.CrHmac.finish(~Hs.HsMdState<Hs.HsW8>, ~HSM.HsSm3.init(), ~HSM.HsSm3.update, ~HSM.HsSm3.final, Hm.CrHmac.update(~Hs.HsMdState<Hs.HsW8>, ~HSM.HsSm3.update, Hm.CrHmac.update(~Hs.HsMdState<Hs.HsW8>, ~HSM.HsSm3.update, Hm.CrHmac.start(~Hs.HsMdState<Hs.HsW8>, ~HSM.HsSm3.init(), ~HSM.HsSm3.update, kk), a), b)) == Hm.CrHmac.mac(~HSM.HsSm3.digest, kk, B.Octets.append(a, b)) : B.Octets}

Uses (16)

Used by (0)

No other definition uses this definition.