code: func PrivKeyFromBytes(curve elliptic.Curve, pk []byte) (*PrivateKey,
  	*PublicKey) {
  	x, y := curve.ScalarBaseMult(pk)
  
  	priv := &ecdsa.PrivateKey{
  		PublicKey: ecdsa.PublicKey{
  			Curve: curve,
  			X:     x,
  			Y:     y,
  		},
  		D: new(big.Int).SetBytes(pk),
  	}
  
  	return (*PrivateKey)(priv), (*PublicKey)(&priv.PublicKey)
  }
docs: // PrivKeyFromBytes returns a private and public key for `curve' based on the
  // private key passed as an argument as a byte slice.