pub struct EncapsulatedKey {
pub layer: SubgraphLayer,
pub ephemeral_public: [u8; 32],
pub ciphertext: [u8; 48],
pub nonce: [u8; 12],
}Expand description
An X25519 ECDH-encapsulated subgraph key (key wrapped for a specific recipient DID).
ephemeral_public is the sender’s ephemeral X25519 public key (32 bytes).
ciphertext is the 32-byte layer key XOR-masked with the ECDH shared secret.
The recipient computes shared = X25519(their_static_private, ephemeral_public),
then layer_key = ciphertext XOR shared, then verifies with mac.
Fields§
§layer: SubgraphLayer§ephemeral_public: [u8; 32]§ciphertext: [u8; 48]AES-256-GCM ciphertext of the 32-byte layer key (32 + 16-byte tag = 48 bytes).
nonce: [u8; 12]Nonce used for the AES-GCM wrap (12 bytes).
Trait Implementations§
Source§impl Clone for EncapsulatedKey
impl Clone for EncapsulatedKey
Source§fn clone(&self) -> EncapsulatedKey
fn clone(&self) -> EncapsulatedKey
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for EncapsulatedKey
impl RefUnwindSafe for EncapsulatedKey
impl Send for EncapsulatedKey
impl Sync for EncapsulatedKey
impl Unpin for EncapsulatedKey
impl UnsafeUnpin for EncapsulatedKey
impl UnwindSafe for EncapsulatedKey
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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>
Converts
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>
Converts
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 more