-
Notifications
You must be signed in to change notification settings - Fork 10
Block ciphers
Karel Kubicek edited this page Jun 25, 2018
·
6 revisions
Block ciphers like AES competition finalists, TLS suite ciphers and some older reference functions like DES.
The API is minimalist, so adding new block ciphers should be easy. We will appreciate your submissions (pull requests) for other functions.
Example of JSON subtree for AES reduced to 3 rounds in ECB that encrypts counter plaintexts.
"stream" : {
"type" : "block",
"init_frequency" : "only_once",
"algorithm" : "AES",
"round" : 3,
"block_size" : 16,
"plaintext" : {
"type" : "counter"
},
"key_size" : 16,
"key" : {
"type" : "pcg32_stream"
},
"encryption_mode" : true
}-
typehas to beblockto use block ciphers. -
init_frequencycan be eitheronly_onceor number as string. Number means after how many iterations, the algorithm is initialized with new key. The optiononly_oncemeans the whole stream will use only single key. -
algorithmselects used block cipher. See the list of implemented functions for more information. -
roundlimits thealgorithmcipher for given amount of rounds. 0 rounds mean no repetition of the internal loop, but it can still produce randomly looking output because of pre- and post-processing of the data. -
block_sizespecifies byte length of the input test vectors to the function. We require the output of this stream to be integer multiple ofblock_size(ideally equal to it). -
plaintextis JSON subtree with a stream of the plaintext input to the cipher. Plaintext size has to be multiple ofblock-size. Allowed values are specified in stream documentation. -
key_sizespecifies byte length of the key. -
keyis JSON subtree with a stream of the key used in the cipher. Its size is equal tokey_size. Allowed values are specified in stream documentation. -
encryption_modespecifies direction of the cipher - true = encryption, false = decryption.
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