[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
6.2 Used S-expressions
Libgcrypt’s API for asymmetric cryptography is based on data structures called S-expressions (see http://people.csail.mit.edu/rivest/sexp.html) and does not work with contexts as most of the other building blocks of Libgcrypt do.
The following information are stored in S-expressions:
- keys
- plain text data
- encrypted data
- signatures
To describe how Libgcrypt expect keys, we use examples. Note that words in uppercase indicate parameters whereas lowercase words are literals.
Note that all MPI (multi-precision-integers) values are expected to be in
GCRYMPI_FMT_USG
format. An easy way to create S-expressions is
by using gcry_sexp_build
which allows to pass a string with
printf-like escapes to insert MPI values.
6.2.1 RSA key parameters | Parameters used with an RSA key. | |
6.2.2 DSA key parameters | Parameters used with a DSA key. | |
6.2.3 ECC key parameters | Parameters used with ECC keys. |
This document was generated on February 9, 2014 using texi2html 5.0.