Elliptic Curve Nyberg Rueppel

From Crypto++ Wiki
Jump to: navigation, search

Elliptic Curve Nyberg Rueppel is a signature scheme used in a number of standards, including P1363.

Sample Program

ECNR<ECP>::PrivateKey privateKey = ...;
ECNR<ECP>::PublicKey publicKey = ...;

string message = "Yoda said, Do or do not. There is no try.";
string signature;

StringSource ss( message, true,
  new SignerFilter( prng,
    ECNR<ECP>::Signer(key),
    new StringSink( signature )
  ) // SignerFilter
); // StringSource

bool result = false;
StringSource( 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;

Downloads

ECNR.zip - Elliptic Curve Nyberg Rueppel (ECNR) sample program.