aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/math/ec_gfp/curve_nistp.cpp
diff options
context:
space:
mode:
authorDaniel Seither <[email protected]>2015-06-20 18:27:06 +0200
committerDaniel Seither <[email protected]>2015-06-20 19:05:07 +0200
commitf19604516c0138ffc240388073af2ce0735c48aa (patch)
tree007b800a51542e11dabcc72250d9c5ee2d56d9f2 /src/lib/math/ec_gfp/curve_nistp.cpp
parentde51fccc5ad04ca734ee91a829298ee06ee948f4 (diff)
lib/math: Convert &vec[0] to vec.data()
Diffstat (limited to 'src/lib/math/ec_gfp/curve_nistp.cpp')
-rw-r--r--src/lib/math/ec_gfp/curve_nistp.cpp10
1 files changed, 5 insertions, 5 deletions
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());
}