Elliptic Curve Nyberg Rueppel
Elliptic Curve Nyberg Rueppel is a signature scheme used in a number of standards, including P1363. It is a variation on ElGamal's original signature scheme, and Crypto++ provides Nyberg Rueppe rather than ElGamal.
Ján Jančár showed Crypto++ 8.2 and below leaked timing information in elliptic curve gear. You should upgrade to Crypto++ 8.3 and above. Also see Issue 869, Elliptic Curve timing leaks.
Also see the Elliptic Curve Cryptography wiki page.
ECNR<ECP>::PrivateKey privateKey = ...; ECNR<ECP>::PublicKey publicKey = ...; string message = "Yoda said, Do or do not. There is no try."; string signature; StringSource ss1( message, true, new SignerFilter( prng, ECNR<ECP>::Signer(key), new StringSink( signature ) ) // SignerFilter ); // StringSource bool result = false; StringSource ss2( message+signature, true, new SignatureVerificationFilter( ECNR<ECP>::Verifier(key), new ArraySink( (byte*)&result, sizeof(result) ), SIGNATURE_AT_END | PUT_RESULT ) // SignatureVerificationFilter ); if(result) cout << "Verified signature on message." << endl; else cout << "Failed to verify signature on message." << endl;
ECNR.zip - Elliptic Curve Nyberg Rueppel (ECNR) sample program.