good morning!!!!

Skip to content
Snippets Groups Projects
Commit 238f39a4 authored by Jeffrey Wilcke's avatar Jeffrey Wilcke
Browse files

Validate seckey when generating pub key

parent 09e53367
No related branches found
No related tags found
No related merge requests found
......@@ -15,8 +15,9 @@ import "C"
import (
"bytes"
"errors"
"github.com/ethereum/go-ethereum/crypto/randentropy"
"unsafe"
"github.com/ethereum/go-ethereum/crypto/randentropy"
)
//#define USE_FIELD_5X64
......@@ -85,6 +86,10 @@ func GenerateKeyPair() ([]byte, []byte) {
}
func GeneratePubKey(seckey []byte) ([]byte, error) {
if err := VerifySeckeyValidity(seckey); err != nil {
return nil, err
}
pubkey_len := C.int(65)
const seckey_len = 32
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment