func NewHDKeyRand() (*HDKey, error) {
	seed := make([]byte, 256)
	if _, err := rand.Read(seed); err != nil {
		return nil, err
	}
	return NewHDKey(seed), nil
}
NewHDKeyRand -- returns the HDKey with random seed.
package bip32
import (
	"bytes"
	"crypto/rand"
	"fmt"
	"strconv"
	"strings"
	"crypto/hmac"
	"crypto/sha512"
	"encoding/binary"
	"github.com/keyfuse/tokucore/network"
	"github.com/keyfuse/tokucore/xbase"
	"github.com/keyfuse/tokucore/xcrypto"
)
const (
	HardenedKeyStart = 0x80000000  
	PublicKeyCompressedLength = 33
	serializedKeyLen = 4 + 1 + 4 + 4 + 32 + 33  
)
type HDKey struct {
	childNum  []byte  
	parentFP  []byte  
	chainCode []byte  
	depth     byte    
	isPrivate bool    
	prvkey    *xcrypto.PrvKey
	pubkey    *xcrypto.PubKey
}
func NewHDKey(seed []byte) *HDKey {
	hmac := hmac.New(sha512.New, []byte("Bitcoin seed"))
	if _, err := hmac.Write(seed); err != nil {
		return nil
	}
	intermediary := hmac.Sum(nil)
	keyBytes := intermediary[:32]
	chainCode := intermediary[32:]
	prvkey := xcrypto.PrvKeyFromBytes(keyBytes)
	return &HDKey{
		childNum:  []byte{0x00, 0x00, 0x00, 0x00},
		parentFP:  []byte{0x00, 0x00, 0x00, 0x00},
		chainCode: chainCode,
		depth:     0x00,
		isPrivate: true,
		prvkey:    prvkey,
	}
}