~/bend-docscommunity

inst_michael.bend checks

raw source on the hub · import bend-osdev-crypto@0.1.0.0/inst_michael.bend as Inst_michael

Michael (IEEE 802.11i's TKIP MIC; hashes/michael.bend) as a MAC: the adapter for the hashes package's Michael, its key error mapped onto CrError. The instance: ~Hs.HsW2, ~CrMichael.key, ~MI.HsMichael.mic, ~CrMichael.verify (a key of 8 bytes; the tag is 8 bytes). Michael is weak by design (see hashes/README.md): it is here for TKIP.

6 imports
import Base
import bend-osdev-bytes@0.1.0.0/bytes.bend as B
import bend-osdev-hashes@0.1.0.0/hashes.bend as Hs
import bend-osdev-hashes@0.1.0.0/michael.bend as MI
import ./crypto.bend as Cr
import ./mac.bend as Mc

Definitions

def CrMichael.err source · line 14 · raw

@e:0xd04c3185dce130521497bf85ab03f249/hashes.HsError -> 0x01313a4f070f7ffd2bd276fcd2143eda/crypto.CrError

def CrMichael.key source · line 20 · raw

@o:0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets -> Result<&2, &2, 0x01313a4f070f7ffd2bd276fcd2143eda/crypto.CrError, 0xd04c3185dce130521497bf85ab03f249/hashes.HsW2>

the key of 8 raw bytes (CrBadKeyLength otherwise)

def CrMichael.verify source · line 24 · raw

@k:0xd04c3185dce130521497bf85ab03f249/hashes.HsW2 -> @m:0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets -> @t:0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets -> Bool

whether t is m's tag (the named default verify: every byte compared)