Mask generation function: Difference between revisions

Content deleted Content added
Added tags to the page using Page Curation (lead missing)
m Cleaned up salsa reference.
Line 19:
== Applications ==
 
Mask Generation Functions, as generalizations of hash functions, are useful in all the same cases hash functions are useful. However use of a MGF is desirable in cases where a fixed-size hash would be inadequate. Examples include generating [[Padding (cryptography)|padding]], [[One-time pad|one time pads]] or other forms of [[Symmetric-key_algorithm|symmetric key encryption]], or as the basis of a [[Pseudorandompseudorandom number generator]].
 
=== Padding Schemes ===
Line 30:
 
<pre>
"Salsa20 expandsgenerates athe 256-bitstream key and ain 64-byte (512-bit) nonceblocks. (uniqueEach messageblock number)is intoan
a 270-byte stream. It encrypts a b-byte plaintext by xor’ing the plaintext with
the first b bytes of the stream and discarding the rest of the stream. It decrypts
a b-byte ciphertext by xor’ing the ciphertext with the first b bytes of the stream.
 
There is no feedback from the plaintext or ciphertext into the stream.
Salsa20 generates the stream in 64-byte (512-bit) blocks. Each block is an
independent hash of the key, the nonce, and a 64-bit block number; there is no
chaining from one block to the next. The Salsa20 output stream can therefore