Struct openssl::ecdsa::EcdsaSig [−]
A low level interface to ECDSA
OpenSSL documentation at ECDSA_sign
Methods
impl EcdsaSig
[src]
[−]
impl EcdsaSig
pub fn sign(
data: &[u8],
eckey: &EcKeyRef<Private>
) -> Result<EcdsaSig, ErrorStack>
[src]
[−]
pub fn sign(
data: &[u8],
eckey: &EcKeyRef<Private>
) -> Result<EcdsaSig, ErrorStack>
Computes a digital signature of the hash value data
using the private EC key eckey.
OpenSSL documentation at ECDSA_do_sign
pub fn from_private_components(
r: BigNum,
s: BigNum
) -> Result<EcdsaSig, ErrorStack>
[src]
[−]
pub fn from_private_components(
r: BigNum,
s: BigNum
) -> Result<EcdsaSig, ErrorStack>
Returns a new EcdsaSig
by setting the r
and s
values associated with a
ECDSA signature.
OpenSSL documentation at ECDSA_SIG_set0
pub fn verify(
&self,
data: &[u8],
eckey: &EcKeyRef<Public>
) -> Result<bool, ErrorStack>
[src]
[−]
pub fn verify(
&self,
data: &[u8],
eckey: &EcKeyRef<Public>
) -> Result<bool, ErrorStack>
Verifies if the signature is a valid ECDSA signature using the given public key.
OpenSSL documentation at ECDSA_do_verify
pub fn r(&self) -> &BigNumRef
[src]
[−]
pub fn r(&self) -> &BigNumRef
Returns internal component: r
of a EcdsaSig
. (See X9.62 or FIPS 186-2)
OpenSSL documentation at ECDSA_SIG_get0
pub fn s(&self) -> &BigNumRef
[src]
[−]
pub fn s(&self) -> &BigNumRef
Returns internal components: s
of a EcdsaSig
. (See X9.62 or FIPS 186-2)
OpenSSL documentation at ECDSA_SIG_get0