The authenticated-encryption Reference Manual

This is the authenticated-encryption Reference Manual, version 0.1.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Feb 26 14:38:45 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 authenticated-encryption

Authenticated-Encryption functions

Author

Koga Kazuo

License

MIT

Long Description

# Authenticated-Encryption

A implementation of Authenticated Encryption

## Usage

Encrypt

“‘
(aead::authenticated-encrypt plain-text-as-bytes :secret secret-bytes)
;=> encrypted-bytes
“‘

Decrypt

“‘
(aead::authenticated-decrypt encrypted-bytes :secret secret-bytes)
;=> plain-text-as-bytes
; or raise authenticated-decrypt-error condition
“‘

## Installation

## Cite

* https://en.wikipedia.org/wiki/Authenticated_encryption
* https://csrc.nist.gov/csrc/media/projects/block-cipher-techniques/documents/bcm/proposed-modes/eax/eax-spec.pdf

Version

0.1.0

Dependency

ironclad (system).

Source

authenticated-encryption.asd.

Child Component

src (module).


3 Modules

Modules are listed depth-first from the system components tree.


3.1 authenticated-encryption/src

Source

authenticated-encryption.asd.

Parent Component

authenticated-encryption (system).

Child Component

authenticated-encryption.lisp (file).


4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


4.1 Lisp


4.1.1 authenticated-encryption/authenticated-encryption.asd

Source

authenticated-encryption.asd.

Parent Component

authenticated-encryption (system).

ASDF Systems

authenticated-encryption.


4.1.2 authenticated-encryption/src/authenticated-encryption.lisp

Source

authenticated-encryption.asd.

Parent Component

src (module).

Packages

authenticated-encryption.

Public Interface
Internals

5 Packages

Packages are listed by definition order.


5.1 authenticated-encryption

Source

authenticated-encryption.lisp.

Nickname

aead

Use List

common-lisp.

Public Interface
Internals

6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


6.1 Public Interface


6.1.1 Ordinary functions

Function: authenticated-decrypt (encrypted &key secret)

Decrypt message with secret key

ENCRYPTED and SECRET must be array of (unsigned-byte 8).

Returns the decrypted bytes.

Conditions:
authenticated-decrypt-error when invalid encrypted bytes

Package

authenticated-encryption.

Source

authenticated-encryption.lisp.

Function: authenticated-encrypt (message &key secret nonce cipher-name)

Encrypt the message with secret key

MESSAGE and SECRET must be array of (unsigned-byte 8). NONCE will generate per evaluate if nil (default). CIPHER-NAME accepts only :AES (default) for now.

Returns the encrypted bytes.

Encrypted Bytes Format are:
Header (2 byte) +
Nonce (16 byte) +
Encrypted Message (with PKCS#7 padding) +
Tag (16 byte)
(16 = AES block size)

Package

authenticated-encryption.

Source

authenticated-encryption.lisp.


6.1.2 Conditions

Condition: authenticated-decrypt-error
Package

authenticated-encryption.

Source

authenticated-encryption.lisp.

Direct superclasses

simple-error.

Direct subclasses
Condition: invalid-block-length-error
Package

authenticated-encryption.

Source

authenticated-encryption.lisp.

Direct superclasses

authenticated-decrypt-error.

Condition: invalid-cipher-error
Package

authenticated-encryption.

Source

authenticated-encryption.lisp.

Direct superclasses

authenticated-decrypt-error.

Condition: invalid-data-length-error
Package

authenticated-encryption.

Source

authenticated-encryption.lisp.

Direct superclasses

authenticated-decrypt-error.

Condition: invalid-header-error
Package

authenticated-encryption.

Source

authenticated-encryption.lisp.

Direct superclasses

authenticated-decrypt-error.

Condition: invalid-signature-error
Package

authenticated-encryption.

Source

authenticated-encryption.lisp.

Direct superclasses

authenticated-decrypt-error.


6.2 Internals


6.2.1 Ordinary functions

Function: make-header (cipher block-length)
Package

authenticated-encryption.

Source

authenticated-encryption.lisp.

Function: make-nonce (n-bytes)
Package

authenticated-encryption.

Source

authenticated-encryption.lisp.

Function: pkcs7-padding (data-length block-size)
Package

authenticated-encryption.

Source

authenticated-encryption.lisp.


Appendix A Indexes


A.1 Concepts


A.3 Variables


A.4 Data types

Jump to:   A   C   F   I   M   P   S  
Index Entry  Section

A
authenticated-decrypt-error: Public conditions
authenticated-encryption: The authenticated-encryption system
authenticated-encryption: The authenticated-encryption package
authenticated-encryption.asd: The authenticated-encryption/authenticated-encryption․asd file
authenticated-encryption.lisp: The authenticated-encryption/src/authenticated-encryption․lisp file

C
Condition, authenticated-decrypt-error: Public conditions
Condition, invalid-block-length-error: Public conditions
Condition, invalid-cipher-error: Public conditions
Condition, invalid-data-length-error: Public conditions
Condition, invalid-header-error: Public conditions
Condition, invalid-signature-error: Public conditions

F
File, authenticated-encryption.asd: The authenticated-encryption/authenticated-encryption․asd file
File, authenticated-encryption.lisp: The authenticated-encryption/src/authenticated-encryption․lisp file

I
invalid-block-length-error: Public conditions
invalid-cipher-error: Public conditions
invalid-data-length-error: Public conditions
invalid-header-error: Public conditions
invalid-signature-error: Public conditions

M
Module, src: The authenticated-encryption/src module

P
Package, authenticated-encryption: The authenticated-encryption package

S
src: The authenticated-encryption/src module
System, authenticated-encryption: The authenticated-encryption system