-
Notifications
You must be signed in to change notification settings - Fork 9
Streams
Streams classes are used for managing test vectors, their generation, saving and loading.
Streams are identified by type
in EACirc configuration file. Every stream has to be inheritted from abstract stream
interface and provide implementation at least to method next()
and osize(). Streams may be encapsulated to other streams, such as "plaintext generator" stream or postprocessed by output modification stream.
Generalisation of data generation allows higher customizability and code reduction due to reusage of commonly used streams (like counter plaintext).
Specific streams are dedicated to cryptographical contests eStream, SHA3 and CAESAR. Similar set of function is implemented in block ciphers stream. These streams are described in dedicated pages.
-
Block ciphers with config keyword
block
-
eStream with config keyword
estream
-
SHA-3 with config keyword
sha3
- CAESAR is currently not supported
-
file-stream
: containspath
to file, which is read as an input -
true-stream
andfalse-stream
: generate vectors of ones, zeros respectively -
mt19937-stream
andpcg32-stream
: use PRNG Mersenne Twister MT19937-64, PCG generation (faster and more statisticaly random, preferred) -
single-value-stream
: passes repeatedly same value. Initialized by internal stream. Useful for repeating passing single value of other random streams. -
counter
: generates incresing numbers. The first generated number vector is 1 (zero is omitted) -
sac
(Strict avalanche criterion): generates 2 times bigger vector than is the block size, first part is random (source is PCG32), second part is copy of the first part with exactly one bit flipped. The position of the flipped bit is random. -
sac-fixed-position
: similar to SAC, but the position of bit flip is given by argumentposition
(requires number). -
sac-2d-all-positions
: the first vector is random and then follows(size * 8) - 1
copies of the original vector, with one bit flip per copy.
These stream modifiers contains always inner JSON subtree with usually some cipher.
-
column-stream
: the ciphertext is transposed and vectors are created from thei
th bit of the ciphertext fori
in rangesize
(neber argument of block size of the inner stream). -
column-fixed-position
: every vector is created from theposition
th bit of the ciphertext. Theposition
is a number argument in interval (0,size
-1). -
xor-stream
: splits input into two halves and XOR these 2 parts. Fits for checking SAC. -
rnd-plt-ctx-stream
: generates random plaintext and outputs pair plaintext and corresponding ciphertext.
Getting started
Building notes
Running notes
Recommended scenarios
Configuration file structure
Developer notes
Framework components
Submodules
Third party libraries
Coding guide
Testing
Known bugs
User notes
List of streams
Block ciphers
Stream ciphers
Hash functions
PRNGs
WIP CAESAR
Useful links