CFB.decrypt

ubyte[] decrypt(const(ubyte)[] input)

Decrypts data using CFB mode.

CFB decryption:

  1. Encrypt the shift register to produce output block
  2. XOR ciphertext segment with MSB of output block
  3. Shift ciphertext (not plaintext) into the shift register

A trailing partial segment shorter than the segment size is processed with the most significant bits of the output block and is not fed back (NIST SP 800-38A, Section 6.3).

Parameters

inputCiphertext to decrypt. The final segment may be a partial one of any non-zero byte length.

Returns

Plaintext of the same length as input.