Skip to content
This repository has been archived by the owner on Dec 4, 2024. It is now read-only.

Commit

Permalink
Remove MarshalMessageToBigInt (unused)
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan-Ethernal committed Oct 11, 2023
1 parent 1d767f9 commit 420fdb7
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions consensus/polybft/signer/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,6 @@ func CreateRandomBlsKeys(total int) ([]*PrivateKey, error) {
return blsKeys, nil
}

// MarshalMessageToBigInt marshalls message into two big ints
// first we must convert message bytes to point and than for each coordinate we create big int
func MarshalMessageToBigInt(message, domain []byte) ([2]*big.Int, error) {
point, err := hashToPoint(message, domain)
if err != nil {
return [2]*big.Int{}, err
}

buf := point.Marshal()

return [2]*big.Int{
new(big.Int).SetBytes(buf[0:32]),
new(big.Int).SetBytes(buf[32:64]),
}, nil
}

// MakeKOSKSignature creates KOSK signature which prevents rogue attack
func MakeKOSKSignature(privateKey *PrivateKey, address types.Address,
chainID int64, domain []byte, supernetManagerAddr types.Address) (*Signature, error) {
Expand Down

0 comments on commit 420fdb7

Please sign in to comment.