diff options
author | lloyd <[email protected]> | 2010-03-05 06:47:02 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-03-05 06:47:02 +0000 |
commit | 1b68d7e53c4bc5e6b2938194b0f7eda78a72ce43 (patch) | |
tree | da1b0482d875a48fe95e133346aee4baabcbf7cb /src/pubkey/nr/nr.cpp | |
parent | d4ef447dc8b3b4f40f2ab250b1c364e2f74ccfa4 (diff) |
Remove the sign() operation from the public key objects, totally replaced
by using the ops.
Add real ECDSA test vectors (two found in ANSI X9.62)
Diffstat (limited to 'src/pubkey/nr/nr.cpp')
-rw-r--r-- | src/pubkey/nr/nr.cpp | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/src/pubkey/nr/nr.cpp b/src/pubkey/nr/nr.cpp index 08ed6b376..df483499b 100644 --- a/src/pubkey/nr/nr.cpp +++ b/src/pubkey/nr/nr.cpp @@ -74,22 +74,6 @@ NR_PrivateKey::NR_PrivateKey(const AlgorithmIdentifier& alg_id, } /* -* Nyberg-Rueppel Signature Operation -*/ -SecureVector<byte> NR_PrivateKey::sign(const byte in[], u32bit length, - RandomNumberGenerator& rng) const - { - const BigInt& q = group_q(); - - BigInt k; - do - k.randomize(rng, q.bits()); - while(k >= q); - - return core.sign(in, length, k); - } - -/* * Check Private Nyberg-Rueppel Parameters */ bool NR_PrivateKey::check_key(RandomNumberGenerator& rng, bool strong) const @@ -141,7 +125,7 @@ SecureVector<byte> NR_Signature_Operation::sign(const byte msg[], BigInt c = mod_q.reduce(powermod_g_p(k) + f); if(c.is_zero()) - throw Internal_Error("Default_NR_Op::sign: c was zero"); + throw Internal_Error("NR_Signature_Operation: c was zero"); BigInt d = mod_q.reduce(k - x * c); SecureVector<byte> output(2*q.bytes()); |