package key-parsers

  1. Overview
  2. Docs
Parsers for multiple key formats

Install

Dune Dependency

Authors

Maintainers

Sources

key-parsers-1.5.0.tbz
sha256=89d0453c28c2b17b6f04f92bee6e23e49b6a506c4b20368ca74cbd16b6543889
sha512=4efcf68cfc6b6d16a91f73efbb5fba68f55b449a6b5e8b47d2e0e7105fd48092d079920b6abf3f06d5c965da6bcd573800fe99a96ccacbdc31ace6d483044775

Description

This library provides parsers for several encodings of RSA, DSA, Diffie-Hellman or Elliptic curve public and private keys.

Published: 08 Dec 2022

README

key-parsers

Key-parsers offers parsers and printers for various asymmetric key formats.

Key_parsers

It currently comes with four submodules.

Asn1

Note that all the parsers in this module expect the raw DER encoded byte string. They don't handle PEM armoring (----BEGIN X---- and ----END X----) nor decode Base64 or hex.

Here you can find parsers for the following formats:

  • PKCS#1 encoding of RSA Private and Public keys as defined in PKCS#1 v2.2

  • PKCS#8 encoding of RSA, DSA, EC and DH Private keys as defined in RFC 5208

  • X.509 SubjectPublicKeyInfo encoding of RSA, DSA, EC and DH Public keys as defined in RFC 5280

  • DER encodings of DSA, EC and DH Parameters and Private keys as produced by OpenSSL commands such as dsaparam and gendsa

Pgp

Parsers for PGP (Pretty Good Privacy) encodings of DSA, RSA and Elgamal Public and Private keys and user IDs as defined in [RFC 4880] (https://datatracker.ietf.org/doc/html/rfc4880) Note that the parsers in this module expect raw byte string. They don't handle PEM armoring nor decode Base64 or hex.

Ltpa

Parsers for LTPA (Lightweight Third Party Authentication) encodings of RSA private and public keys.

Cvc

Parsers for CVC (Card Verifiable Certificates) encodings of RSA and EC Public keys.

Make a new version

Check that the changelog is up to date.

Create an annotated tag with the new version:

git tag --message 'Version 1.2.3' 1.2.3

Then, use dune-release:

dune-release distrib
dune-release check
dune-release publish
dune-release opam pkg
dune-release opam submit

The command dune-release bistro can do all of that in one invocation but can be more confusing if you're not used to dune-release.

Dependencies (8)

  1. zarith >= "1.4.1"
  2. result >= "1.5"
  3. ppx_deriving >= "4.0"
  4. ocaml >= "4.08.0" & < "5"
  5. hex >= "1.0.0"
  6. dune >= "2.0"
  7. cstruct >= "6.0.0"
  8. asn1-combinators >= "0.2.0" & < "0.3.0"

Dev Dependencies (1)

  1. ounit with-test & >= "2.0.0"

Used by (1)

  1. pkcs11 < "0.9.0"

Conflicts (1)

  1. ppx_driver = "v0.9.1"
OCaml

Innovation. Community. Security.