Confusion in the micalg
parameter value for SHA-X algorithms.
#790
Labels
compatibility
Compatibility with existing software
According to the RFC-3851,
micalg
parameter value SHOULD be from the following:md5
,sha1
,sha256
,sha384
,sha512
, etc.There is no dash in the SHA-X algorithm value.
According to the RFC-5751,
micalg
parameter value SHOULD be from the following:md5
,sha-1
,sha-224
,sha-256
,sha-384
,sha-512
, etc.There is a dash in the SHA-X algorithm value.
RFC-5751 obsoletes RFC-3851 and that's why MimeKit uses dashes in SHA-X values.
MimeKit/MimeKit/Cryptography/SecureMimeContext.cs
Line 213 in 4de3405
I completely agree with your decision to follow the newest RFC.
On the other side, OpenSSL doesn't follow RFC-3851 or RFC-5751.
There is a mixed set of values:
md5
,sha1
,sha-256
,sha-384
,sha-512
, etc.I want to mention that only
sha1
does not contain a dash. All others SHA-X do.Do you know why OpenSSL mixes the notation? It uses RFC-3851 for
sha1
and RFC-5751 for others.I don't see any reason (except the historical one).
But maybe you (as an expert) have got some ideas.
P.S.
Thank you for your great library and your efforts.
I should ask this question in the OpenSSL repository but this
micalg
mismatch drives me crazy and maybe you'll find a time to answer me.The text was updated successfully, but these errors were encountered: