miley
unread,May 9, 2012, 10:08:56 AM5/9/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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