pub trait JwsDocumentExtPQC {
// Required methods
fn generate_method_pqc<'life0, 'life1, 'life2, 'async_trait, K, I>(
&'life0 mut self,
storage: &'life1 Storage<K, I>,
key_type: KeyType,
alg: JwsAlgorithm,
fragment: Option<&'life2 str>,
scope: MethodScope,
) -> Pin<Box<dyn Future<Output = Result<String, JwkStorageDocumentError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
K: JwkStoragePQ + 'async_trait,
I: KeyIdStorage + 'async_trait,
Self: 'async_trait;
fn create_jws_pqc<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait, K, I>(
&'life0 self,
storage: &'life1 Storage<K, I>,
fragment: &'life2 str,
payload: &'life3 [u8],
options: &'life4 JwsSignatureOptions,
) -> Pin<Box<dyn Future<Output = Result<Jws, JwkStorageDocumentError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
K: JwkStoragePQ + 'async_trait,
I: KeyIdStorage + 'async_trait,
Self: 'async_trait;
fn create_credential_jwt_pqc<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait, K, I, T>(
&'life0 self,
credential: &'life1 Credential<T>,
storage: &'life2 Storage<K, I>,
fragment: &'life3 str,
options: &'life4 JwsSignatureOptions,
custom_claims: Option<BTreeMap<String, Value>>,
) -> Pin<Box<dyn Future<Output = Result<Jwt, JwkStorageDocumentError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
K: JwkStoragePQ + 'async_trait,
I: KeyIdStorage + 'async_trait,
T: Clone + Serialize + DeserializeOwned + Sync + 'async_trait,
Self: 'async_trait;
fn create_presentation_jwt_pqc<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait, K, I, CRED, T>(
&'life0 self,
presentation: &'life1 Presentation<CRED, T>,
storage: &'life2 Storage<K, I>,
fragment: &'life3 str,
signature_options: &'life4 JwsSignatureOptions,
presentation_options: &'life5 JwtPresentationOptions,
) -> Pin<Box<dyn Future<Output = Result<Jwt, JwkStorageDocumentError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
K: JwkStoragePQ + 'async_trait,
I: KeyIdStorage + 'async_trait,
T: Clone + Serialize + DeserializeOwned + Sync + 'async_trait,
CRED: Clone + Serialize + DeserializeOwned + Sync + 'async_trait,
Self: 'async_trait;
}Expand description
New trait to handle PQ-based operations on DID Documents
Required Methods§
Sourcefn generate_method_pqc<'life0, 'life1, 'life2, 'async_trait, K, I>(
&'life0 mut self,
storage: &'life1 Storage<K, I>,
key_type: KeyType,
alg: JwsAlgorithm,
fragment: Option<&'life2 str>,
scope: MethodScope,
) -> Pin<Box<dyn Future<Output = Result<String, JwkStorageDocumentError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
K: JwkStoragePQ + 'async_trait,
I: KeyIdStorage + 'async_trait,
Self: 'async_trait,
fn generate_method_pqc<'life0, 'life1, 'life2, 'async_trait, K, I>(
&'life0 mut self,
storage: &'life1 Storage<K, I>,
key_type: KeyType,
alg: JwsAlgorithm,
fragment: Option<&'life2 str>,
scope: MethodScope,
) -> Pin<Box<dyn Future<Output = Result<String, JwkStorageDocumentError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
K: JwkStoragePQ + 'async_trait,
I: KeyIdStorage + 'async_trait,
Self: 'async_trait,
Generate new key material in the given storage and insert a new verification method with the corresponding PQ
public key material into the DID document.
Sourcefn create_jws_pqc<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait, K, I>(
&'life0 self,
storage: &'life1 Storage<K, I>,
fragment: &'life2 str,
payload: &'life3 [u8],
options: &'life4 JwsSignatureOptions,
) -> Pin<Box<dyn Future<Output = Result<Jws, JwkStorageDocumentError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
K: JwkStoragePQ + 'async_trait,
I: KeyIdStorage + 'async_trait,
Self: 'async_trait,
fn create_jws_pqc<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait, K, I>(
&'life0 self,
storage: &'life1 Storage<K, I>,
fragment: &'life2 str,
payload: &'life3 [u8],
options: &'life4 JwsSignatureOptions,
) -> Pin<Box<dyn Future<Output = Result<Jws, JwkStorageDocumentError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
K: JwkStoragePQ + 'async_trait,
I: KeyIdStorage + 'async_trait,
Self: 'async_trait,
Create a PQ JWS
Sourcefn create_credential_jwt_pqc<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait, K, I, T>(
&'life0 self,
credential: &'life1 Credential<T>,
storage: &'life2 Storage<K, I>,
fragment: &'life3 str,
options: &'life4 JwsSignatureOptions,
custom_claims: Option<BTreeMap<String, Value>>,
) -> Pin<Box<dyn Future<Output = Result<Jwt, JwkStorageDocumentError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
K: JwkStoragePQ + 'async_trait,
I: KeyIdStorage + 'async_trait,
T: Clone + Serialize + DeserializeOwned + Sync + 'async_trait,
Self: 'async_trait,
fn create_credential_jwt_pqc<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait, K, I, T>(
&'life0 self,
credential: &'life1 Credential<T>,
storage: &'life2 Storage<K, I>,
fragment: &'life3 str,
options: &'life4 JwsSignatureOptions,
custom_claims: Option<BTreeMap<String, Value>>,
) -> Pin<Box<dyn Future<Output = Result<Jwt, JwkStorageDocumentError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
K: JwkStoragePQ + 'async_trait,
I: KeyIdStorage + 'async_trait,
T: Clone + Serialize + DeserializeOwned + Sync + 'async_trait,
Self: 'async_trait,
Produces a JWT using PQC algorithms where the payload is produced from the given credential
in accordance with VC Data Model v1.1.
Unless the kid is explicitly set in the options, the kid in the protected header is the id
of the method identified by fragment and the JWS signature will be produced by the corresponding
private key backed by the storage in accordance with the passed options.
The custom_claims can be used to set additional claims on the resulting JWT.
Sourcefn create_presentation_jwt_pqc<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait, K, I, CRED, T>(
&'life0 self,
presentation: &'life1 Presentation<CRED, T>,
storage: &'life2 Storage<K, I>,
fragment: &'life3 str,
signature_options: &'life4 JwsSignatureOptions,
presentation_options: &'life5 JwtPresentationOptions,
) -> Pin<Box<dyn Future<Output = Result<Jwt, JwkStorageDocumentError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
K: JwkStoragePQ + 'async_trait,
I: KeyIdStorage + 'async_trait,
T: Clone + Serialize + DeserializeOwned + Sync + 'async_trait,
CRED: Clone + Serialize + DeserializeOwned + Sync + 'async_trait,
Self: 'async_trait,
fn create_presentation_jwt_pqc<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait, K, I, CRED, T>(
&'life0 self,
presentation: &'life1 Presentation<CRED, T>,
storage: &'life2 Storage<K, I>,
fragment: &'life3 str,
signature_options: &'life4 JwsSignatureOptions,
presentation_options: &'life5 JwtPresentationOptions,
) -> Pin<Box<dyn Future<Output = Result<Jwt, JwkStorageDocumentError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
K: JwkStoragePQ + 'async_trait,
I: KeyIdStorage + 'async_trait,
T: Clone + Serialize + DeserializeOwned + Sync + 'async_trait,
CRED: Clone + Serialize + DeserializeOwned + Sync + 'async_trait,
Self: 'async_trait,
Produces a JWT using PQC algorithms where the payload is produced from the given presentation
in accordance with VC Data Model v1.1.
Unless the kid is explicitly set in the options, the kid in the protected header is the id
of the method identified by fragment and the JWS signature will be produced by the corresponding
private key backed by the storage in accordance with the passed options.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.