-
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 CryptoStreams configuration file. Every stream has to be inherited 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 primitives as block ciphers, stream ciphers, and hash functions. These streams are described in dedicated pages.
-
Block ciphers with config keyword
block -
Stream ciphers with config keyword
stream-cipher -
Hash functions with config keyword
hash - CAESAR is currently not supported
-
file-stream: containspathto file, which is read as an input -
true-streamandfalse-stream: generate vectors of ones, zeros respectively -
mt19937-streamandpcg32-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 increasing numbers. The first generated number vector is 1 (zero is omitted) -
hw-counter: generates all vectors with given hamming weight.-
hw(unsigned) sets-up target hamming weight. -
increase_hw(Boolean) allows increase after generating all possible vectors (the number of vectors of lengthlwith hamming weight at mosthis (loverh). -
randomize_overflow(Boolean) generates new base random vector (from which is counted the target hamming weight) after generating all possible combinations.
-
-
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) - 1copies 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 theith bit of the ciphertext foriin rangesize(neber argument of block size of the inner stream). -
column-fixed-position: every vector is created from thepositionth bit of the ciphertext. Thepositionis 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