authorgravatar for 124872+jedisct1@users.noreply.github.comFrank Denis <124872+jedisct1@users.noreply.github.com> 2021-06-01 11:02:48+02:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2021-06-01 11:02:48+02:00
logd496400cff8b025dea262a9544e1b20482233089
tree51be1d9b571878fa1aab93ee0e2d17fe1574de6c
parenta23fa896ef8a839bef369c2c92f19d77ac8cb6d0
signaturebadge-question-mark Signed by PGP key 4AEE18F83AFDEB23

std.crypto.p256.scalar: fe struct member is not a function (#8954)


1 files changed, 3 insertions(+), 3 deletions(-)

lib/std/crypto/pcurves/p256/scalar.zig+3-3
...@@ -120,12 +120,12 @@ pub const Scalar = struct {...@@ -120,12 +120,12 @@ pub const Scalar = struct {
120120
121 /// Compute x+y (mod L)121 /// Compute x+y (mod L)
122 pub fn add(x: Scalar, y: Scalar) Scalar {122 pub fn add(x: Scalar, y: Scalar) Scalar {
123 return Scalar{ .fe = x.fe().add(y.fe) };123 return Scalar{ .fe = x.fe.add(y.fe) };
124 }124 }
125125
126 /// Compute x-y (mod L)126 /// Compute x-y (mod L)
127 pub fn sub(x: Scalar, y: Scalar) Scalar {127 pub fn sub(x: Scalar, y: Scalar) Scalar {
128 return Scalar{ .fe = x.fe().sub(y.fe) };128 return Scalar{ .fe = x.fe.sub(y.fe) };
129 }129 }
130130
131 /// Compute 2n (mod L)131 /// Compute 2n (mod L)
...@@ -135,7 +135,7 @@ pub const Scalar = struct {...@@ -135,7 +135,7 @@ pub const Scalar = struct {
135135
136 /// Compute x*y (mod L)136 /// Compute x*y (mod L)
137 pub fn mul(x: Scalar, y: Scalar) Scalar {137 pub fn mul(x: Scalar, y: Scalar) Scalar {
138 return Scalar{ .fe = x.fe().mul(y.fe) };138 return Scalar{ .fe = x.fe.mul(y.fe) };
139 }139 }
140140
141 /// Compute x^2 (mod L)141 /// Compute x^2 (mod L)