pub struct HsIdKey(/* private fields */);
Expand description
The identity of a v3 onion service, expanded into a public key. (KP_hs_id)
This is the decoded and validated ed25519 public key that is encoded as
a ${base32}.onion
address.
This key is not used to sign or validate anything on its own; instead, it is
used to derive a HsBlindIdKey
.
Note: This is a separate type from HsId
because it is about 6x
larger. It is an expanded form, used for doing actual cryptography.
Implementations§
Source§impl HsIdKey
impl HsIdKey
Sourcepub fn compute_blinded_key(
&self,
cur_period: TimePeriod,
) -> Result<(HsBlindIdKey, Subcredential), BlindingError>
pub fn compute_blinded_key( &self, cur_period: TimePeriod, ) -> Result<(HsBlindIdKey, Subcredential), BlindingError>
Derive the blinded key and subcredential for this identity during cur_period
.
Sourcepub fn compute_subcredential(
&self,
blinded_key: &HsBlindIdKey,
cur_period: TimePeriod,
) -> Subcredential
pub fn compute_subcredential( &self, blinded_key: &HsBlindIdKey, cur_period: TimePeriod, ) -> Subcredential
Given a time period and a blinded public key, compute the subcredential.
Methods from Deref<Target = PublicKey>§
Trait Implementations§
Source§impl From<&HsIdKeypair> for HsIdKey
impl From<&HsIdKeypair> for HsIdKey
Source§fn from(value: &HsIdKeypair) -> Self
fn from(value: &HsIdKeypair) -> Self
Converts to this type from the input type.
Source§impl From<HsIdKeypair> for HsIdKey
impl From<HsIdKeypair> for HsIdKey
Source§fn from(value: HsIdKeypair) -> Self
fn from(value: HsIdKeypair) -> Self
Converts to this type from the input type.
Source§impl ToEncodableKey for HsIdKey
impl ToEncodableKey for HsIdKey
Source§type KeyPair = HsIdKeypair
type KeyPair = HsIdKeypair
The KeyPair (secret+public) of which this key is a subset. For secret
keys, this type is Self. For public keys, this type is the
corresponding (secret) keypair. Read more
Source§fn to_encodable_key(self) -> Self::Key
fn to_encodable_key(self) -> Self::Key
Convert this key to a type that implements
EncodableItem
.Source§fn from_encodable_key(key: Self::Key) -> Self
fn from_encodable_key(key: Self::Key) -> Self
Convert an
EncodableItem
to another key type.Auto Trait Implementations§
impl Freeze for HsIdKey
impl RefUnwindSafe for HsIdKey
impl Send for HsIdKey
impl Sync for HsIdKey
impl Unpin for HsIdKey
impl UnwindSafe for HsIdKey
Blanket Implementations§
§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
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
, which can then be
downcast
into Box<dyn ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
, which can then be further
downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§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