func DeserializeBigNum(b []byte) (*big.Int, error) {
	if len(b) < 4 {
		return nil, errors.New("invalid big num length")
	}

	lengthBytes := b[:4]
	length := binary.BigEndian.Uint32(lengthBytes)
	if len(b) != int(4+length) {
		return nil, errors.New("invalid big num length")
	}

	i := new(big.Int)
	i.SetBytes(b[4:])
	return i, nil
}
// DeserializeBigNum deserializes a big integer similar to OpenSSL
// with a big endian 32-bit length followed by a big endian representation
// of the number.
DeserializeBigNum deserializes a big integer similar to OpenSSL
with a big endian 32-bit length followed by a big endian representation
of the number.
// DeserializeBigNum deserializes a big integer similar to OpenSSL // with a big endian 32 - bit length followed by a big endian representation // of the number .
func DeserializeBigNum(b []byte) (*big.Int, error) {
	if len(b) < 4 {
		return nil, errors.New("invalid big num length")
	}
	lengthBytes := b[:4]
	length := binary.BigEndian.Uint32(lengthBytes)
	if len(b) != int(4+length) {
		return nil, errors.New("invalid big num length")
	}
	i := new(big.Int)
	i.SetBytes(b[4:])
	return i, nil
}
func DeserializeBigNum ( b [ ] byte ) ( * big . Int , error ) { if len ( b ) < 4 { return nil , errors . New ( " " ) } lengthBytes := b [ : 4 ] length := binary . BigEndian . Uint32 ( lengthBytes ) if len ( b ) != int ( 4 + length ) { return nil , errors . New ( " " ) } i := new ( big . Int ) i . SetBytes ( b [ 4 : ] ) return i , nil }
DeserializeBigNum deserializes a big integer similar to OpenSSL
with a big endian 32-bit length followed by a big endian representation
of the number.
DeserializeBigNum deserializes a big integer similar to OpenSSL with a big endian 32 - bit length followed by a big endian representation of the number .