Posts  / #POST-002288
REDDIT

NIST STS questions and use with encrypted data

A
Feb 19, 2025 · 01:34

**Hello cryptos.**

I'm testing output of an encryption algorithm and would like to know if a test collection of STS results of a very high quantity will be meaningful.

My test plan that I'm running right now...

1. Creation of 803 cleartext samples across 7 groups:
* **RepetitivePatterns**
* These are things like repeating bytes, repeating tuple and triples, repeating short ordered sequences, and so on.
* The patterns are of increasing sizes from around 511 bytes to just over 4MB.
* **LowEntropy**
* These are cleartext samples that have only a few available bytes in total to distribute.
* Some samples are just random orders and others are cases where the few bytes are separated by large runs of another like: `AnnnnnnnBnnnCnnnnnnnnBnnnnnnC`
* **NaturalLanguage**
* These are randomly constructed English language sentences and paragraphs.
* Of varying lengths, varying sentences per paragraph, and varying quantity of paragraphs.
* **RandomData**
* Varying lengths of random bytes from a CSRNG.
* **PreCompressed**
* Using the same construction from NaturalLanguage, Brotli compress the data and use that as cleartext samples.
* Also of varying lengths.
* **BinaryExe**
* Enumerate files from the local file system for DLL/EXE files between 3K and 6MB.
* Currently produces 72 files on my host from `C:\Windows\System32` and subfolders.
* **Structured**
* Enumerate XML/HTML/JSON/RTF/CSV files between 3K and 6MB.
* Currently produces 72 files on my host from `C:\Program Files` and subfolders.
2. For each cleartext, encrypt and append the output (without padding) to a file.
3. Run ENT for the file as well as STS. STS params are: 2 million bits length and 100 streams, enabling all tests (takes about 9-12 mins per file).
4. Record the results in a DB.

**Am I misinterpreting the value of STS for analyzing encrypted data?**
**Will I gain any useful insights by this plan?**

I've run it for about 24 hours so far and have done over **9 million encrypts** and over **1100 STS executions**.
Completion will be just over **3000 runs** and near **20 million encrypts**.

For any that are curious, I created a sandbox that uses the same encryption here: [https://bllnbit.com](https://bllnbit.com)