1 / 18

ASN.1

ASN.1. CNS 4650 Fall 2004 Rev. 2. What is ASN.1. Abstract Syntax Notation One Overcome how different computer systems transmit data Model parameters exchanged between application entities. Why ASN.1?. What was available at the time Different hardware Different development languages.

jalena
Download Presentation

ASN.1

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ASN.1 CNS 4650 Fall 2004 Rev. 2

  2. What is ASN.1 • Abstract Syntax Notation One • Overcome how different computer systems transmit data • Model parameters exchanged between application entities

  3. Why ASN.1? • What was available at the time • Different hardware • Different development languages

  4. “Endian” Problem • Taken from Gulliver’s Travels • Whether eggs should be broken on top or bottom • “Little Endian” refers to machines that read bytes right to left (Intel) • “Big Endian” refers to machines that read bytes left to right (Motorola, IBM, SUN) • Data cannot be transferred directly between the two • Tanenbaum’s Stegosaurus”

  5. How to Solve the “Endian” Problem • Marshalling of data • Single “Syntax” • Solutions today • CORBA • ASN.1 • Java and .Net (kind of…)

  6. Development Languages • Languages do not all contain the same data types • For instance C does not really have a boolean it is usually simulated • C requires ‘\0’ to terminate a string, this is not always the case in other languages • Without “standard” types who has to manipulate the data? The sender or receiver?

  7. Backus-Naur Format (BNF) • Formal way to describe formal languages • Most often used to describe computer languages • Designed to be unambiguous

  8. Built-in Language Types • Boolean • Integer • Octet string • Null • Sequence • Set • Many more

  9. Built-in Syntax Definitions • IA5 String • Numeric String • UTC Time • Printable String

  10. BNF Examples • Begin with general then to specifics • Uses := { } [ ] | • := is the left must be replaced by the right • { } [ ] is for formating and grouping • | is for “or”

  11. BNF ASN.1 Example File := SEQUENCE { Owner Owner, fileName PrintableString, createDate UTCTime, contents Any } Owner := SEQUENCE { personalName IA5String, organizationalName IA5String }

  12. Encoding Rules • Basic Encoding Rules (BER) • Distinguished Encoding Rules (DER) • Canonical Encoding Rules (CER) • Packet Encoding Rules (PER)

  13. Basic Encoding Rules (BER) • Represent ASN.1 values as an octect string • Three encoding methods\ • Primitive, definite length • Constructed, definite length • Constructed, indefinite length

  14. BER Parts • TLV • Tag octet • Length octet • Value octet

  15. Distinguished Encoding Rules (DER) • Subset of BER • Exactly one way to represent the octet string • Restricts certain types (BIT STRING) beyond BER • Used for digital certificates

  16. ASN.1 and OIDs • Used by LDAP, Kerberos, and SNMP • Value used to uniquely identify every objectclass and attribute • Object Indentifer (OID) is same as ASN.1

  17. OIDs • Sub-arc • Example: 1.3.6.1.4.1.17946.1 • No standard on how to delegate number after arc • De-facto standard is to place all objectclasses under a sub-arc and all attributes under a separate sub-arc

  18. How to read ASN.1 Numbers

More Related