pub struct Signer<C>where
C: CurveAlgorithm + CurveArithmetic + PointCompression + PrimeCurve,
FieldBytesSize<C>: ModulusSize,{ /* private fields */ }
Expand description
ECDSA signature provider for yubihsm-client
Implementations§
source§impl<C> Signer<C>where
C: CurveAlgorithm + CurveArithmetic + PointCompression + PrimeCurve,
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
FieldBytesSize<C>: ModulusSize,
impl<C> Signer<C>where C: CurveAlgorithm + CurveArithmetic + PointCompression + PrimeCurve, AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>, FieldBytesSize<C>: ModulusSize,
sourcepub fn create(client: Client, signing_key_id: Id) -> Result<Self, Error>
pub fn create(client: Client, signing_key_id: Id) -> Result<Self, Error>
Create a new YubiHSM-backed ECDSA signer
sourcepub fn public_key(&self) -> &EncodedPoint<C>
pub fn public_key(&self) -> &EncodedPoint<C>
Get the public key for the YubiHSM-backed private key.
Trait Implementations§
source§impl<C> AsRef<VerifyingKey<C>> for Signer<C>where
C: CurveAlgorithm + CurveArithmetic + PointCompression + PrimeCurve,
FieldBytesSize<C>: ModulusSize,
impl<C> AsRef<VerifyingKey<C>> for Signer<C>where C: CurveAlgorithm + CurveArithmetic + PointCompression + PrimeCurve, FieldBytesSize<C>: ModulusSize,
source§fn as_ref(&self) -> &VerifyingKey<C>
fn as_ref(&self) -> &VerifyingKey<C>
Converts this type into a shared reference of the (usually inferred) input type.
source§impl<D> DigestSigner<D, (Signature<Secp256k1>, RecoveryId)> for Signer<Secp256k1>where
D: Digest<OutputSize = U32> + Default,
Available on crate feature secp256k1
only.
impl<D> DigestSigner<D, (Signature<Secp256k1>, RecoveryId)> for Signer<Secp256k1>where D: Digest<OutputSize = U32> + Default,
Available on crate feature
secp256k1
only.source§fn try_sign_digest(
&self,
digest: D
) -> Result<(Signature<Secp256k1>, RecoveryId), Error>
fn try_sign_digest( &self, digest: D ) -> Result<(Signature<Secp256k1>, RecoveryId), Error>
Compute a fixed-size secp256k1 ECDSA signature of the given digest along with the recovery ID.
source§fn sign_digest(&self, digest: D) -> S
fn sign_digest(&self, digest: D) -> S
source§impl<D> DigestSigner<D, Signature<NistP256>> for Signer<NistP256>where
D: Digest<OutputSize = U32> + Default,
impl<D> DigestSigner<D, Signature<NistP256>> for Signer<NistP256>where D: Digest<OutputSize = U32> + Default,
source§impl<D> DigestSigner<D, Signature<NistP384>> for Signer<NistP384>where
D: Digest<OutputSize = U32> + Default,
impl<D> DigestSigner<D, Signature<NistP384>> for Signer<NistP384>where D: Digest<OutputSize = U32> + Default,
source§impl<D> DigestSigner<D, Signature<Secp256k1>> for Signer<Secp256k1>where
D: Digest<OutputSize = U32> + Default,
Available on crate feature secp256k1
only.
impl<D> DigestSigner<D, Signature<Secp256k1>> for Signer<Secp256k1>where D: Digest<OutputSize = U32> + Default,
Available on crate feature
secp256k1
only.source§impl<C> From<&Signer<C>> for EncodedPoint<C>where
Self: Clone,
C: CurveAlgorithm + CurveArithmetic + PointCompression + PrimeCurve,
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
FieldBytesSize<C>: ModulusSize,
impl<C> From<&Signer<C>> for EncodedPoint<C>where Self: Clone, C: CurveAlgorithm + CurveArithmetic + PointCompression + PrimeCurve, AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>, FieldBytesSize<C>: ModulusSize,
source§fn from(signer: &Signer<C>) -> EncodedPoint<C>
fn from(signer: &Signer<C>) -> EncodedPoint<C>
Converts to this type from the input type.
source§impl<C> KeypairRef for Signer<C>where
C: CurveAlgorithm + CurveArithmetic + PointCompression + PrimeCurve,
FieldBytesSize<C>: ModulusSize,
SignatureSize<C>: ArrayLength<u8>,
impl<C> KeypairRef for Signer<C>where C: CurveAlgorithm + CurveArithmetic + PointCompression + PrimeCurve, FieldBytesSize<C>: ModulusSize, SignatureSize<C>: ArrayLength<u8>,
§type VerifyingKey = VerifyingKey<C>
type VerifyingKey = VerifyingKey<C>
Verifying key type for this keypair.
source§impl PrehashSigner<(Signature<Secp256k1>, RecoveryId)> for Signer<Secp256k1>
Available on crate feature secp256k1
only.
impl PrehashSigner<(Signature<Secp256k1>, RecoveryId)> for Signer<Secp256k1>
Available on crate feature
secp256k1
only.source§fn sign_prehash(
&self,
prehash: &[u8]
) -> Result<(Signature<Secp256k1>, RecoveryId), Error>
fn sign_prehash( &self, prehash: &[u8] ) -> Result<(Signature<Secp256k1>, RecoveryId), Error>
Compute a fixed-size secp256k1 ECDSA signature of a digest output along with the recovery ID.
source§impl PrehashSigner<Signature<Secp256k1>> for Signer<Secp256k1>
Available on crate feature secp256k1
only.
impl PrehashSigner<Signature<Secp256k1>> for Signer<Secp256k1>
Available on crate feature
secp256k1
only.source§impl<C, __S> Signer<__S> for Signer<C>where
C: CurveAlgorithm + CurveArithmetic + PointCompression + PrimeCurve,
FieldBytesSize<C>: ModulusSize,
__S: PrehashSignature,
Self: DigestSigner<__S::Digest, __S>,
impl<C, __S> Signer<__S> for Signer<C>where C: CurveAlgorithm + CurveArithmetic + PointCompression + PrimeCurve, FieldBytesSize<C>: ModulusSize, __S: PrehashSignature, Self: DigestSigner<__S::Digest, __S>,
Auto Trait Implementations§
impl<C> !RefUnwindSafe for Signer<C>
impl<C> Send for Signer<C>
impl<C> Sync for Signer<C>
impl<C> Unpin for Signer<C>where <C as CurveArithmetic>::AffinePoint: Unpin, <<<C as Curve>::FieldBytesSize as ModulusSize>::UncompressedPointSize as ArrayLength<u8>>::ArrayType: Unpin,
impl<C> !UnwindSafe for Signer<C>
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
Mutably borrows from an owned value. Read more
source§impl<K> Keypair for Kwhere
K: KeypairRef,
impl<K> Keypair for Kwhere K: KeypairRef,
§type VerifyingKey = <K as KeypairRef>::VerifyingKey
type VerifyingKey = <K as KeypairRef>::VerifyingKey
Verifying key type for this keypair.
source§fn verifying_key(&self) -> <K as Keypair>::VerifyingKey
fn verifying_key(&self) -> <K as Keypair>::VerifyingKey
Get the verifying key which can verify signatures produced by the
signing key portion of this keypair.