On Thu, Dec 23, 2004, david zhang wrote:

> Thank you very much Richard. The PKCS came in play long time after DES
> was already in stage. Can I say that by using only the information
> provided by the encryption/decryption algorithm (for here the example
> DES algorithm), one can not tell if the decryption is correct without
> comparing with the original plaintext? Only by the help of standard,
> such as the PKCS#5, because the encrypted data contains the standard
> PKCS#5 information which provides some decision-making check points
> there to see if the decryption is correct. Am I right? And can I go
> further to guess that these checking points may be a helper for a
> hacker to be more easily to break in ...? (since you need not to see
> if the decrypted data is somesort meaningful ...). Anyway,
> So then, before PKCS, is there any way to tell the decryption is correct?
> 

Just based on the algorithm it isn't possible to check the decryption is
correct. Some applications include additional data such as a digest of the
data to support this.

The PKCS padding is not a realiable check for integrity for two reasons. 

A random block has a better than 1 in 256 chance of being correct even with an
invalid key.

The nature of CBC means that errors earlier on in the data (a couple of blocks
back) will not be detected.

Steve.
--
Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage
OpenSSL project core developer and freelance consultant.
Funding needed! Details on homepage.
Homepage: http://www.drh-consultancy.demon.co.uk
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [email protected]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to