aead.bend checks
raw source on the hub · import bend-osdev-aead@0.1.0.0/aead.bend as Aead
bend-osdev-aead: authenticated encryption with associated data, as instances of bend-osdev-crypto's AEAD interface (crypto/aead.bend, the shape of RFC 5116): AEGIS-128 (aegis128.bend), encrypt-then-MAC over any cipher and any MAC (authenc.bend), and the IV generators ESSIV (essiv.bend), seqiv (seqiv.bend) and echainiv (echainiv.bend), which turn one AEAD (or, for ESSIV, one cipher with an IV) into another.
This file holds what they share: a ciphertext with its tag appended, and split again. Bend imports do not re-export: import the files you use.
3 imports
import Base import bend-osdev-bytes@0.1.0.0/bytes.bend as B import bend-osdev-crypto@0.1.0.0/crypto.bend as Cr
Types
type AdSplit source · line 16 · raw
Data
A ciphertext and its tag, split from the bytes of both (the tag the last tlen bytes; CrTooShort for fewer than tlen bytes)
AdSplit@c:0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets -> @t:0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets -> AdSplit
Definitions
def ad.split.pick source · line 19 · raw
@short:Bool -> @+tlen:Nat -> @+o:0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets -> Result<&2, &2, 0x01313a4f070f7ffd2bd276fcd2143eda/crypto.CrError, AdSplit>
def AdTag.split source · line 27 · raw
@+tlen:Nat -> @+o:0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets -> Result<&2, &2, 0x01313a4f070f7ffd2bd276fcd2143eda/crypto.CrError, AdSplit>
def AdTag.join source · line 31 · raw
@c:0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets -> @t:0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets -> 0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets
the ciphertext with its tag appended
def AdTag.is_eq source · line 35 · raw
@a:0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets -> @b:0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets -> Bool
Whether two tags are equal, every byte compared (no early exit)