law hmac_sha256_split

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

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-crypto@0.1.0.0/inst_sha2.bend as SH

1209# HMAC over SHA-256 (bend-collections): the tag in pieces is the tag in one call, for every split
1210law hmac_sha256_split:
1211  for +kk: Hm.CrHmacKey
1212  for +a: B.Octets
1213  for +b: B.Octets
1214  {Hm.CrHmac.finish(~SH.CrSha2State, ~SH.CrSha2.init256(), ~SH.CrSha2.update, ~SH.CrSha2.final, Hm.CrHmac.update(~SH.CrSha2State, ~SH.CrSha2.update, Hm.CrHmac.update(~SH.CrSha2State, ~SH.CrSha2.update, Hm.CrHmac.start(~SH.CrSha2State, ~SH.CrSha2.init256(), ~SH.CrSha2.update, kk), a), b)) == Hm.CrHmac.mac(~SH.CrSha2.sha256, kk, B.Octets.append(a, b)) : B.Octets}

Uses (15)

Used by (0)

No other definition uses this definition.