ChaCha20withPrefix class
This is what a block looks like in ChaCha: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Each element (number) in the matrix consists of 32 bits or 8 hexadecimal numbers.
The key consists of 256 bits (64 bytes) The nonce consists of 96 bits (24 bytes) The block counter consists of 32 bits (8 bytes)
The encrypted text (ciphertext) consists of 64 bytes (512 bits or 128 hexadecimal values)
The elements 0 to 3 are constant values The elements 4 to 11 are the key (64 bytes) The element 12 is the block counter The elements 13 to 15 are the nonce c c c c | c = constant k k k k | k = Key (encrypted password) k k k k b n n n | b = block counter, n = nonce
The nonce must be changed each time a new plaintext is created for encryption.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited