Status: Draft Draft

Available formats: HTML, Markdown

AEON Secure Document Lifecycle

This section describes the typical lifecycle of a secured AEON document using the security conventions.

The lifecycle includes:

  1. Authoring
  2. Canonical hashing
  3. Signing
  4. Optional encryption
  5. Transmission
  6. Verification
  7. Optional decryption

1. Document Authoring

An AEON document is first created without the envelope.

Example:

At this stage:

  • the document contains only semantic content
  • no integrity metadata exists

2. Canonical Hashing

The document is processed using aeon.gp.integrity.v1.

Steps:

  1. parse the document
  2. compute the canonical assignment state
  3. serialize canonical state lines
  4. hash the resulting UTF-8 byte stream

Example result:

This becomes the document integrity hash.


3. Signature Creation

The signer creates a signature over the integrity hash.

Example:

Then the envelope is constructed.

Example:

The envelope is appended as the final binding in the document.


4. Optional Encryption

If confidentiality is required, the document body may be encrypted.

Typical workflow:

  1. encrypt document body
  2. produce ciphertext
  3. place encryption metadata in the envelope

Example:

This allows recipients to:

  • decrypt the body
  • verify integrity
  • verify signatures

5. Transmission / Storage

The completed AEON document can now be:

  • transmitted
  • stored
  • archived
  • logged
  • distributed

Because the document carries its own envelope, it becomes self-verifying.

No external signature file is required.


6. Document Verification

A receiver verifying the document should perform the following steps.

Step 1 — Parse document

The AEON document is parsed normally.

Step 2 — Locate envelope

The processor locates:

Step 3 — Compute canonical integrity hash

The processor recomputes the hash using aeon.gp.integrity.v1.

Step 4 — Compare hashes

The computed hash must match:

If the hash differs, the document is considered tampered.

Step 5 — Verify signatures

Each signature entry is verified using:

  • the declared algorithm
  • the key referenced by kid

If verification fails, the signature is invalid.


7. Optional Decryption

If the document is encrypted:

  1. locate aeon:envelope.encryption
  2. resolve recipient key
  3. decrypt ciphertext
  4. reconstruct the AEON body
  5. verify integrity and signatures

Decryption failure indicates either:

  • incorrect key
  • corrupted ciphertext
  • tampering

8. Lifecycle Summary

The secure lifecycle can be summarized as:


9. Security Properties

This lifecycle provides:

Integrity

Document tampering is detectable.

Authenticity

Signatures prove authorship.

Confidentiality

Encryption protects document content.

Self-verification

The document carries its own verification data.


10. Design Advantages

This model provides several advantages:

  • deterministic hashing
  • multi-signature support
  • independent algorithm evolution
  • envelope-based closure
  • compatibility with streaming verification

Because AEON separates structure from security mechanisms, cryptographic algorithms can evolve without modifying the core language.


Result

The AEON security model enables verifiable structured documents while preserving the minimal design philosophy of AEON core.


If you want, the next thing worth doing is something surprisingly important: designing the canonical test vectors for the integrity algorithm. That’s what ensures two independent implementations always produce the same hash.