aboutsummaryrefslogtreecommitdiffstats
path: root/src/pubkey/gost_3410
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-03-05 16:33:54 +0000
committerlloyd <[email protected]>2010-03-05 16:33:54 +0000
commitce88e2c6918bb012321e1d7599c2a13b9ba9301e (patch)
treea87a57844f494a9b9ea6022b655f28a0c031a6ab /src/pubkey/gost_3410
parent284cae08b24ae892ee8ce5c3511acbf0b7688a43 (diff)
Remove sign and verify ops from key types
Diffstat (limited to 'src/pubkey/gost_3410')
-rw-r--r--src/pubkey/gost_3410/gost_3410.cpp33
-rw-r--r--src/pubkey/gost_3410/gost_3410.h10
2 files changed, 0 insertions, 43 deletions
diff --git a/src/pubkey/gost_3410/gost_3410.cpp b/src/pubkey/gost_3410/gost_3410.cpp
index 1c028eca3..9a7681cb2 100644
--- a/src/pubkey/gost_3410/gost_3410.cpp
+++ b/src/pubkey/gost_3410/gost_3410.cpp
@@ -68,39 +68,6 @@ GOST_3410_PublicKey::GOST_3410_PublicKey(const AlgorithmIdentifier& alg_id,
}
}
-bool GOST_3410_PublicKey::verify(const byte msg[], u32bit msg_len,
- const byte sig[], u32bit sig_len) const
- {
- const BigInt& n = domain().get_order();
-
- if(n == 0)
- throw Invalid_State("domain parameters not set");
-
- if(sig_len != n.bytes()*2)
- return false;
-
- BigInt e(msg, msg_len);
-
- BigInt r(sig, sig_len / 2);
- BigInt s(sig + sig_len / 2, sig_len / 2);
-
- if(r < 0 || r >= n || s < 0 || s >= n)
- return false;
-
- e %= n;
- if(e == 0)
- e = 1;
-
- BigInt v = inverse_mod(e, n);
-
- BigInt z1 = (s*v) % n;
- BigInt z2 = (-r*v) % n;
-
- PointGFp R = (z1 * domain().get_base_point() + z2 * public_point());
-
- return (R.get_affine_x() == r);
- }
-
GOST_3410_Signature_Operation::GOST_3410_Signature_Operation(
const GOST_3410_PrivateKey& gost_3410) :
diff --git a/src/pubkey/gost_3410/gost_3410.h b/src/pubkey/gost_3410/gost_3410.h
index ffaa6fc4e..b10421a02 100644
--- a/src/pubkey/gost_3410/gost_3410.h
+++ b/src/pubkey/gost_3410/gost_3410.h
@@ -61,16 +61,6 @@ class BOTAN_DLL GOST_3410_PublicKey : public virtual EC_PublicKey,
u32bit message_part_size() const
{ return domain().get_order().bytes(); }
- /**
- * Verify a message with this key.
- * @param message the byte array containing the message
- * @param mess_len the number of bytes in the message byte array
- * @param signature the byte array containing the signature
- * @param sig_len the number of bytes in the signature byte array
- */
- bool verify(const byte message[], u32bit mess_len,
- const byte signature[], u32bit sig_len) const;
-
protected:
GOST_3410_PublicKey() {}
};