All of lore.kernel.org
 help / color / mirror / Atom feed
From: AKASHI Takahiro <takahiro.akashi@linaro.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 10/16] doc: add README for asn1 compiler and decoder
Date: Wed, 13 Nov 2019 09:44:56 +0900	[thread overview]
Message-ID: <20191113004502.29986-11-takahiro.akashi@linaro.org> (raw)
In-Reply-To: <20191113004502.29986-1-takahiro.akashi@linaro.org>

This document gives a brief description about ASN1 compiler as well as
ASN1 decoder.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
---
 doc/README.asn1 | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)
 create mode 100644 doc/README.asn1

diff --git a/doc/README.asn1 b/doc/README.asn1
new file mode 100644
index 000000000000..1359b93aef0b
--- /dev/null
+++ b/doc/README.asn1
@@ -0,0 +1,40 @@
+ASN1
+====
+
+Abstract Syntax Notation One (or ASN1) is a standard by ITU-T and ISO/IEC
+and used as a description language for defining data structure in
+an independent manner.
+Any data described in ASN1 notation can be serialized (or encoded) and
+de-serialized (or decoded) with well-defined encoding rules.
+
+A combination of ASN1 compiler and ASN1 decoder library function will
+provide a function interface for parsing encoded binary into specific
+data structure:
+1) define data structure in a text file (*.asn1)
+2) define "action" routines for specific "tags" defined in (1)
+3) generate bytecode as a C file (*.asn1.[ch]) from *.asn1 file
+   with ASN1 compiler (tools/asn1_compiler)
+4) call a ASN1 decoder (asn1_ber_decoder()) with bytecode and data
+
+Usage of ASN1 compiler
+----------------------
+  asn1_compiler [-v] [-d] <grammar-file> <c-file> <hdr-file>
+
+  <grammar-file>:	ASN1 input file
+  <c-file>:		generated C file
+  <hdr-file>:		generated include file
+
+Usage of ASN1 decoder
+---------------------
+  int asn1_ber_decoder(const struct asn1_decoder *decoder, void *context,
+		       const unsigned char *data, size_t datalen);
+
+  @decoder:		bytecode binary
+  @context:		context for decoder
+  @data:		data to be parsed
+  @datalen:		size of data
+
+
+As of writing this, ASN1 compiler and decoder are used to implement
+X509 certificate parser, pcks7 message parser and RSA public key parser
+for UEFI secure boot.
-- 
2.21.0

  parent reply	other threads:[~2019-11-13  0:44 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-13  0:44 [U-Boot] [PATCH v3 00/16] import x509/pkcs7 parsers from linux AKASHI Takahiro
2019-11-13  0:44 ` [U-Boot] [PATCH v3 01/16] linux_compat: move kmemdup() from ubifs.c to linux_compat.c AKASHI Takahiro
2019-11-26  3:20   ` Heinrich Schuchardt
2019-12-06 21:48   ` Tom Rini
2019-11-13  0:44 ` [U-Boot] [PATCH v3 02/16] rtc.h: add struct udevice declaration AKASHI Takahiro
2019-12-06 21:48   ` Tom Rini
2019-11-13  0:44 ` [U-Boot] [PATCH v3 03/16] rtc: move date.c from drivers/rtc/ to lib/ AKASHI Takahiro
2019-12-06 21:48   ` Tom Rini
2019-11-13  0:44 ` [U-Boot] [PATCH v3 04/16] lib: add mktime64() for linux compatibility AKASHI Takahiro
2019-12-06 21:49   ` Tom Rini
2019-11-13  0:44 ` [U-Boot] [PATCH v3 05/16] include: kernel.h: include printk.h AKASHI Takahiro
2019-11-26  3:35   ` Heinrich Schuchardt
2019-11-27  1:02     ` AKASHI Takahiro
2019-12-06 21:49   ` Tom Rini
2019-12-09  1:21     ` AKASHI Takahiro
2019-11-13  0:44 ` [U-Boot] [PATCH v3 06/16] linux/time.h: include vsprintf.h AKASHI Takahiro
2019-11-26  3:56   ` Heinrich Schuchardt
2019-11-26  7:31     ` Heinrich Schuchardt
2019-11-27  1:27       ` AKASHI Takahiro
2019-12-06 21:49   ` Tom Rini
2019-11-13  0:44 ` [U-Boot] [PATCH v3 07/16] cmd: add asn1_compiler AKASHI Takahiro
2019-12-06 21:49   ` Tom Rini
2019-11-13  0:44 ` [U-Boot] [PATCH v3 08/16] Makefile: add build script for asn1 parsers AKASHI Takahiro
2019-12-06 21:49   ` Tom Rini
2019-11-13  0:44 ` [U-Boot] [PATCH v3 09/16] lib: add asn1 decoder AKASHI Takahiro
2019-12-06 21:49   ` Tom Rini
2019-11-13  0:44 ` AKASHI Takahiro [this message]
2019-12-06 21:49   ` [U-Boot] [PATCH v3 10/16] doc: add README for asn1 compiler and decoder Tom Rini
2019-11-13  0:44 ` [U-Boot] [PATCH v3 11/16] lib: add oid registry utility AKASHI Takahiro
2019-12-06 21:49   ` Tom Rini
2019-11-13  0:44 ` [U-Boot] [PATCH v3 12/16] lib: crypto: add public key utility AKASHI Takahiro
2019-12-06 21:49   ` Tom Rini
2019-11-13  0:44 ` [U-Boot] [PATCH v3 13/16] lib: crypto: add rsa public key parser AKASHI Takahiro
2019-12-06 21:49   ` Tom Rini
2019-11-13  0:45 ` [U-Boot] [PATCH v3 14/16] lib: crypto: add x509 parser AKASHI Takahiro
2019-12-06 21:50   ` Tom Rini
2019-12-07 20:51     ` Heinrich Schuchardt
2019-12-07 22:34       ` Tom Rini
2019-12-09  0:59         ` AKASHI Takahiro
2019-11-13  0:45 ` [U-Boot] [PATCH v3 15/16] lib: crypto: add pkcs7 message parser AKASHI Takahiro
2019-12-06 21:50   ` Tom Rini
2019-11-13  0:45 ` [U-Boot] [PATCH v3 16/16] test: add asn1 unit test AKASHI Takahiro
2019-12-06 21:50   ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191113004502.29986-11-takahiro.akashi@linaro.org \
    --to=takahiro.akashi@linaro.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.