I am providing this sample application to show my problem
Active1 year, 8 months ago
Raw download clone embed report print Python 1.98 KB import os. Import ecdsa. Import hashlib. ## PUBLIC KEY ENCODING (2x RIPEMD160). How can i convert the public and the private key into a string? Carmen sandiego word detective. (Because i want to send them into a database). Can somebody help me create a simple tutorial of how to verify the message by using ECDSA algorithm in java? At this point i need to include the signature and public key as the verification method.
What I am trying to do, is to display the Public key from a private key(should an elliptic private key).I did not know how to do it until I encountered a similar problem
Which is from where I pointed myself how to get the public key and to use EC_POINT_bn2point instead of hex2point which internally does BN_hex2bn according to the OpenSSL source.
So, why is EC_POINT_bn2point returning NULL? I am seriously considering recompiling OpenSSL and putting some debug routines to figure out why it fails.
displayname
7,6751919 gold badges9696 silver badges188188 bronze badges
farmdvefarmdve
32133 gold badges88 silver badges2323 bronze badges
2 Answers
An ECDSA private key d (an integer) and public key Q (a point) is computed by Q = dG, where G is a non-secret domain parameter. Suite B Implementer’s Guide to FIPS 186-3(ECDSA) describes ECDSA in detail.
OpenSSL uses ECDSA_generate_key to generate a key pair. What it does is generate a private key randomly, and then it does the Q = dG multiplication to compute the public key:
So you can do the same thing. If I had the private key, I'd set it as the private key in an indivindiv
EC_KEY or ECDSA struct. Then I'd configure the domain parameters on it. And finally I'd do the EC_POINT_mul to get the public key point.
13.5k66 gold badges4545 silver badges7676 bronze badges
Working example:
See also http://wiki.openssl.org/index.php/Elliptic_Curve_Cryptography - for library
http://www.nsa.gov/ia/_files/ecdsa.pdf - for algorithm
http://cs.ucsb.edu/~koc/ccs130h/notes/ecdsa-cert.pdf - for math
Doru GeorgescuDoru Georgescu
Not the answer you're looking for? Browse other questions tagged cryptographyopensslpublic-key-encryptionelliptic-curve or ask your own question.
Active3 years, 4 months ago
I'd like to generate an ECDSA (rather than RSA, DSA, or ElGamal) key using GnuPG, and use it as I might otherwise use an OpenPGP-compatible master key. I've read that
gpg2 has support for ECDSA keys, but I haven't been able to use that functionality. What am I missing?
flamsmarkflamsmark
Public Key Example2 Answers
Neither GPG 1.4.x nor GPG 2.0.x currently support ECC or ECDSA keys. Werner has been working on it for the highly developmental 2.1.x releases, but that's nowhere near ready for production use. Elliptic Curve may be backported to the current stable releases in the future, but there is no timeframe on that.
BenBen
GnuPG 2.1.x does support ECC (including Ed25519) for more info (and examples) see https://www.gnupg.org/faq/whats-new-in-2.1.html#ecc
myroslavmyroslav
Ecdsa Key GenerationNot the answer you're looking for? Browse other questions tagged encryptiongnupgcryptographypublic-key-encryptionecc or ask your own question.Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |