1 / 28

CITA 440 Week 3

CITA 440 Week 3. ASN.1. ASN.1. A formal language developed jointly by CCITT (ITU-T) and ISO/IEC for use with application layers for data transfer between systems Can generate machine-readable code: Basic Encoding Rules (BER) can be used. Standards Using ASN.1. Application fields of ASN.1.

Télécharger la présentation

CITA 440 Week 3

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. CITA 440 Week 3 ASN.1

  2. ASN.1 • A formal language developed jointly by CCITT (ITU-T) and ISO/IEC for use with application layers for data transfer between systems • Can generate machine-readable code: BasicEncoding Rules (BER) can be used

  3. Standards Using ASN.1

  4. Application fields of ASN.1 • http://www.itu.int/en/ITU-T/asn1/Pages/Application-fields-of-ASN-1.aspx

  5. Abstract Syntax

  6. ASN.1 Example -- type definition of Person-Name type: Person-Name ::= SEQUENCE { first VisibleString, middle VisibleString, last VisibleString } -- value assignment of an actual person name: person-name Person-Name ::= { first "John", middle "I", last "Smith" }

  7. ASN.1 • Layout is not significant; multiple spaces and line breaks can be considered as a single space. • Comments are delimited by a pair of hyphens (--) and a line break. • Type references (names of types) and identifiers (names of objects) and consist of upper- and lower-case letters, digits, hyphens, and spaces; identifiers begin with lower-case letters; type references begin with upper-case letters.

  8. ASN.1 Symbols SymbolMeaning ::= defined as | or, alternative, options of a list - signed number -- following the symbol are comments {} start and end of a list [] start and end of a tag () start and end of subtype .. range

  9. ASN.1 Conventions

  10. ASN.1 Simple Types

  11. ASN.1 Simple Types

  12. ASN.1 Simple Types

  13. ASN.1 Type Definitions

  14. ASN.1 Subtype Definitions

  15. ASN.1 Value Assignments

  16. ASN.1 OBJECT IDENTIFIER Assignments

  17. ASN.1 Structured Types: SEQUENCE

  18. ASN.1 Structured Types: SEQUENCE OF

  19. ASN.1 Structured Types: SET

  20. ASN.1 Structured Types: SET OF

  21. ASN.1 Data Types • Simple types: • PageNumber ::= INTEGER • ChapterNumber ::= INTEGER • Structured types: • BookPageNumber ::= SEQUENCE {ChapterNumber, Separator, PageNumber} • Example: 1-1, 2-3, 3-39 • Tagged types: • Derived from another type; given a new tag ID • Other types: • CHOICE, ANY

  22. ASN.1 Module Definitions <module name> DEFINITIONS ::= BEGIN <name> ::= <definition> … <name> ::= <definition> END

  23. ASN.1 Data Type Definition Example

  24. ASN.1 Data Type Definition Example

  25. Tag • Tag uniquely identifies a data type • Comprises class and tag number • Class: • Universal • Application • Context-specific • Private (used extensively by commercial vendors)

  26. ASN.1 OBJECT-IDENTITY Macro Example

  27. ASN.1 Example A keyboard has 44 keys in 4 rows of 11 keys per row. Each of the keys can be pressed or not pressed. It is permitted to press multiple keys at the same time. Specify an ASN.1 declaration for transferring information about which of the keys are pressed.

  28. Solutions • Solution 1: KeyPosition ::= SEQUENCE {row INTEGER(1..4), column INTEGER(1..11)} PressedKeys ::= SET OF KeyPosition • Solution 2: Keyboard ::= SET OF SEQUENCE {row INTEGER(1..4), column INTEGER(1..11), pressed BOOLEAN}

More Related