Module: Miscreant::STREAM

Defined in:
lib/miscreant/stream.rb

Overview

The STREAM online authenticated encryption construction. See <eprint.iacr.org/2015/189.pdf> for definition.

Miscreant’s implementation of STREAM uses an 8-byte (64-bit) nonce prefix along with a 32-bit counter and 1-byte “last block” flag

Defined Under Namespace

Classes: Decryptor, Encryptor

Constant Summary collapse

NONCE_SIZE =

Size of a nonce required by STREAM in bytes

8
LAST_BLOCK_FLAG =

Byte flag indicating this is the last block in the STREAM (otherwise 0)

1
COUNTER_MAX =

Maximum value of the STREAM counter

2**32
FinishedError =

Raised if we attempt to continue an already-finished STREAM

Class.new(StandardError)