law hmac_sm3_streaming

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

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

1411# HMAC over SM3 (hashes): the state after a ++ b is the state after a, then b
1412law hmac_sm3_streaming:
1413  for s: Hm.CrHmacState<Hs.HsMdState<Hs.HsW8>>
1414  for +a: B.Octets
1415  for +b: B.Octets
1416  {Hm.CrHmac.update(~Hs.HsMdState<Hs.HsW8>, ~HSM.HsSm3.update, s, B.Octets.append(a, b)) == Hm.CrHmac.update(~Hs.HsMdState<Hs.HsW8>, ~HSM.HsSm3.update, Hm.CrHmac.update(~Hs.HsMdState<Hs.HsW8>, ~HSM.HsSm3.update, s, a), b) : Hm.CrHmacState<Hs.HsMdState<Hs.HsW8>>}

Uses (8)

Used by (0)

No other definition uses this definition.