Discussions
Categories
- 197.1K All Categories
- 2.5K Data
- 548 Big Data Appliance
- 1.9K Data Science
- 451K Databases
- 222K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 32 Multilingual Engine
- 556 MySQL Community Space
- 479 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3.1K ORDS, SODA & JSON in the Database
- 558 SQLcl
- 4K SQL Developer Data Modeler
- 187.3K SQL & PL/SQL
- 21.4K SQL Developer
- 296.6K Development
- Application Development
- 18 Developer Projects
- 140 Programming Languages
- 293.3K Development Tools
- 112 DevOps
- 3.1K QA/Testing
- 646.1K Java
- 28 Java Learning Subscription
- 37K Database Connectivity
- 161 Java Community Process
- 105 Java 25
- 22.1K Java APIs
- 138.2K Java Development Tools
- 165.3K Java EE (Java Enterprise Edition)
- 21 Java Essentials
- 162 Java 8 Questions
- 86K Java Programming
- 81 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.3K Java SE
- 13.8K Java Security
- 205 Java User Groups
- 24 JavaScript - Nashorn
- Programs
- 493 LiveLabs
- 39 Workshops
- 10.2K Software
- 6.7K Berkeley DB Family
- 3.5K JHeadstart
- 5.7K Other Languages
- 2.3K Chinese
- 175 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 235 Portuguese
RSA Public Key ASN.1 DER Encoded Output
843811
Member Posts: 49,851
in Cryptography
Hi all,
I managed to created a pair of RSA Keys and print out the ASN.1 DER encoded format of the RSAPublicKey via getEncoded() method.
The beginning few blob (in hex.) of the output is:
30 82 01 22 30 0d 06 09 2a 86 48 86 f7 0d 01 01 01 05 00 03 82 01...
My understanding of SubjectPublicKeyInfo ASN.1 structure and DER encoding allows me to understand mostly what I have written above; however, I am wondering what the first few blobs represents.
For the blob above, I interpret the first few blobs as the ASN.1's SEQUENCE; with DER Tag 0x30, then followed by DER Length 0x82; however, the DER Value doesn't start with another SEQUENCE for ASN.1 AlgorithIdentifier.
What I mean is, what are the DER Value 0x01 0x22 (the 3rd and 4th hex. blob) in above mean? Shouldn't AlgorithmIdentifier be there, instead of after these blobs?
Thanks.
Hon Hwang.
I managed to created a pair of RSA Keys and print out the ASN.1 DER encoded format of the RSAPublicKey via getEncoded() method.
The beginning few blob (in hex.) of the output is:
30 82 01 22 30 0d 06 09 2a 86 48 86 f7 0d 01 01 01 05 00 03 82 01...
My understanding of SubjectPublicKeyInfo ASN.1 structure and DER encoding allows me to understand mostly what I have written above; however, I am wondering what the first few blobs represents.
For the blob above, I interpret the first few blobs as the ASN.1's SEQUENCE; with DER Tag 0x30, then followed by DER Length 0x82; however, the DER Value doesn't start with another SEQUENCE for ASN.1 AlgorithIdentifier.
What I mean is, what are the DER Value 0x01 0x22 (the 3rd and 4th hex. blob) in above mean? Shouldn't AlgorithmIdentifier be there, instead of after these blobs?
Thanks.
Hon Hwang.
This discussion has been closed.