File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -150,11 +150,16 @@ pub const Ristretto255 = struct {
150150 return .{ .p = p .p .add (q .p ) };
151151 }
152152
153+ /// Subtract two Ristretto255 elements.
154+ pub inline fn sub (p : Ristretto255 , q : Ristretto255 ) Ristretto255 {
155+ return .{ .p = p .p .sub (q .p ) };
156+ }
157+
153158 /// Multiply a Ristretto255 element with a scalar.
154159 /// Return error.WeakPublicKey if the resulting element is
155160 /// the identity element.
156161 pub inline fn mul (p : Ristretto255 , s : [encoded_length ]u8 ) (IdentityElementError || WeakPublicKeyError )! Ristretto255 {
157- return Ristretto255 { .p = try p .p .mul (s ) };
162+ return . { .p = try p .p .mul (s ) };
158163 }
159164
160165 /// Return true if two Ristretto255 elements are equivalent
You can’t perform that action at this time.
0 commit comments