PKI中经常使用编码:ASN.1 DER BER Base64

    迟到了两年的笔记...数据结构

    在PKI的应用中,常会用到如下几个编码概念:ui

   

    ASN.1(Abstract Syntax Notation One, 抽象语法标记)编码

    定义:A standard interface description language for defining data structures that can be serialized and deserialized in a cross-platform way.orm

    理解:一种用于描述事物或对象的方式,描述了对象的属性。例如:对象

             桌子 :: = SEQUENCE {ip

                   形状:方形get

                   颜色:红色string

                   材质:原木 it

            }io

 

    BER/DER(Basic Encoding Rules/Distinguished Encoding Rules)

    用ASN.1 数据结构描述对象,比较容易被人所理解,可是不利于计算机识别。在实际应用中,为了在计算机中运算解析,须要将ASN.1结构体以二进制形式表现。BER编码规定了二进制表示ASN.1数据结构的规则,DER是BER中的一种。

 

    Base64编码

    定义:Base64 is a group of similar binary-to-text encoding schemes that represent binary data in an ASCII string format by translating it into a radix-64 representation.

    理解:使用64个可见字符表示二进制数据的编码方法。

 

 

参考:

https://en.wikipedia.org/wiki/Abstract_Syntax_Notation_One

https://en.wikipedia.org/wiki/X.690#BER_encoding

https://en.wikipedia.org/wiki/X.690#DER_encoding

https://en.wikipedia.org/wiki/Base64

相关文章
相关标签/搜索