From 2d1dd244a6714687c97736a809e9dd31f506306c Mon Sep 17 00:00:00 2001 From: lloyd Date: Thu, 25 Feb 2010 02:01:06 +0000 Subject: Convert PointGFp::get_affine_{x,y} to return just the BigInt value --- src/pubkey/gost_3410/gost_3410.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/pubkey/gost_3410') diff --git a/src/pubkey/gost_3410/gost_3410.cpp b/src/pubkey/gost_3410/gost_3410.cpp index bb68e2b8d..24e078dca 100644 --- a/src/pubkey/gost_3410/gost_3410.cpp +++ b/src/pubkey/gost_3410/gost_3410.cpp @@ -2,7 +2,7 @@ * GOST 34.10-2001 implemenation * (C) 2007 Falko Strenzke, FlexSecure GmbH * Manuel Hartl, FlexSecure GmbH -* (C) 2008-2009 Jack Lloyd +* (C) 2008-2010 Jack Lloyd * * Distributed under the terms of the Botan license */ @@ -72,8 +72,8 @@ X509_Encoder* GOST_3410_PublicKey::x509_encoder() const key->affirm_init(); // Trust CryptoPro to come up with something obnoxious - const BigInt x = key->mp_public_point->get_affine_x().get_value(); - const BigInt y = key->mp_public_point->get_affine_y().get_value(); + const BigInt x = key->mp_public_point->get_affine_x(); + const BigInt y = key->mp_public_point->get_affine_y(); SecureVector bits(2*std::max(x.bytes(), y.bytes())); @@ -234,7 +234,7 @@ bool GOST_3410_PublicKey::verify(const byte msg[], u32bit msg_len, PointGFp R = (z1 * mp_dom_pars->get_base_point() + z2 * *mp_public_point); - return (R.get_affine_x().get_value() == r); + return (R.get_affine_x() == r); } GOST_3410_PublicKey::GOST_3410_PublicKey(const EC_Domain_Params& dom_par, @@ -333,7 +333,7 @@ GOST_3410_PrivateKey::sign(const byte msg[], PointGFp k_times_P = mp_dom_pars->get_base_point() * k; k_times_P.check_invariants(); - BigInt r = k_times_P.get_affine_x().get_value() % n; + BigInt r = k_times_P.get_affine_x() % n; if(r == 0) throw Internal_Error("GOST_3410::sign: r was zero"); -- cgit v1.2.3