public-square/jwk-multibase-key-converter-php

Enables conversion of multibase strings to/from JWK, limited to secp256k1 and P-384. Additionally, has support for did:key method spec.

v0.1.1 2023-03-28 17:19 UTC

This package is auto-updated.

Last update: 2024-10-30 01:37:34 UTC


README

Latest Stable Version Total Downloads Latest Unstable Version License

Information

This library is a tool to assist in the conversion of Multibase/Multicodec strings and did:key method spec keys to JWK, and vice versa. It utilizes Multibase/Multicodec, Simplito-EC, and JWT Framework to aid in these conversions.

For more information on the did:key spec, please read the current unofficial draft here.

Currently, this libary only supports the following curves:

  • secp256k1
  • nistp384

OpenSSL and Windows

In order for key generation to work on Windows machines, this Installation documentation must be done correctly, specifically regarding openssl.cnf.

How It Works

Requirements

  • >= PHP 8.1
  • composer
  • ext-gmp

Installation

You can install this library via Composer :

composer require public-square/jwk-multibase-key-converter-php

Contribute

Please open a pull request.

License

This software is release under MIT license.