ASN.1 Decoder
Decode and parse ASN.1 DER/BER encoded data including X.509 certificates, CSRs, and cryptographic keys.
About ASN.1 Encoding
What is ASN.1?
ASN.1 (Abstract Syntax Notation One) is an interface description language for defining data structures that can be serialized and deserialized in a platform-independent way. It's the standard for encoding cryptographic objects like certificates and keys.
Encoding Rules:
- DER (Distinguished Encoding Rules): A binary encoding that ensures unique representation. Used for X.509 certificates, CSRs, and digital signatures.
- BER (Basic Encoding Rules): More flexible binary encoding allowing multiple representations of the same data.
- PEM (Privacy Enhanced Mail): Base64 encoded DER data with BEGIN/END markers.
Common ASN.1 Objects:
- X.509 Certificates: Public key certificates used in SSL/TLS
- CSR: Certificate Signing Requests
- Private Keys: RSA, EC, DSA private keys (PKCS#1, PKCS#8)
- Public Keys: RSA, EC, DSA public keys (SubjectPublicKeyInfo)
- PKCS#7: Cryptographic Message Syntax
- PKCS#12: Personal Information Exchange
ASN.1 Tags:
- SEQUENCE (0x30): Ordered collection of fields
- SET (0x31): Unordered collection of fields
- INTEGER (0x02): Integer values
- BIT STRING (0x03): Bit strings
- OCTET STRING (0x04): Byte arrays
- OBJECT IDENTIFIER (0x06): OID values
- UTF8String (0x0C), PrintableString (0x13), etc.: Text strings