Re: Cryptographically secure random number generation
Posted: Fri Mar 30, 2012 10:04 am
That requires to run hash over the whole message twice. One for encryption process for generating pseudo-random chain and one for the HMAC.Owen wrote:Nowhere did I say that the derived cipher would be used for the MAC - it would be far more efficient to return to the underlying hash function and use e.g. HMAC.
Yes, but only for encryption. The MAC is applied to last block only.Owen wrote:In any case, CBC-MAC likewise requires the whole message be processed by itself
Of course, the cipher itself is not a method of preventing tampering. But since it is impossible to change the encrypted text so that plain text will get predicted changes, you may control the integrity with methods that are cryptographically insecure, but very fast and become reliable in conjunction with cipher. So, even a plain parity check (XOR of all DWORDs!) combined with encryption does that work.Protection against tampering is a property offered by a message authentication code. A MAC can be constructed from a block cipher, but a cipher itself is not a method of preventing tampering.