RustCrypto / hashes

Collection of cryptographic hash functions written in pure Rust
1.87k stars 251 forks source link

ripemd: which OIDs to use? #408

Closed newpavlov closed 2 years ago

newpavlov commented 2 years ago

Unfortunately, ripemd has several OIDs. For example, for Ripemd160 has ISO (1.0.10118.3.0.49) and Teletrust (1.3.36.3.2.1). Go's std uses the former (see https://github.com/golang/go/issues/35495), while OpenSSL the latter.

I am inclined to use the latter in our codebase, because it looks more widespread and the ISO range contains OIDs for Streebog (see http://oid-info.com/get/1.0.10118.3.0), even though AFAIK in practice people usually use the TC26 OIDs for it.

lumag commented 2 years ago

In #415 I've used the Teletrust one. It is clearly specified so in the RFC 4880 text. The OpenSSL would also use it for the generated signatures. GnuTLS also uses the Teletrust OID.

newpavlov commented 2 years ago

@tarcieri If you don't have any objections, I plan to merge #415.