status-im / nim-blscurve

Nim implementation of BLS signature scheme (Boneh-Lynn-Shacham) over Barreto-Lynn-Scott (BLS) curve BLS12-381
Apache License 2.0
26 stars 11 forks source link

Change scheme3 api to support `domain` and keccak256 hash. #16

Closed cheatfate closed 5 years ago

cheatfate commented 5 years ago

This PR makes signMessage() and verifyMessage() more close to current specification, but not yet compatible because test vectors are missing. Accept it when you will be ready for changes.

proc signMessage*[T](sigkey: SigKey, domain: uint64, hash: MDigest[T]): Signature
proc signMessage*[T](sigkey: SigKey, domain: uint64, msg: openarray[T]): Signature
proc verifyMessage*[T](sig: Signature, hash: MDigest[T], domain: uint64, verkey: VerKey): bool
proc verifyMessage*[T](sig: Signature, msg: openarray[T], domain: uint64, verkey: VerKey): bool
cheatfate commented 5 years ago

Cancel this because it helps to build