| Crates.io | json-proof-token |
| lib.rs | json-proof-token |
| version | 0.4.1 |
| created_at | 2023-11-16 16:30:45.29321+00 |
| updated_at | 2025-03-24 16:02:01.647615+00 |
| description | A library implementation based on the new JOSE Working Group draft specifications: JSON Web Proof (JWP), JSON Proof Token (JPT) and JSON Proof Algorithm (JPA). |
| homepage | |
| repository | https://github.com/Cybersecurity-LINKS/json-proof-token |
| max_upload_size | |
| id | 1037757 |
| size | 156,111 |
Here you can find a simple decoder for JSON Proof Tokens.
Rust library implementing the new JOSE Working Group drafts:
The specification work for this can be found here.
JWK is defined in RFC 7517.
NOTE: To represent BLS keys this implementation refers to draft-ietf-cose-bls-key-representations-05.
JWKs are currently used in the proof generation and verification of JWPs.
The tables below represent which kty and crv are supported at momement.
| Key Type | Support |
|---|---|
OKP |
✔ |
EC |
✔ |
RSA |
✘ |
oct |
✘ |
The standard list of Elliptic Curves can be found here:
| Curve Name | Support |
|---|---|
P-256 |
✘ |
P-384 |
✘ |
P-521 |
✘ |
secp256k1 |
✘ |
Ed25519 |
✘ |
Ed448 |
✘ |
X25519 |
✘ |
X448 |
✘ |
This list is made from the currenlty active draft Barreto-Lynn-Scott Elliptic Curve Key Representations for JOSE and COSE - v05.
| Curve Name | Support |
|---|---|
BLS12381G2 |
✔ |
BLS12381G1 |
✘ |
BLS48581G2 |
✘ |
BLS48581G2 |
✘ |
The supported algorithm are defined in in the JPA specification.
NOTE: Keep in mind that these specifications are in the early stages, and there is a high likelihood that they will undergo significant changes in the future.
| Algorithm | Support | Remarks |
|---|---|---|
SU-ES256 |
✘ | |
SU-ES384 |
✘ | |
SU-ES3512 |
✘ |
The BBS-SHAKE256 value is temporary and awaits an update to the official draft that will define names to support the ciphersuite BBS_BLS12381G1_XOF:SHAKE-256_SSWU_RO_H2G_HM2S_ specified in BBS+.:
| Algorithm | Support | Remarks |
|---|---|---|
BBS |
✔ | |
BBS-SHAKE256 |
✔ |
These are defined here:
| Algorithm | Support | Remarks |
|---|---|---|
MAC-H256 |
✘ | |
MAC-H384 |
✘ | |
MAC-H512 |
✘ | |
MAC-K25519 |
✘ | |
MAC-K448 |
✘ | |
MAC-H256K |
✘ |
| Format | Support |
|---|---|
| Compact | ✔ |
| JSON | ✘ |
| CBOR | ✘ |
Add this to your Cargo.toml:
[dependencies]
json-proof-token = "0.4.1"
Take a look at the examples.
To run the tests
cargo test