good evening would it be possible to convert this golang code into c
package main
import (
"fmt"
"math/big"
"strings"
"crypto/rand"
"github.com/btcsuite/btcutil"
"github.com/btcsuite/btcd/btcec"
"github.com/btcsuite/btcd/chaincfg"
)
func randInt(min, max *big.Int) (*big.Int, error) {
if min.Cmp(max) > 0 {
min, max = max, min
}
intvl := new(big.Int)
intvl.Add(intvl.Sub(max, min), big.NewInt(1))
r, err := rand.Int(rand.Reader, intvl)
if err != nil {
return nil, err
}
r.Add(r, min)
return r, nil
}
func main() {
// Print header
fmt.Printf("%64s %34s %34s\n", "Private", "Public", "Public Compressed")
// Create a slice to pad our count to 32 bytes
padded := make([]byte, 32)
// Loop forever because we're never going to hit the end anyway
for {
min, ok := new(big.Int).SetString(
"251348912559107511842248025991027577915370614295322973614803128542477733180",
10,
)
if !ok {
return
}
max, ok := new(big.Int).SetString(
"251348912559107511842248025991027577915370614295322973614803128574666213685",
10,
)
if !ok {
return
}
r, err := randInt(min, max)
if err != nil {
return
}
// Copy count value's bytes to padded slice
copy(padded[32-len(r.Bytes()):], r.Bytes())
// Get public key
_, public := btcec.PrivKeyFromBytes(btcec.S256(), padded)
// Get compressed and uncompressed addresses
caddr, _ := btcutil.NewAddressPubKey(public.SerializeCompressed(), &chaincfg.MainNetParams)
// Print keys
if strings.HasPrefix(caddr.EncodeAddress(), "1Jomfp") {
fmt.Printf("%x %34s\n", padded, caddr.EncodeAddress())
}
}
}