Can someone please clear some MDC and data encryption for me? rfc 4880 says:
The plaintext data to be encrypted is transmitted through the SHA-1 hash function, and the result of the hash is added to the plaintext in the Modification Detection Code Package. The entry into the hash function includes the prefix data above; it includes all plaintext, and then includes two octets of values ββ0xD3, 0x14. These are encodings. A package of tag definition code for the modification and a length field of 20 octets.
at first it seems that mdc (without its header data) is simple: sha1([data]) -> hash_value
then the second sentence to the semicolon makes it look like sha1(OpenPGP_CFB_extra_data + [data]) -> hash_value
the material after the semicolon makes it seem like I should do sha1([data] + "\xd3\x14") -> hash_value . (this doesnβt make sense at all, but it seems to be what is written)
what's happening?
after receiving the correct MDC, what is done with it? Is it his own package or is something like this (in my understanding) done ?:
tag18_header + encrypt(plaintext + "\xd3\x14" + 20 byte hash)
source share