diff options
author | Daniel Seither <[email protected]> | 2015-06-20 18:27:06 +0200 |
---|---|---|
committer | Daniel Seither <[email protected]> | 2015-06-20 19:05:07 +0200 |
commit | f19604516c0138ffc240388073af2ce0735c48aa (patch) | |
tree | 007b800a51542e11dabcc72250d9c5ee2d56d9f2 /src/lib/math/ec_gfp | |
parent | de51fccc5ad04ca734ee91a829298ee06ee948f4 (diff) |
lib/math: Convert &vec[0] to vec.data()
Diffstat (limited to 'src/lib/math/ec_gfp')
-rw-r--r-- | src/lib/math/ec_gfp/curve_gfp.cpp | 4 | ||||
-rw-r--r-- | src/lib/math/ec_gfp/curve_nistp.cpp | 10 | ||||
-rw-r--r-- | src/lib/math/ec_gfp/point_gfp.h | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/math/ec_gfp/curve_gfp.cpp b/src/lib/math/ec_gfp/curve_gfp.cpp index cb21dd04e..64d45572d 100644 --- a/src/lib/math/ec_gfp/curve_gfp.cpp +++ b/src/lib/math/ec_gfp/curve_gfp.cpp @@ -90,7 +90,7 @@ void CurveGFp_Montgomery::curve_mul(BigInt& z, const BigInt& x, const BigInt& y, x.data(), x.size(), x.sig_words(), y.data(), y.size(), y.sig_words(), m_p.data(), m_p_words, m_p_dash, - &ws[0]); + ws.data()); } void CurveGFp_Montgomery::curve_sqr(BigInt& z, const BigInt& x, @@ -112,7 +112,7 @@ void CurveGFp_Montgomery::curve_sqr(BigInt& z, const BigInt& x, bigint_monty_sqr(z.mutable_data(), output_size, x.data(), x.size(), x.sig_words(), m_p.data(), m_p_words, m_p_dash, - &ws[0]); + ws.data()); } } diff --git a/src/lib/math/ec_gfp/curve_nistp.cpp b/src/lib/math/ec_gfp/curve_nistp.cpp index f3ac39aa1..002cf2d47 100644 --- a/src/lib/math/ec_gfp/curve_nistp.cpp +++ b/src/lib/math/ec_gfp/curve_nistp.cpp @@ -26,7 +26,7 @@ void CurveGFp_NIST::curve_mul(BigInt& z, const BigInt& x, const BigInt& y, z.grow_to(output_size); z.clear(); - bigint_mul(z.mutable_data(), output_size, &ws[0], + bigint_mul(z.mutable_data(), output_size, ws.data(), x.data(), x.size(), x.sig_words(), y.data(), y.size(), y.sig_words()); @@ -50,7 +50,7 @@ void CurveGFp_NIST::curve_sqr(BigInt& z, const BigInt& x, z.grow_to(output_size); z.clear(); - bigint_sqr(z.mutable_data(), output_size, &ws[0], + bigint_sqr(z.mutable_data(), output_size, ws.data(), x.data(), x.size(), x.sig_words()); this->redc(z, ws); @@ -80,12 +80,12 @@ void CurveGFp_P521::redc(BigInt& x, secure_vector<word>& ws) const if(ws.size() < p_words + 1) ws.resize(p_words + 1); - clear_mem(&ws[0], ws.size()); - bigint_shr2(&ws[0], x.data(), x_sw, shift_words, shift_bits); + clear_mem(ws.data(), ws.size()); + bigint_shr2(ws.data(), x.data(), x_sw, shift_words, shift_bits); x.mask_bits(521); - bigint_add3(x.mutable_data(), x.data(), p_words, &ws[0], p_words); + bigint_add3(x.mutable_data(), x.data(), p_words, ws.data(), p_words); normalize(x, ws, max_redc_subtractions()); } diff --git a/src/lib/math/ec_gfp/point_gfp.h b/src/lib/math/ec_gfp/point_gfp.h index 8cbb59370..813ead81e 100644 --- a/src/lib/math/ec_gfp/point_gfp.h +++ b/src/lib/math/ec_gfp/point_gfp.h @@ -268,7 +268,7 @@ PointGFp BOTAN_DLL OS2ECP(const byte data[], size_t data_len, template<typename Alloc> PointGFp OS2ECP(const std::vector<byte, Alloc>& data, const CurveGFp& curve) - { return OS2ECP(&data[0], data.size(), curve); } + { return OS2ECP(data.data(), data.size(), curve); } } |