What's the hash prefixes for RIPEMD160

JavaCard Applet Development Related Questions and Answers.
DaHuFa
Posts: 53
Joined: Mon Jun 04, 2018 5:07 am
Points :392
Contact:

What's the hash prefixes for RIPEMD160

Post by DaHuFa » Thu Nov 15, 2018 6:07 am

I want Javacard to generate RSA signature. The MessageDigest algorithm is ripemd160, and padding algorithm is PKCS1. PKCS1 needs a T encoded by DER as its header. What's the T value of PKCS1 when MessageDigest algorithm is ripemd160? Or what's the hash prefixes for RIPEMD160?

wumindejia
Posts: 55
Joined: Thu Sep 22, 2016 5:05 am
Points :774
Contact:

Re: What's the hash prefixes for RIPEMD160

Post by wumindejia » Thu Nov 15, 2018 10:22 pm

OID value: 1.3.36.3.2.1

BirdKing
Posts: 86
Joined: Wed Nov 04, 2015 7:23 am
Points :654
Contact:

Re: What's the hash prefixes for RIPEMD160

Post by BirdKing » Fri Nov 16, 2018 5:36 am

- MD5: 0x30, 0x20, 0x30, 0x0C, 0x06, 0x08, 0x2A, 0x86,
- 0x48, 0x86, 0xF7, 0x0D, 0x02, 0x05, 0x05, 0x00,
- 0x04, 0x10
-
- RIPEMD-160: 0x30, 0x21, 0x30, 0x09, 0x06, 0x05, 0x2B, 0x24,
- 0x03, 0x02, 0x01, 0x05, 0x00, 0x04, 0x14
-
- SHA-1: 0x30, 0x21, 0x30, 0x09, 0x06, 0x05, 0x2b, 0x0E,
- 0x03, 0x02, 0x1A, 0x05, 0x00, 0x04, 0x14
-
- SHA256: 0x30, 0x31, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86,
- 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x05,
- 0x00, 0x04, 0x20
-
- SHA384: 0x30, 0x41, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86,
- 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x02, 0x05,
- 0x00, 0x04, 0x30
-
- SHA512: 0x30, 0x51, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86,
- 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x03, 0x05,
- 0x00, 0x04, 0x40

happy123654
Posts: 35
Joined: Wed Jun 20, 2018 4:06 am
Points :216
Contact:

Re: What's the hash prefixes for RIPEMD160

Post by happy123654 » Fri Nov 16, 2018 6:24 am

llowedDigests.put("MD2", "1.2.840.113549.2.2");
allowedDigests.put("MD-2", "1.2.840.113549.2.2");
allowedDigests.put("MD5", "1.2.840.113549.2.5");
allowedDigests.put("MD-5", "1.2.840.113549.2.5");
allowedDigests.put("SHA1", "1.3.14.3.2.26");
allowedDigests.put("SHA-1", "1.3.14.3.2.26");
allowedDigests.put("SHA224", "2.16.840.1.101.3.4.2.4");
allowedDigests.put("SHA-224", "2.16.840.1.101.3.4.2.4");
allowedDigests.put("SHA256", "2.16.840.1.101.3.4.2.1");
allowedDigests.put("SHA-256", "2.16.840.1.101.3.4.2.1");
allowedDigests.put("SHA384", "2.16.840.1.101.3.4.2.2");
allowedDigests.put("SHA-384", "2.16.840.1.101.3.4.2.2");
allowedDigests.put("SHA512", "2.16.840.1.101.3.4.2.3");
allowedDigests.put("SHA-512", "2.16.840.1.101.3.4.2.3");
allowedDigests.put("RIPEMD128", "1.3.36.3.2.2");
allowedDigests.put("RIPEMD-128", "1.3.36.3.2.2");
allowedDigests.put("RIPEMD160", "1.3.36.3.2.1");
allowedDigests.put("RIPEMD-160", "1.3.36.3.2.1");
allowedDigests.put("RIPEMD256", "1.3.36.3.2.3");
allowedDigests.put("RIPEMD-256", "1.3.36.3.2.3");
allowedDigests.put("GOST3411", "1.2.643.2.2.9")

Post Reply Previous topicNext topic

Who is online

Users browsing this forum: No registered users and 17 guests

JavaCard OS : Disclaimer