Skip to content

Commit

Permalink
Add missing documentation for supported features
Browse files Browse the repository at this point in the history
  • Loading branch information
lawliet89 committed Apr 23, 2017
1 parent e15bfcc commit 2e4a332
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 2 deletions.
44 changes: 42 additions & 2 deletions doc/supported.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,20 @@ JWK is currently not used in signing JWS, pending features in `ring`. See this
| `x5t` || Can be (de)serialized; but no processing is handled at the moment. |
| `x5t#S256` || Cannot be (de)serialized. |

### JWK Key Types
#### JWK Key Types

The key
The list of key types can be found
[here](https://www.iana.org/assignments/jose/jose.xhtml#web-key-types).

_Support in the table below simply means that they can be (de)serialized from JSON input._ Support
for their use with the various algorithms is listed in the relevant section on this page.

| Key Type | Support | Remarks |
|:--------:|:-------:|:-------:|
| `EC` || |
| `RSA` || |
| `oct` || |
| `OKP` || |

### JWK Parameters for Elliptic Curve Keys

Expand All @@ -76,6 +87,20 @@ The key
| `x` || Can be (de)serialized; but cannot be used in signing and verification yet pending support from `ring`. |
| `y` || Can be (de)serialized; but cannot be used in signing and verification yet pending support from `ring`. |

#### JWK Elliptic Curve

The list of key types can be found
[here](https://www.iana.org/assignments/jose/jose.xhtml#web-key-elliptic-curve).

_Support in the table below simply means that they can be (de)serialized from JSON input._ Support
for their use with the various algorithms is listed in the relevant section on this page.

| Key Type | Support | Remarks |
|:--------:|:-------:|:--------------------------------------------------------------------:|
| `P-256` || |
| `P-384` || |
| `P-521` || [No plan to support.](https://github.com/briansmith/ring/issues/268) |

### JWK Parameters for RSA Keys

| Parameter | Support | Remarks |
Expand Down Expand Up @@ -107,6 +132,21 @@ The key
| `x` || |
| `d` || |

#### JWK Elliptic Curve

The list of key types can be found
[here](https://www.iana.org/assignments/jose/jose.xhtml#web-key-elliptic-curve).

_Support in the table below simply means that they can be (de)serialized from JSON input._ Support
for their use with the various algorithms is listed in the relevant section on this page.

| Key Type | Support | Remarks |
|:---------:|:-------:|:-------:|
| `Ed25519` || |
| `Ed448` || |
| `X25519` || |
| `X448` || |

## JSON Web Signature (JWS)

JWS is defined in [RFC 7515](https://tools.ietf.org/html/rfc7515).
Expand Down
4 changes: 4 additions & 0 deletions src/jwk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ pub enum KeyType {
/// Octet sequence, representing symmetric keys
#[serde(rename = "oct")]
Octect,
/// Octet string key pairs
#[serde(rename = "OKP")]
OctectKeyPair,
}

impl KeyType {
Expand All @@ -31,6 +34,7 @@ impl KeyType {
KeyType::EllipticCurve => "Elliptic curve (EC) key",
KeyType::RSA => "RSA Key",
KeyType::Octect => "Key byte sequence",
KeyType::OctectKeyPair => "Octet string key pairs",
}
}
}
Expand Down

0 comments on commit 2e4a332

Please sign in to comment.