15 releases

0.3.7 Oct 31, 2025
0.3.6 Mar 31, 2025
0.3.3 Dec 16, 2024
0.3.1 Jan 29, 2024
0.2.1 Jul 23, 2021

#4 in #hyperledger

Download history 513/week @ 2026-02-24 427/week @ 2026-03-03 689/week @ 2026-03-10 951/week @ 2026-03-17 1367/week @ 2026-03-24 805/week @ 2026-03-31 1218/week @ 2026-04-07 1277/week @ 2026-04-14 1005/week @ 2026-04-21 1312/week @ 2026-04-28 853/week @ 2026-05-05 773/week @ 2026-05-12 942/week @ 2026-05-19 1086/week @ 2026-05-26 836/week @ 2026-06-02 572/week @ 2026-06-09

3,559 downloads per month
Used in 8 crates (4 directly)

MIT/Apache

295KB
7.5K SLoC

askar-crypto

Rust Crate Rust Documentation

The askar-crypto crate provides the basic key representations and cryptographic operations used by Askar.

Supported Key Types

Key Type Feature Operations Notes
AES-GCM aes AEAD encryption
JWK export
A128GCM and A256GCM
AES-CBC-HMAC-SHA2 aes AEAD encryption
JWK export
A128CBC-HS256 and A256CBC-HS512
AES Key Wrap aes Authenticated encryption
JWK export
A128KW and A256KW
(X)ChaCha20-Poly1305 chacha AEAD encryption
JWK export
aka C20P, XC20P
BLS12-381 bls bls-signature1 key generation
JWK import/export
G1 and G2 key types
Ed25519 ed25519 EdDSA signatures
JWK import/export
Conversion to X25519
X25519 ed25519 DH key exchange
JWK import/export
K-256 k256 ECDSA signatures
DH key exchange
JWK import/export
aka secp256k1
P-256 p256 ECDSA signatures
DH key exchange
JWK import/export
aka nist256p1, secp256r1

1. Compatible with bls-signature RFC draft 4 https://tools.ietf.org/html/draft-irtf-cfrg-bls-signature-04

'Any' Key support

The any_key feature (which depends on alloc) provides a generic interface for creating and working with any supported key type.

JSON Web Algorithms

This crate provides implementations of the ECDH-ES and ECDH-1PU (draft 4) key agreement operations, for use in deriving a content encryption or key wrapping key. These primitives can be used when producing or consuming JWE envelopes using these algorithms.

no-std

This crate supports the optional alloc feature, gating types and operations that depend on a global allocator. The std feature depends on alloc, and adds support for std::error::Error.

License

Licensed under either of

at your option.

Dependencies

~2–17MB
~186K SLoC