Can I use a random number generator with seed for key derivation? I don't know a thing about cryptography so I'm judging by what I see in APIs docs.
I want to use ECDSA or ECDH in my project. And what I know so far about key derivation in this systems is that they:


generate a random private key $d$
then do some fancy stuff with it to get a public key $dG$


My question is: can I use a random number generator that works with seeds?

Like if we say thatrandom(seed) produces random numbers from set A.
And if
random(seed1) -&gt; set A,
random(seed2) -&gt; set B,
seed1 != seed2,
Then A != B or at least A is as far as possible from being equal to B
My question is: can I use a random number generator that works with seeds?


Yes.

All you need is a 256-bit uniform random secret, or a seed chosen by a process with 256 bits of min-entropy.  You can derive everything else from there using a key derivation function like HKDF-SHA256, which is—securitywise—just a kind of PRNG with a convenient API to name what the purpose of each derived key is so that you can reproduce the computation.

For example, you could ask a computer to generate for you a 20-word diceware phrase $p$.  You can convert it into a 256-bit effectively uniform random secret $k$ with $\operatorname{HKDF-Extract}(p)$; then, from $k$, you can derive:


an AES-GCM-256 key for notes in a private todo list with $k_1 = \operatorname{HKDF-Expand}(k, \text{‘todo list key 1’})$
an ECDSA key for a Bitcoin wallet with $d = \operatorname{HKDF-Expand}(k, \text{‘Bitcoin wallet, 2019-03-23’})$
an RSA key using a particular prime generation procedure with a particular choice of PRNG seeded with $s = \operatorname{HKDF-Expand}(k, \text{‘my RSA key seed’})$.  Of course, RSA key generation is rather slow!  So people don't usually do this.


There are two key points:


You must let a computer or fair dice rolls choose the phrase $p$ for you, and then commit it to memory.  Don't try to think of $p$ yourself first, because you are bad at thinking randomly.
The labels must all be distinct.  All bets are off if you use the same label for two different purposes.