Skip to content

Commit

Permalink
Correct RIPEMD160 hash prefix per https://tools.ietf.org/html/rfc4880…
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Ragan committed Oct 25, 2019
1 parent 46e0d72 commit acd10d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/crypto/rsa/pkcs1v15.go
Expand Up @@ -213,7 +213,7 @@ var hashPrefixes = map[crypto.Hash][]byte{
crypto.SHA384: {0x30, 0x41, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x02, 0x05, 0x00, 0x04, 0x30},
crypto.SHA512: {0x30, 0x51, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x03, 0x05, 0x00, 0x04, 0x40},
crypto.MD5SHA1: {}, // A special TLS case which doesn't use an ASN1 prefix.
crypto.RIPEMD160: {0x30, 0x20, 0x30, 0x08, 0x06, 0x06, 0x28, 0xcf, 0x06, 0x03, 0x00, 0x31, 0x04, 0x14},
crypto.RIPEMD160: {0x30, 0x21, 0x30, 0x09, 0x06, 0x05, 0x2B, 0x24, 0x03, 0x02, 0x01, 0x05, 0x00, 0x04, 0x14},
}

// SignPKCS1v15 calculates the signature of hashed using
Expand Down

0 comments on commit acd10d4

Please sign in to comment.