[6] [DFN[[[ASN.1]]]] は、[[データ構造]]の[[記述][データ形式]]に関する仕様です。
多くの [[ISO/IEC]] や [[ITU]] の[[国際規格]]で採用されています。

* 符号化規則

[7] [[ASN.1]] は抽象構文なので、実際のファイルやネットワークのデータとしては何らかの具体的な符号化方式により表現する必要があります。
次の方式が規定されています。

[FIG(short list)[ [19] [[ASN.1]] の符号化規則
- [[BER]]
- [[CER]]
- [[DER]]
- [[PER]]
- [[XER]]
-- [[BASIC-XER]]
-- [[CXER]]
-- [[EXTENDED-XER]]
- [[OER]]
- [[X.694]]
]FIG]

* データ型

[FIG(short list)[ [21] [[ASN.1]] のデータ形式
- [[ASN.1の日時形式]]
]FIG]

* 応用

[8] [[ASN.1]] は次の場面で使われています。
[FIG(short list)[
- [[LDAP]]
- [[証明書]]
- [[CSR]]
- [[PKCS #7]]
- [[PKCS #12]]
- [[Netscape Certificate Sequence]]
- [[OCSP]]
- [[ISO/IEC 2022]]
- [[Fast Infoset]]
]FIG]

* メモ


[1]
[CITE[ASN.1 Information Site]] <http://asn1.elibel.tm.fr/>
([[名無しさん]])


[2]
[CITE[ASN.1 バイナリ変換規則 (BER, CER, DER)]] <http://www.geocities.co.jp/SiliconValley-SanJose/3377/>

[3] 1988年版、1997年版があります。

[FIG(quote)[
[FIGCAPTION[
[4] [CITE@en[RFC 5280 - Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile]]
([TIME[2015-02-22 15:44:10 +09:00]] 版)
<http://tools.ietf.org/html/rfc5280#section-4>
]FIGCAPTION]

> The ISO/IEC and ITU-T documents use
>    the 1997 version of ASN.1; while this document uses the 1988 ASN.1
>    syntax, the encoded certificate and standard extensions are
>    equivalent.

]FIG]


[FIG(quote)[
[FIGCAPTION[
[5] [CITE@en[RFC 5280 - Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile]]
([TIME[2015-02-22 15:44:10 +09:00]] 版)
<http://tools.ietf.org/html/rfc5280#appendix-A>
]FIGCAPTION]

> This appendix describes data objects used by conforming PKI
>    components in an "ASN.1-like" syntax.  This syntax is a hybrid of the
>    1988 and 1993 ASN.1 syntaxes.  The 1988 ASN.1 syntax is augmented
>    with 1993 UNIVERSAL Types UniversalString, BMPString, and UTF8String.
>    The ASN.1 syntax does not permit the inclusion of type statements in
>    the ASN.1 module, and the 1993 ASN.1 standard does not permit use of
>    the new UNIVERSAL types in modules using the 1988 syntax.  As a
>    result, this module does not conform to either version of the ASN.1
>    standard.
>    This appendix may be converted into 1988 ASN.1 by replacing the
>    definitions for the UNIVERSAL Types with the 1988 catch-all "ANY".

]FIG]


[FIG(quote)[
[FIGCAPTION[
[9] [CITE@en-GB-x-hixie[HTML Standard]]
([TIME[2015-03-15 01:40:28 +09:00]] 版)
<https://html.spec.whatwg.org/#the-keygen-element>
]FIGCAPTION]

> These definitions use the same "ASN.1-like" syntax defined by RFC 5280.

]FIG]


[10] [CITE@en[X.680 : Information technology - Abstract Syntax Notation One (ASN.1): Specification of basic notation]]
([[tsbmail]] 著, [TIME[2015-04-13 09:11:40 +09:00]] 版)
<http://www.itu.int/rec/T-REC-X.680-200811-I/en>

[11] [CITE@en[ITU-T Study Group 10 - Languages for Telecommunication Systems]]
([[tsbedh]] 著, [TIME[2002-09-30 21:33:26 +09:00]] 版)
<http://www.itu.int/ITU-T/studygroups/com10/languages/>

[12] [CITE@en[gbarr/perl-Convert-ASN1: encode/decode data using ASN.1 description]]
( ([TIME[2016-05-29 11:54:20 +09:00]]))
<https://github.com/gbarr/perl-Convert-ASN1>

[13] [CITE[Convert::ASN1 - search.cpan.org]]
( ([TIME[2016-05-29 11:53:09 +09:00]]))
<http://search.cpan.org/~gbarr/Convert-ASN1-0.27/lib/Convert/ASN1.pod>

[14] [CITE[Convert::ASN1 - search.cpan.org]]
( ([TIME[2016-05-29 11:56:35 +09:00]]))
<http://search.cpan.org/dist/Convert-ASN1/lib/Convert/ASN1.pod>

[15] [CITE[ASN.1 データ生成/解析の事始 — SOUM/misc]]
( ([TIME[2016-04-28 15:38:02 +09:00]]))
<http://soum.co.jp/misc/tanino/asn1/index.html>

[16] 
[[JISC]] の[[対応国際規格]]検索で [[ISO 3166]] を調べるとなぜか [[JISX5007]] (開放型システム間相互接続−オブジェクト識別子の構成) が出てくる。

[17] 
>>16 [DFN[JIS X 5007‐1990]] は [DFN[ISO 8824]] の [[MOD]] 規格で、 ISO 3166 ([[JISX0304]]) は単に引用しているだけらしい。 (JISC の検索で出てくるのはへんだけど。。。)


[18] [CITE@en[Switch to DER-encoded ASN.1 · Issue #47 · WICG/webpackage]]
([TIME[2017-07-05 16:05:33 +09:00]])
<https://github.com/WICG/webpackage/issues/47>

[20] [CITE@en[gbarr/perl-Convert-ASN1: encode/decode data using ASN.1 description]]
([TIME[2018-08-11 20:43:30 +09:00]])
<https://github.com/gbarr/perl-Convert-ASN1>

[22] [DFN[KS X ISO/IEC 8824-1:2014]],
[DFN[KS X ISO/IEC 8824-2:2014]],
[DFN[KS X ISO/IEC 8824-3:2014]],
[DFN[KS X ISO/IEC 8824-4:2014]],
[DFN[KS X ISO/IEC 8825-1:2014]],
[DFN[KS X ISO/IEC 8825-2:2014]],
[DFN[KS X ISO/IEC 8825-3:2014]],
[DFN[KS X ISO/IEC 8825-4:2014]]