diff --git a/secp256k1.nim b/secp256k1.nim index 065d717..8917793 100644 --- a/secp256k1.nim +++ b/secp256k1.nim @@ -11,7 +11,7 @@ import strformat, typetraits, - stew/[byteutils, objects, results], + stew/[byteutils, objects, results, ctops], ./secp256k1_abi from nimcrypto/utils import burnMem @@ -418,15 +418,15 @@ proc random*(T: type SkKeyPair, rng: FoolproofRng): T = func `==`*(lhs, rhs: SkPublicKey): bool = ## Compare Secp256k1 `public key` objects for equality. - lhs.toRaw() == rhs.toRaw() + CT.isEqual(lhs.toRaw(), rhs.toRaw()) func `==`*(lhs, rhs: SkSignature): bool = ## Compare Secp256k1 `signature` objects for equality. - lhs.toRaw() == rhs.toRaw() + CT.isEqual(lhs.toRaw(), rhs.toRaw()) func `==`*(lhs, rhs: SkRecoverableSignature): bool = ## Compare Secp256k1 `recoverable signature` objects for equality. - lhs.toRaw() == rhs.toRaw() + CT.isEqual(lhs.toRaw(), rhs.toRaw()) func sign*(key: SkSecretKey, msg: SkMessage): SkSignature = ## Sign message `msg` using private key `key` and return signature object. diff --git a/secp256k1.nimble b/secp256k1.nimble index 3c7d3f1..b5ffeda 100644 --- a/secp256k1.nimble +++ b/secp256k1.nimble @@ -1,7 +1,7 @@ mode = ScriptMode.Verbose packageName = "secp256k1" -version = "0.5.0" +version = "0.5.1" author = "Status Research & Development GmbH" description = "A wrapper for the libsecp256k1 C library" license = "Apache License 2.0"