Elliptic Curve Nyberg Rueppel

From Crypto++ Wiki
Jump to navigation Jump to search

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.

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 ss1( message, true,
  new SignerFilter( prng,
    new StringSink( signature )
  ) // SignerFilter
); // StringSource

bool result = false;
StringSource ss2( message+signature, true,
  new SignatureVerificationFilter(
    new ArraySink( (byte*)&result, sizeof(result) ),
  ) // SignatureVerificationFilter

  cout << "Verified signature on message." << endl;
  cout << "Failed to verify signature on message." << endl;


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