Closed ra-- closed 3 years ago
@ra-- see comment above - if it works (I think it does) - you can remove significant amount of the clones
question : if you use Scalar
instead of SecretKey
in:
pub type SK = SecretKey;
does it solves the clone issue ? (Scalar can be copied)
question : if you use
Scalar
instead ofSecretKey
in:pub type SK = SecretKey;
does it solves the clone issue ? (Scalar can be copied)
It does solve the clone issue. See https://github.com/ZenGo-X/curv/pull/87/commits/e910270f0facac3e6e23c793dd9038512d130822
lots of clone() had to be added to cryptographic_primites/* because SecretKey does not implement the Copy trait (because it zeroizes by default)