MCPcopy Create free account
hub / github.com/ElementsProject/lightning / generate_key

Function generate_key

connectd/handshake.c:189–198  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

187};
188
189static struct keypair generate_key(void)
190{
191 struct keypair k;
192
193 do {
194 randombytes_buf(k.priv.secret.data, sizeof(k.priv.secret.data));
195 } while (!secp256k1_ec_pubkey_create(secp256k1_ctx,
196 &k.pub.pubkey, k.priv.secret.data));
197 return k;
198}
199
200/* h = SHA-256(h || data) */
201static void sha_mix_in(struct sha256 *h, const void *data, size_t len)

Callers 2

act_one_initiatorFunction · 0.70
act_two_responderFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected