pub struct BootstrapPubkey {
pub ed25519: VerifyingKey,
pub ml_dsa_65: Option<MlDsaVerifyingKey>,
}Expand description
One bootstrap-pubkeys entry: the Ed25519 anchor plus an optional bound
ML-DSA-65 verifying key.
The Ed25519 key is always the identity of the entry — the post-quantum key is bound to it, mirroring the user identity and deployment-CA layouts. Verification is per-identity: an entry that carries no PQ key verifies classically, an entry that carries one requires both signatures.
Fields§
§ed25519: VerifyingKey§ml_dsa_65: Option<MlDsaVerifyingKey>Implementations§
Source§impl BootstrapPubkey
impl BootstrapPubkey
Sourcepub fn hybrid(ed25519: VerifyingKey, ml_dsa_65: MlDsaVerifyingKey) -> Self
pub fn hybrid(ed25519: VerifyingKey, ml_dsa_65: MlDsaVerifyingKey) -> Self
A hybrid entry binding an ML-DSA-65 key to an Ed25519 anchor.
Sourcepub fn for_service_key(service_key: &SigningKey) -> Result<Self>
pub fn for_service_key(service_key: &SigningKey) -> Result<Self>
The hybrid entry for a service that signs with service_key.
The ML-DSA-65 half is DERIVED from the service’s Ed25519 key with
hyprstream_rpc::node_identity::derive_mesh_mldsa_key rather than
generated independently. That is not merely convenient — it is required
for the entry to be usable: every signer in the tree (the local signer,
the service dispatch default, the published #mesh-pq verification
method) produces its post-quantum signature from exactly that
derivation, so an independently generated key would anchor a public key
nothing ever signs with. It also keeps the service’s secret material a
single Ed25519 seed — nothing new to persist, protect, back up or
rotate.
Sourcepub fn to_key_bytes(&self) -> Vec<u8> ⓘ
pub fn to_key_bytes(&self) -> Vec<u8> ⓘ
The canonical byte encoding: the 32 raw Ed25519 bytes, followed by the 1952 raw ML-DSA-65 bytes when the entry is hybrid.
Sourcepub fn from_key_bytes(service: &str, bytes: &[u8]) -> Result<Self>
pub fn from_key_bytes(service: &str, bytes: &[u8]) -> Result<Self>
Decode the canonical byte encoding, discriminating on length.
service names the entry only so the error text is actionable.
Sourcepub fn verify(
&self,
message: &[u8],
ed25519_sig: &Signature,
ml_dsa_65_sig: Option<&[u8]>,
) -> Result<()>
pub fn verify( &self, message: &[u8], ed25519_sig: &Signature, ml_dsa_65_sig: Option<&[u8]>, ) -> Result<()>
Verify a signature over message under this entry’s per-identity policy.
- Classical entry: the Ed25519 signature must verify. A post-quantum signature cannot be checked against an entry with no bound PQ key, so supplying one is an error rather than a silently ignored input.
- Hybrid entry: both the Ed25519 and the ML-DSA-65 signature must be present and verify.
Post-quantum verification is never demanded of an entry that does not carry a post-quantum key — a classical entry keeps its classical floor.
Trait Implementations§
Source§impl Clone for BootstrapPubkey
impl Clone for BootstrapPubkey
Source§fn clone(&self) -> BootstrapPubkey
fn clone(&self) -> BootstrapPubkey
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for BootstrapPubkey
impl RefUnwindSafe for BootstrapPubkey
impl Send for BootstrapPubkey
impl Sync for BootstrapPubkey
impl Unpin for BootstrapPubkey
impl UnsafeUnpin for BootstrapPubkey
impl UnwindSafe for BootstrapPubkey
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request