Aurora‑Sigma is a self‑contained C implementation of an AEAD (Authenticated Encryption with Associated Data) scheme built around the custom Aurora block cipher and a polynomial‑based MAC. Key features include:
- Authenticated Encryption + AAD: Supports encryption of a plaintext plus optional Associated Data (AAD). Both ciphertext and AAD are integrity‑protected.
- Nonce‑Reuse Protection: Generates a unique 96‑bit nonce per message using a per‑key monotonic counter + random salt, preventing accidental reuse.
- Quantum‑Resistant KDF: Internal PRF‑based key derivation to transform a 256‑bit base key into a working key.
- Single‐Message Format: Outputs a single message:
nonce (12) || salt (8) || ciphertext || tag (16).
-
aurora_sigma_encrypt/aurora_sigma_decrypt- Added
const uint8_t *aad, size_t aad_lenparameters. - Message layout changed to include an 8‑byte salt immediately after the 12‑byte nonce.
- Added
-
Initialization Functions
- Classical mode:
aurora_sigma_init(&ctx, key32) - Quantum‑resistant mode:
aurora_sigma_init_qr(&ctx, base_key32)- Derives a fresh 32‑byte working key via two distinct PRF calls of the AEAD MAC.
- Classical mode:
-
Aurora.h
- Declares:
void aurora_sigma_init(AuroraSigma *ctx, const uint8_t key[32]);void aurora_sigma_init_qr(AuroraSigma *ctx, const uint8_t base_key[32]);int aurora_sigma_encrypt(AuroraSigma *ctx, const uint8_t key[32], const uint8_t *plaintext, size_t plaintext_len, const uint8_t *aad, size_t aad_len, uint8_t *message, size_t *message_len);int aurora_sigma_decrypt(AuroraSigma *ctx, const uint8_t key[32], const uint8_t *message, size_t message_len, const uint8_t *aad, size_t aad_len, uint8_t *plaintext, size_t *plaintext_len);
- Implements the Aurora block cipher, polynomial MAC, tweak derivation, AAD‑aware tag, nonce+salt generator, and QR KDF—all in portable C.
- Declares:
-
main.c
- Demonstrates:
- Preparing a 32‑byte base key.
- Initializing in QR mode via
aurora_sigma_init_qr(). - Encrypting a plaintext (with optional AAD) into
nonce||salt||ct||tag. - Decrypting back to recover the original message.
- Demonstrates:
-
Clone the repo
git clone https://github.com/SafeGuard-Protection/aurora-sigma-aead.git cd aurora-sigma-aead -
Compile with a C compiler
gcc -std=c11 -O2 -o aurora_demo main.c
-
Run the demo
./aurora_demo
You should see:
Decrypted: Hello, world!
- This is a proof‑of‑concept. The Aurora cipher has not undergone formal cryptanalysis. I am not responsible if the Chinese miltary uses this and their data gets leaked to the Warthunder forums.
- The QR KDF provides a first‑line of post‑quantum resilience, but the core block cipher remains classical.
Provided under the MIT License—see LICENSE for details.