pub struct SyncRequestAuth {
pub key: PublicKey,
pub timestamp_ms: u64,
pub nonce: Vec<u8>,
pub signature: Vec<u8>,
}Expand description
A caller’s proof of key possession for one sync request.
The signature covers the responding server, the tree, the claimed tips, and a timestamp/nonce pair, so a captured request cannot be replayed to the same server, redirected to a different one, or reused for a different tree.
§What this does not defend against
This authenticates the requester to the server; it does not protect the channel. Over a plaintext transport an attacker on the network path still reads the served entries and can relay a live signed request to keep the response for itself. Confidentiality against a network attacker requires an encrypted transport (Iroh’s QUIC), not this signature.
Fields§
§key: PublicKeyThe key whose authority the caller is claiming on the tree.
timestamp_ms: u64Milliseconds since the Unix epoch, from the caller’s clock.
nonce: Vec<u8>Random per-request value; makes each signature single-use.
signature: Vec<u8>Signature over SyncRequestAuth::signing_bytes.
Implementations§
Source§impl SyncRequestAuth
impl SyncRequestAuth
Trait Implementations§
Source§impl Clone for SyncRequestAuth
impl Clone for SyncRequestAuth
Source§fn clone(&self) -> SyncRequestAuth
fn clone(&self) -> SyncRequestAuth
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SyncRequestAuth
impl Debug for SyncRequestAuth
Source§impl<'de> Deserialize<'de> for SyncRequestAuth
impl<'de> Deserialize<'de> for SyncRequestAuth
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for SyncRequestAuth
impl PartialEq for SyncRequestAuth
Source§impl Serialize for SyncRequestAuth
impl Serialize for SyncRequestAuth
impl StructuralPartialEq for SyncRequestAuth
Auto Trait Implementations§
impl Freeze for SyncRequestAuth
impl RefUnwindSafe for SyncRequestAuth
impl Send for SyncRequestAuth
impl Sync for SyncRequestAuth
impl Unpin for SyncRequestAuth
impl UnsafeUnpin for SyncRequestAuth
impl UnwindSafe for SyncRequestAuth
Blanket Implementations§
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> 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 more