[−][src]Enum biscuit::jwa::KeyManagementAlgorithm
Algorithms for key management as defined in RFC7518#4
Variants
RSAES-PKCS1-v1_5
RSAES OAEP using default parameters
RSAES OAEP using SHA-256 and MGF1 with SHA-256
AES Key Wrap using 128-bit key. Unsupported
AES Key Wrap using 192-bit key. Unsupported.
This is not supported by ring
.
AES Key Wrap using 256-bit key. Unsupported
Direct use of a shared symmetric key
ECDH-ES using Concat KDF
ECDH-ES using Concat KDF and "A128KW" wrapping
ECDH-ES using Concat KDF and "A192KW" wrapping
ECDH-ES using Concat KDF and "A256KW" wrapping
Key wrapping with AES GCM using 128-bit key alg
Key wrapping with AES GCM using 192-bit key alg.
This is not supported by ring
.
Key wrapping with AES GCM using 256-bit key alg
PBES2 with HMAC SHA-256 and "A128KW" wrapping
PBES2 with HMAC SHA-384 and "A192KW" wrapping
PBES2 with HMAC SHA-512 and "A256KW" wrapping
Implementations
impl KeyManagementAlgorithm
[src]
pub fn algorithm_type(self) -> KeyManagementAlgorithmType
[src]
Returns the type of operations that the algorithm is intended to support
pub fn cek<T>(
self,
content_alg: ContentEncryptionAlgorithm,
key: &JWK<T>
) -> Result<JWK<Empty>, Error> where
T: Serialize + DeserializeOwned,
[src]
self,
content_alg: ContentEncryptionAlgorithm,
key: &JWK<T>
) -> Result<JWK<Empty>, Error> where
T: Serialize + DeserializeOwned,
Return the Content Encryption Key (CEK) based on the key management algorithm
If the algorithm is dir
or DirectSymmetricKey
, the key provided is the CEK.
Otherwise, the appropriate algorithm will be used to derive or generate the required CEK
using the provided key.
pub fn wrap_key<T: Serialize + DeserializeOwned>(
self,
payload: &[u8],
key: &JWK<T>,
options: &EncryptionOptions
) -> Result<EncryptionResult, Error>
[src]
self,
payload: &[u8],
key: &JWK<T>,
options: &EncryptionOptions
) -> Result<EncryptionResult, Error>
Encrypt or wrap a Content Encryption Key with the provided algorithm
pub fn unwrap_key<T: Serialize + DeserializeOwned>(
self,
encrypted: &EncryptionResult,
content_alg: ContentEncryptionAlgorithm,
key: &JWK<T>
) -> Result<JWK<Empty>, Error>
[src]
self,
encrypted: &EncryptionResult,
content_alg: ContentEncryptionAlgorithm,
key: &JWK<T>
) -> Result<JWK<Empty>, Error>
Decrypt or unwrap a CEK with the provided algorithm
Trait Implementations
impl Clone for KeyManagementAlgorithm
[src]
fn clone(&self) -> KeyManagementAlgorithm
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for KeyManagementAlgorithm
[src]
impl Debug for KeyManagementAlgorithm
[src]
impl Default for KeyManagementAlgorithm
[src]
impl<'de> Deserialize<'de> for KeyManagementAlgorithm
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Eq for KeyManagementAlgorithm
[src]
impl PartialEq<KeyManagementAlgorithm> for KeyManagementAlgorithm
[src]
fn eq(&self, other: &KeyManagementAlgorithm) -> bool
[src]
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl Serialize for KeyManagementAlgorithm
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralEq for KeyManagementAlgorithm
[src]
impl StructuralPartialEq for KeyManagementAlgorithm
[src]
Auto Trait Implementations
impl RefUnwindSafe for KeyManagementAlgorithm
impl Send for KeyManagementAlgorithm
impl Sync for KeyManagementAlgorithm
impl Unpin for KeyManagementAlgorithm
impl UnwindSafe for KeyManagementAlgorithm
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,