From 1c26694eb600f19d121436760b34a4ed11848591 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Mon, 25 Jan 2021 20:56:18 +0100 Subject: [PATCH] Merge pull request #5393 from filecoin-project/feat-refactor-bls refactor: switch to filecoin-ffi bls api for bls signatures --- lib/sigs/bls/init.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/sigs/bls/init.go b/lib/sigs/bls/init.go index 5fd8d06c2a7..4574dc95b25 100644 --- a/lib/sigs/bls/init.go +++ b/lib/sigs/bls/init.go @@ -38,8 +38,10 @@ func (blsSigner) GenPrivateFromSeed(seed []byte) ([]byte, error) { return nil, fmt.Errorf("bls signature seed not byte(32)") } // Note private keys seem to be serialized little-endian! - pk := blst.KeyGen(seed[:32]).ToLEndian() - return pk, nil + var ikm [32]byte + copy(ikm[:], seed[:32]) + sk := ffi.PrivateKeyGenerateWithSeed(ikm) + return sk[:], nil } func (blsSigner) ToPublic(priv []byte) ([]byte, error) {