law hmac_sha512_split

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

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

1216# HMAC over SHA-512 (bend-collections): the tag in pieces is the tag in one call, for every split
1217law hmac_sha512_split:
1218  for +kk: Hm.CrHmacKey
1219  for +a: B.Octets
1220  for +b: B.Octets
1221  {Hm.CrHmac.finish(~SH.CrSha2State, ~SH.CrSha2.init512(), ~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.init512(), ~SH.CrSha2.update, kk), a), b)) == Hm.CrHmac.mac(~SH.CrSha2.sha512, kk, B.Octets.append(a, b)) : B.Octets}

Uses (15)

Used by (0)

No other definition uses this definition.