BLS signature v4 (#1912)
This commit is contained in:
parent
8102d5dc4d
commit
677f099110
|
@ -88,7 +88,9 @@ func toPubKey*(privkey: ValidatorPrivKey): ValidatorPubKey =
|
||||||
## Create a private key from a public key
|
## Create a private key from a public key
|
||||||
# Un-specced in either hash-to-curve or Eth2
|
# Un-specced in either hash-to-curve or Eth2
|
||||||
# TODO: Test suite should use `keyGen` instead
|
# TODO: Test suite should use `keyGen` instead
|
||||||
ValidatorPubKey(kind: Real, blsValue: SecretKey(privkey).privToPub())
|
result.kind = Real
|
||||||
|
let ok = result.blsValue.publicFromSecret(SecretKey privkey)
|
||||||
|
doAssert ok, "The validator private key was a zero key. This should never happen."
|
||||||
|
|
||||||
proc toRealPubKey(pubkey: ValidatorPubKey): Option[ValidatorPubKey] =
|
proc toRealPubKey(pubkey: ValidatorPubKey): Option[ValidatorPubKey] =
|
||||||
var validatorKeyCache {.threadvar.}:
|
var validatorKeyCache {.threadvar.}:
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 9b1cf54f47e704ed52c70ef55674dbfbe0aefa8d
|
Subproject commit 3878b9bf324fd895f07f2c3a07622fac7c939e21
|
Loading…
Reference in New Issue