There isn't a call to generate it in the API itself? (check in the .h file)
how can i generate a secp256k1 seckey in c to be used in libsecp256k1?
nostr:nprofile1qqsxwkuyle67y94tj378gw8w2xw2wa6nwmwlqhddlwnz0z7sztsaw2qppemhxue69uhkummn9ekx7mp0su9alh nostr:nprofile1qqsrhuxx8l9ex335q7he0f09aej04zpazpl0ne2cgukyawd24mayt8gprfmhxue69uhhq7tjv9kkjepwve5kzar2v9nzucm0d5hszxmhwden5te0wfjkccte9emk2um5v4exucn5vvhxxmmd9uq3xamnwvaz7tmhda6zuat50phjummwv5hsx7c9z9 nostr:nprofile1qqsr9cvzwc652r4m83d86ykplrnm9dg5gwdvzzn8ameanlvut35wy3gpz3mhxue69uhhyetvv9ujuerpd46hxtnfduq3qamnwvaz7tmwdaehgu3wwa5kuegpzemhxue69uhhyetvv9ujuurjd9kkzmpwdejhglzevy3
#asknostr #c
Discussion
I guess it could also be just a constructor of course
no, i checked those files. i can drive a keypair from a seckey. but i can't generate a seckey. based on what i saw.
Right, i just looked. I think you just get 32 bytes from /dev/urandom, as it notes there you have a negligible chance of an invalid seckey. But also you can check there, right.
Mostly you just use bip32 master secrets ofc, in practice.
thanks a lot. i was thinking about that as well, but i thought its too simple to be real. that's wonderful!
generally im writing some golang bindings for this library and im trying to provide an api to generate a keypair. im not sure how much it makes sense at all. since the original source says you can read random bytes yourself.