As other's have mentioned. A secret key is just a securely random 32byte number. That's it. The reason that libraries don't include this, is because there is no safe, unified, and guaranteed place to get random data from on all platforms.
how can i generate a secp256k1 seckey in c to be used in libsecp256k1?
nostr:nprofile1qqsxwkuyle67y94tj378gw8w2xw2wa6nwmwlqhddlwnz0z7sztsaw2qppemhxue69uhkummn9ekx7mp0su9alh nostr:nprofile1qqsrhuxx8l9ex335q7he0f09aej04zpazpl0ne2cgukyawd24mayt8gprfmhxue69uhhq7tjv9kkjepwve5kzar2v9nzucm0d5hszxmhwden5te0wfjkccte9emk2um5v4exucn5vvhxxmmd9uq3xamnwvaz7tmhda6zuat50phjummwv5hsx7c9z9 nostr:nprofile1qqsr9cvzwc652r4m83d86ykplrnm9dg5gwdvzzn8ameanlvut35wy3gpz3mhxue69uhhyetvv9ujuerpd46hxtnfduq3qamnwvaz7tmwdaehgu3wwa5kuegpzemhxue69uhhyetvv9ujuurjd9kkzmpwdejhglzevy3
#asknostr #c
Discussion
yes, i understand the concept behind it. ive just leaved this part in my binding library as well. or at most i would add a secret key generate method with warning and documents about how it works.
the library: https://github.com/kehiy/go-secp256k1
i would appreciate any kind of contributions as well. 🫡
I have a project that might interest you, or at least make some things easier for you.
https://www.vaughnnugent.com/resources/software/modules/noscrypt
thanks a lot. i would take a look at it. 🫡