Reputation: 783
I know it is a kind of noob question but still not able to understand, what is the need of ASN1? I do know that it is used to describe digital objects like x509 certificates. Why should we describe it instead of directly encrypt it using AES and send it to the receiver.and on top of it they encode it using DER??? totally confused and not knowing the exact business cause for its usage...
Upvotes: 1
Views: 632
Reputation: 5102
ASN.1 is both
For anything you need to send/store you need to define a format (even if they are raw bytes, more so if the data to send has a complex structure).
Think of the problem of sending a character string. There multiple things you need to decide: - What character sets you support? Do you support a way of specifying them? - Will you use null-terminated strings (ala C)? - or will you use length+value encoding? - or will you assume fixed length strings?
ASN.1's DER (or BER or PER or XER...) are ways of deciding all that for the data values that can be described using ASN.1 syntax.
Upvotes: 3