Re: Proposal for DigestInfo as UnprotectedAttribute in CMS EnvelopedData
Alicia da Conceicao <alicia <at> engine.ca>
2005-09-19 10:02:24 GMT
>>For CMS EnvelopedData, it would be very useful to have an
>>UnprotectedAttribute containing a DigestInfo (as defined in PKCS#1) with a
>>hash of the encrypted data.
>>
>> DigestInfo ::= SEQUENCE {
>> digestAlgorithm DigestAlgorithm,
>> digest OCTET STRING }
>
> I proposed something like this a while back to get around the patent mess
> surrounding the encrypt+authenticate modes of operation, and the response was
> pretty underwhelming. Specifically though, you want a MAC, not a digest, to
> protect the content. PGP uses a straight hash, but protects it by encrypting
> it alongside the content. If you use a hash then besides the obvious weakness
> of not protecting it from modification, you also leak information about the
> content in the hash.
Hi Peter:
Actually since the hash is generated by digesting the encrypted data,
no information would be leaked, since that data is encrypted with
random session keys, the resulting hash would be random as well.
There is no signifigant advantage in using an HMAC, and the encrypted
data integrity, and hence the unencrypted data integrity can be verified.
You are correct though, since the hash in an UnprotectedAttribute, it can
be replaced by an attacker. This would not gain the attacker any info on
the data itself, but the attacker would be able to corrupt the encrypted
data, and the recipient would not be able to verify its integrity since
(Continue reading)