pub trait JwkStoragePQ: JwkStorage {
// Required methods
fn generate_pq_key<'life0, 'async_trait>(
&'life0 self,
key_type: KeyType,
alg: JwsAlgorithm,
) -> Pin<Box<dyn Future<Output = Result<JwkGenOutput, SingleStructError<KeyStorageErrorKind>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn pq_sign<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
key_id: &'life1 KeyId,
data: &'life2 [u8],
public_key: &'life3 PostQuantumJwk,
ctx: Option<&'life4 [u8]>,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, SingleStructError<KeyStorageErrorKind>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait;
}Expand description
Extension to the JwkStorage to handle post-quantum keys.
Required Methods§
Sourcefn generate_pq_key<'life0, 'async_trait>(
&'life0 self,
key_type: KeyType,
alg: JwsAlgorithm,
) -> Pin<Box<dyn Future<Output = Result<JwkGenOutput, SingleStructError<KeyStorageErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn generate_pq_key<'life0, 'async_trait>(
&'life0 self,
key_type: KeyType,
alg: JwsAlgorithm,
) -> Pin<Box<dyn Future<Output = Result<JwkGenOutput, SingleStructError<KeyStorageErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Generates a JWK representing a PQ key.
Sourcefn pq_sign<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
key_id: &'life1 KeyId,
data: &'life2 [u8],
public_key: &'life3 PostQuantumJwk,
ctx: Option<&'life4 [u8]>,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, SingleStructError<KeyStorageErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait,
fn pq_sign<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
key_id: &'life1 KeyId,
data: &'life2 [u8],
public_key: &'life3 PostQuantumJwk,
ctx: Option<&'life4 [u8]>,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, SingleStructError<KeyStorageErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait,
Sign the provided data using a PQ algorithm, ctx is optional for the ctx paramter of the algorithm ML-DSA.
Implementors§
impl JwkStoragePQ for JwkMemStore
JwkStoragePQ implementation for JwkMemStore based on liboqs.