ECDSR signature problem

11 views
Skip to first unread message

miley

unread,
May 9, 2012, 10:08:56 AM5/9/12
to cryptop...@googlegroups.com
hello,everyone!
I'm newbie here. i want to add some secure methods in wireless routing
protocol --DSR, so i'd like to use ECDSA digitial signature to make it.
so i wrote the following codes to generate keys ,sigh~, it went wrong,
when i compiled it with gcc.

# include <iostream>
# include <cryptopp/eccrypto.h>
# include <cryptopp/oids.h>
# include <string.h>
# include <cryptopp/hex.h>
# include <cryptopp/files.h>
# include <cryptopp/filters.h>
# include <cryptopp/randpool.h>
# include <cryptopp/osrng.h>

using namespace std;
using namespace CryptoPP;
# pragma comment (lib, "cryptlib.lib");


int main () {

// Generating private/public pair
AutoSeededRandomPool rng;
ECIES<ECP>::PrivateKey privateKey;
privateKey.Initialize(rng, ASN1::secp521r1());

ECIES<ECP>::PublicKey publicKey;
privateKey.MakePublicKey(publicKey);

// Serializing keys for later use
std::string tmp;
StringSink sink(tmp);
publicKey.Save(sink);

string out;
StringSource(tmp, true, new Base32Encoder(new StringSink(out)));

cout << out << endl;
}



with command :g++ -c -lcryptopp -lpthread ecc.cc


can you point me out the reasons ? i'll be very grateful !woo ~woo



ㄨ噯Qiの琪♂

unread,
May 9, 2012, 10:09:42 AM5/9/12
to cryptopp-users
Reply all
Reply to author
Forward
0 new messages