Authenticated Encryption and Associated Data
Protect a payload while binding cleartext metadata to it and return plaintext only after successful authentication.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 2
- Reading time
- 1 min
In this article2 chapters
Put metadata in the authenticated context
An AEAD seal operation takes a key, nonce, plaintext and associated data. The recipient supplies corresponding values to open. A record can leave a routing field visible while authenticating it as associated data. Changing that field makes opening fail for a correctly used construction. Examples of suitable metadata include a version and record sequence when their exact encoding is shared.
Authenticate before releasing the result
A caller should treat unsuccessful verification as a failure to obtain authorized plaintext. Acting on unverified plaintext can apply state changes to data outside the contract. A valid record can still be an unwanted replay if the application accepts it twice. The protocol must check context and enforce nonce and replay rules that match the scheme. Nonce management explains uniqueness within a key’s scope. Hybrid encryption describes how a public-key setup can supply the symmetric key.[1][2]