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

相關文章
相關標籤/搜索