Skip to content

Commit

Permalink
Merge pull request #12 from andrewwhitehead/more-keys
Browse files Browse the repository at this point in the history
0.2.0-pre.5 updates
  • Loading branch information
andrewwhitehead authored May 18, 2021
2 parents 9855e91 + 7269301 commit 999fb09
Show file tree
Hide file tree
Showing 18 changed files with 1,012 additions and 920 deletions.
21 changes: 13 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ members = ["askar-crypto"]

[package]
name = "aries-askar"
version = "0.2.0-pre.4"
version = "0.2.0-pre.5"
authors = ["Hyperledger Aries Contributors <aries@lists.hyperledger.org>"]
edition = "2018"
description = "Hyperledger Aries Askar secure storage"
Expand All @@ -27,7 +27,7 @@ rustdoc-args = ["--cfg", "docsrs"]
default = ["all_backends", "ffi", "logger"]
all_backends = ["any", "postgres", "sqlite"]
any = []
ffi = ["any", "ffi-support", "logger"]
ffi = ["any", "ffi-support", "logger", "option-lock"]
jemalloc = ["jemallocator"]
logger = ["env_logger", "log"]
postgres = ["sqlx", "sqlx/postgres", "sqlx/tls"]
Expand All @@ -38,22 +38,22 @@ pg_test = ["postgres"]
hex-literal = "0.3"

[dependencies]
askar-crypto = { version = "0.2.0-pre.4", path = "./askar-crypto", features = ["argon2", "std"] }
async-mutex = "1.4"
async-lock = "2.4"
async-stream = "0.3"
bs58 = "0.4"
chrono = "0.4"
digest = "0.9"
env_logger = { version = "0.7", optional = true }
ffi-support = { version = "0.4", optional = true }
futures-lite = "1.7"
futures-lite = "1.11"
hex = "0.4"
hmac = "0.10"
hmac = "0.11"
indy-wql = "0.4"
itertools = "0.9"
itertools = "0.10"
jemallocator = { version = "0.3", optional = true }
log = { version = "0.4", optional = true }
num_cpus = { version = "1.0", optional = true }
option-lock = { version = "0.3", optional = true }
once_cell = "1.5"
percent-encoding = "2.0"
serde = { version = "1.0", features = ["derive"] }
Expand All @@ -64,7 +64,12 @@ sha2 = "0.9"
tokio = { version = "1.5", features = ["time"] }
url = { version = "2.1", default-features = false }
uuid = { version = "0.8", features = ["v4"] }
zeroize = "1.1"
zeroize = "1.3"

[dependencies.askar-crypto]
version = "0.2.0-pre.5"
path = "./askar-crypto"
features = ["all_keys", "any_key", "argon2", "crypto_box", "std"]

[dependencies.sqlx]
version = "=0.5.1"
Expand Down
4 changes: 2 additions & 2 deletions askar-crypto/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "askar-crypto"
version = "0.2.0-pre.4"
version = "0.2.0-pre.5"
authors = ["Hyperledger Aries Contributors <aries@lists.hyperledger.org>"]
edition = "2018"
description = "Hyperledger Aries Askar cryptography"
Expand Down Expand Up @@ -69,4 +69,4 @@ serde-json-core = { version = "0.4", default-features = false }
subtle = "2.4"
sha2 = { version = "0.9", default-features = false }
x25519-dalek = { version = "1.1", default-features = false, features = ["u64_backend"], optional = true }
zeroize = { version = "1.1.0", features = ["zeroize_derive"] }
zeroize = { version = "1.3", features = ["zeroize_derive"] }
28 changes: 15 additions & 13 deletions askar-crypto/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,27 @@ The `askar-crypto` crate provides the basic key representations and cryptographi

## Supported Key Types

| Key Type | Feature | Operations | Notes |
| -------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------- |
| AES-GCM | `aes` | AEAD encryption<br>JWK export | A128GCM and A256GCM |
| AES-CBC-HMAC-SHA2 | `aes` | AEAD encryption<br>JWK export | A128CBC-HS256 and A256CBC-HS512 |
| AES Key Wrap | `aes` | AEAD encryption<br>JWK export | A128KW and A256KW |
| (X)ChaCha20-Poly1305 | `chacha` | AEAD encryption<br>JWK export | aka C20P, XC20P |
| BLS12-381 | `bls` | [`bls-signature`](https://tools.ietf.org/html/draft-irtf-cfrg-bls-signature-04)-compatible key generation<br>JWK import/export | G1, G2, and G1G2 key types |
| Ed25519 | `ed25519` | EdDSA signatures<br>JWK import/export | |
| X25519 | `ed25519` | DH key exchange<br>JWK import/export | |
| K-256 | `k256` | ECDSA signatures<br>DH key exchange<br>JWK import/export | aka secp256k1 |
| P-256 | `p256` | ECDSA signatures<br>DH key exchange<br>JWK import/export | aka nist256p1, secp256r1 |
| Key Type | Feature | Operations | Notes |
| -------------------- | --------- | ------------------------------------------------------------- | ------------------------------- |
| AES-GCM | `aes` | AEAD encryption<br>JWK export | A128GCM and A256GCM |
| AES-CBC-HMAC-SHA2 | `aes` | AEAD encryption<br>JWK export | A128CBC-HS256 and A256CBC-HS512 |
| AES Key Wrap | `aes` | Authenticated encryption<br>JWK export | A128KW and A256KW |
| (X)ChaCha20-Poly1305 | `chacha` | AEAD encryption<br>JWK export | aka C20P, XC20P |
| BLS12-381 | `bls` | bls-signature<sup>1</sup> key generation<br>JWK import/export | G1, G2, and G1G2 key types |
| Ed25519 | `ed25519` | EdDSA signatures<br>JWK import/export<br>Conversion to X25519 | |
| X25519 | `ed25519` | DH key exchange<br>JWK import/export | |
| K-256 | `k256` | ECDSA signatures<br>DH key exchange<br>JWK import/export | aka secp256k1 |
| P-256 | `p256` | ECDSA signatures<br>DH key exchange<br>JWK import/export | aka nist256p1, secp256r1 |

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

## 'Any' Key support

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

## JOSE Authenticated Encryption
## JSON Web Algorithms

This crate provides implementations of the [ECDH-ES](https://tools.ietf.org/html/rfc7518#section-4.6) and [ECDH-1PU (draft 4)](https://tools.ietf.org/html/draft-madden-jose-ecdh-1pu-04) key agreement operations, for use in deriving the CEK or key wrapping key when producing or consuming JWE envelopes using these protection algorithms.
This crate provides implementations of the [ECDH-ES](https://tools.ietf.org/html/rfc7518#section-4.6) and [ECDH-1PU (draft 4)](https://tools.ietf.org/html/draft-madden-jose-ecdh-1pu-04) 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

Expand Down
Loading

0 comments on commit 999fb09

Please sign in to comment.