feat(user-agent): add VaultGate for sealed vault authentication

This commit is contained in:
hdbg
2026-04-08 18:29:52 +02:00
parent 205227a3df
commit 87ee0fe87b
24 changed files with 900 additions and 625 deletions

View File

@@ -1,3 +1,5 @@
use std::hash::Hash;
use base64::{Engine as _, prelude::BASE64_STANDARD};
use ml_dsa::{
EncodedVerifyingKey, Error, KeyGen, MlDsa87, Seed, Signature as MlDsaSignature,
@@ -17,6 +19,12 @@ pub type KeyParams = MlDsa87;
#[derive(Clone, Debug, PartialEq)]
pub struct PublicKey(Box<MlDsaVerifyingKey<KeyParams>>);
impl Hash for PublicKey {
fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
self.to_bytes().hash(state);
}
}
#[derive(Clone, Debug, PartialEq)]
pub struct Signature(Box<MlDsaSignature<KeyParams>>);

View File

@@ -3,3 +3,5 @@ pub mod authn;
#[cfg(feature = "safecell")]
pub mod safecell;
pub use x_wing;