Skip to content

Stream ciphers

Karel Kubicek edited this page Aug 17, 2018 · 8 revisions

Stream ciphers from eSTREAM competition and selected other ciphers. For more information on eSTREAM candidates ciphers and project background, see the official eSTREAM webpage.

Project configuration

"stream" : {
    "type" : "stream_cipher",
    "algorithm" : "Salsa20",
    "round" : 3,
    "block_size" : 16,
    "plaintext" : {
        "type" : "counter"
    },
    "key_size" : 32,
    "key" : {
        "type" : "pcg32_stream"
    },
    "iv_size" : 8,
    "iv" : {
        "type" : "false_stream"
    }
}
  • type : stream-cipher to select class of stream ciphers.
  • algorithm specifies the cipher to use; see list of ciphers.
  • round limits the number of rounds for the selected algorithm.
  • block_size chooses the internal size of block of the stream cipher (see documentation list of ciphers for proper setup).
  • plaintext_type contains JSON subtree with plaintext source Stream. Recommended are zeros (lefts the stream cipher to generate only keystream).
  • key_size specifies byte length of the key.
  • key is JSON subtree with a stream of the key used in the cipher. Its size is equal to key_size. Allowed values are specified in stream documentation.
  • iv_size specifies byte length of the IV.
  • iv is JSON subtree with a stream of the IV used in the cipher. Its size is equal to iv_size. Allowed values are specified in stream documentation.

Developer documentation

The stream-ciphers functionality is separated into several files:

  • stream_stream
    The main project file, implements stream interface. Contains method next() for outputing a test vector.
  • stream_cipher
    This file includes all the stream ciphers and contains factory that initializes the selected cipher for the computation.
  • stream_interface
    The interface provides unified access to all stream ciphers.
  • estream and other
    These folders contain files with general macros used in unified cipher interface and subfolders for cipher source codes.