-
ECDSA - PEM or DER?
------=_Part_5950_21061824.1206203442622
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Hi all,
Have to use ECDSA_sign and ECDSA_verify() with EC_privatekey and certificate
in DER format ? There are some has experience with ECDSA can tell this
stuff?
Many thanks for reply.
Nguyen.
/** ECDSA_sign
* computes ECDSA signature of a given hash value using the supplied
* private key (note: sig must point to ECDSA_size(eckey) bytes of memory).
* \param type this parameter is ignored
* \param dgst pointer to the hash value to sign
* \param dgstlen length of the hash value
* \param sig buffer to hold the DER encoded signature
* \param siglen pointer to the length of the returned signature
* \param eckey pointer to the EC_KEY object containing a private EC key
* \return 1 on success and 0 otherwise
*/
int ECDSA_sign(int type, const unsigned char *dgst, int dgstlen,
unsigned char *sig, unsigned int *siglen, EC_KEY *eckey);
/** ECDSA_verify
* verifies that the given signature is valid ECDSA signature
* of the supplied hash value using the specified public key.
* \param type this parameter is ignored
* \param dgst pointer to the hash value
* \param dgstlen length of the hash value
* \param sig pointer to the DER encoded signature
* \param siglen length of the DER encoded signature
* \param eckey pointer to the EC_KEY object containing a public EC key
* \return 1 if the signature is valid, 0 if the signature is invalid and -1
on error
*/
int ECDSA_verify(int type, const unsigned char *dgst, int dgstlen,
const unsigned char *sig, int siglen, EC_KEY *eckey);
------=_Part_5950_21061824.1206203442622
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Hi all,<br><br>Have to use ECDSA_sign and ECDSA_verify() with EC_privatekey and certificate in DER format ? There are some has experience with ECDSA can tell this stuff?<br><br>Many thanks for reply.<br>Nguyen.<br><br><br>
/** ECDSA_sign<br> * computes ECDSA signature of a given hash value using the supplied<br> * private key (note: sig must point to ECDSA_size(eckey) bytes of memory).<br> * \param type this parameter is ignored<br> * \param dgst pointer to the hash value to sign<br>
* \param dgstlen length of the hash value<br> * \param sig buffer to hold the DER encoded signature<br> * \param siglen pointer to the length of the returned signature<br> * \param eckey pointer to the EC_KEY object containing a private EC key<br>
* \return 1 on success and 0 otherwise<br> */<br>int ECDSA_sign(int type, const unsigned char *dgst, int dgstlen, <br> unsigned char *sig, unsigned int *siglen, EC_KEY *eckey);<br><br><br><br>/** ECDSA_verify<br>
* verifies that the given signature is valid ECDSA signature<br> * of the supplied hash value using the specified public key.<br> * \param type this parameter is ignored<br> * \param dgst pointer to the hash value <br> * \param dgstlen length of the hash value<br>
* \param sig pointer to the DER encoded signature<br> * \param siglen length of the DER encoded signature<br> * \param eckey pointer to the EC_KEY object containing a public EC key<br> * \return 1 if the signature is valid, 0 if the signature is invalid and -1 on error<br>
*/<br>int ECDSA_verify(int type, const unsigned char *dgst, int dgstlen, <br> const unsigned char *sig, int siglen, EC_KEY *eckey);
------=_Part_5950_21061824.1206203442622--
______________________________________________________________________
OpenSSL Project [url]http://www.openssl.org[/url]
User Support Mailing List [email]openssl-users@openssl.org[/email]
Automated List Manager [email]majordomo@openssl.org[/email]