Divalia is a high-performance cryptographic framework and the spiritual successor to the Noiseblind obfuscation project.
While Noiseblind had a core focus of implementing complex noise layers to transform files, Divalia aims to improve upon that by instead implementing a rigorous Substitution-Permutations Network (SPN) driven by the Angerona Kernel, a custom, cryptographically driven noise generator designed for high GPU and CPU throughput.
Note: Divalia has not undergone any formal cryptographic review, although it aims to implement proven cryptographic principles
Divalia is an experimental high-performance encryption framework implementing a Substitution-Permutation Network with noise-driven transformations. It uses:
- Argon2 for password-based key derivation (via libsodium)
- Custom S-box combining XOR and modular addition
- Custom P-box with data-dependent rotations and transposition
- AES-NI based noise generation for high throughput
- Integrity verification using AES and SHA-256 instructions
As Divalia is a high-performance encryption tool, it is designed to work specifically on AVX2 systems and as such will not work on systems that do not support it.
This was a consciously made decision so as to better support the performance goals of this project.
At this time CUDA support has not been implemented, however, even upon implementation, the SIMD version will still work for users lacking an appropriate GPU.
The Angerona Kernel uses a custom T-box format which combines XOR and addition operations to create a variable look-up for each byte of data. The choice to combine XOR and addition was purposefully made to help remove linearity from the file and encryption process. The box works by first performing an XOR operation on the data with the first buffer of Noise, it then performs a shift on the data before adding the second unique buffer of noise to the data, completing the substitution.
Similarly to the S-box, the P-box is also a unique implementation of permutation principles. The process starts by creating 16-byte "grids" out of the data, before shifting each row n bits, where n is provided by the noise buffer. The function then transposes the matrix and repeats the operation. Followed by that, a mix column function is performed using the XOR operation and splits like in a Feistel Cipher. Following the column mixing, the data is transposed once again.
To guarantee transformation integrity, Divalia computes a MAC based on a custom combined AES and SHA256 hash. The MAC is compared against when decrypting and if it fails to match the results are thrown out.
In order to keep the MAC deterministic while supporting concurrent processing, the MAC is computed using a Merkle Tree where each thread computes its own dedicated lanes independent of thread count, which are combined upon joining deterministically.
The use of both SHA256 and AES intrinsics was designed to keep both units of the CPU busy decreasing downtime and overhead whilst computing the MAC.
Divalia is a high-performance system aiming for high-speed computing and processing, as such the system can use up considerable memory. During development, I did not notice any slow-downs on my system but users should be aware of the possibility.
Divalia is highly parallel and symmetric, performing similarly for both encryption and decryption tasks with a general deviation of less than 5% between the two. While performance numbers are unknown for every system, on a Ryzen 9 3900x with 32GB of memory, the following benchmarks were recorded:
| 3.5GB | 12KB |
|---|---|
| [Encryption (AVX2)] completed in: 9816.243 ms | [Encryption (AVX2)] completed in: 100.874 ms |
| [Decryption (AVX2)] completed in: 10180.532 ms | [Decryption (AVX2)] completed in: 100.695 ms |
| ~350MB/s | 0.12 MB/s |
*Note: Throughput for small files is limited by kernel mmap initialization and header verification overhead.
Additionally, Encryption and Decryption was run back-to-back so the decryption time may take longer for a cold run.
It is likely that Divalia could perform faster, however through perf diagnostics, it was determined that page faults account for approximately 34% of the runtime for cold runs.
Where possible, Divalia uses register manipulations and intentional instruction ordering to pipeline SIMD functions, aiming to maximize instruction-level parallelism (ILP) and improve throughput.
In some cases this takes the form of processing pairs of elements simultaneously, or strategically ordering operations to minimize pipeline stalls and keep execution units busy.
Divalia was built to be lightweight and add little overhead to the existing file, as such it employs a 64-byte header and upwards of 15 padding bytes for memory alignment for a total of 79 added bytes maximum.
When padding those 15 bytes, noise seeded from the index and MAC is used to provide a unique end-of-file signature, helping to ensure files cannot be trivially truncated or extended.
Divalia is themed around the Roman Gods, with the name Divalia coming from the winter solstice festival held in honor of the Goddess of Secrets: Angerona, as such all namespaces were created within this theme.
However, as the theme may be difficult to work with, there is the option to enable simple namespace aliases by defining USE_VERBOSE_NAMESPACES before including Divalia.hpp.
Copyright (c) Adam Brazda 2026
All Rights Reserved
Code is available for academic and non-commercial purposes; commercial use of Divalia must be gained in writing from the copyright holder.
Divalia comes with no warranty of any kind and is supplied as is.