# Generate key pair deterministically from a particular seed [duplicate]

I've been reading "SQRL Secure QR Login" at Gibson's website, and I'm wondering if there is a way to generate an RSA private/public key-pair based on some cryptographically secure input, so that if the input stays the same we keep getting the same key pair on the output.

The linked web-site uses elliptic curve cryptography to achieve this property. Is it not possible with RSA?

## marked as duplicate by Maarten Bodewes♦, Gilles 'SO- stop being evil', e-sushi, otus, DrLecterJun 23 '14 at 8:10

• ecliptic $\mapsto$ elliptic $\:$ ? $\;\;\;$ – user991 Oct 3 '13 at 3:53

Of course it's possible; all you need is take your cryptographically secure input, feed it as the key to a CSRNG, and then use the CSRNG output as the source of randomness to an RSA key generation algorithm. For a concrete example, there are several such key generation methods in FIPS 186-3, with the cryptographically secure input being the 'seed' (and you would fix all the other various parameters).

This is easy; however this is not cheap. RSA key generation involves testing various large numbers for primality; depending on the hardware you have (and the RSA key size you are attempting to build), this can take multiple seconds. Depending on the your requirements, this can be a deal breaker. In contrast, the key generation method for elliptic curves is cheap; that is undoubtedly why the guys on the web-site selected it.