identity_storage/key_storage/
jwk_storage_pqc.rs1use crate::key_storage::KeyId;
5use crate::key_storage::KeyType;
6use async_trait::async_trait;
7use identity_verification::jose::jws::JwsAlgorithm;
8use identity_verification::jwk::PostQuantumJwk;
9
10use super::jwk_gen_output::JwkGenOutput;
11use super::JwkStorage;
12use super::KeyStorageResult;
13
14#[cfg_attr(not(feature = "send-sync-storage"), async_trait(?Send))]
16#[cfg_attr(feature = "send-sync-storage", async_trait)]
17pub trait JwkStoragePQ: JwkStorage {
18 async fn generate_pq_key(&self, key_type: KeyType, alg: JwsAlgorithm) -> KeyStorageResult<JwkGenOutput>;
20
21 async fn pq_sign(
23 &self,
24 key_id: &KeyId,
25 data: &[u8],
26 public_key: &PostQuantumJwk,
27 ctx: Option<&[u8]>,
28 ) -> KeyStorageResult<Vec<u8>>;
29}