2

For RSA, my understanding is that large primes are found randomly to build a private/public keypair. If a static seed can be used in that random search process, it should be possible to derive the same public/private keypair reliably.

For a repeatable discovery of foundational large-primes, the search for random primes might begin with an initial random large number. Then a sequential evaluation of large numbers to detect if they are prime.

This could be used to virtually create a TLS-PSK kind of system but using the more widely deployed TLS algorithms (PSK isn't widely deployed). Therefore, TLS is leveraged and induced to work like a PSK-based system, by using the random seed to find the large primes. That is, the seed value is virtually the PSK "symmetric key". Both parties derive the same private/public keypair from the large primes from the shared seed.

Are there major security flaws with this approach? Are there existing schemes that accomplish such a random seed process?

Advantages achieved:

  • Simple central distribution (PKI) - a central control server distributes "seeds" in the same manner as "symmetric passwords" that could conceivably be changed every 15 minutes.
  • Tooling - TLS protection with common libraries (eg. C# .Net Framework) - with a "symmetric password" like framework. (DTLS isn't common)

Compared to central keypair generation and distribution:

  • Processing is decentralised and more scalable if the central control server only needs to generate a cryptographically-random seed. (The search for the primes happens N times, where N is the amount of nodes using the shared seed).
  • Fewer bytes to communicate. If the seed value is fewer bytes than communicating a public/private keypair.

I have a conceptual new secure communication system in mind that would use these advantages.

  • Regular TLS authenticates each other with an asymmetric public-key algorithm. TLS-PSK however don't need that, as they authenticates each other with "pre-shared key", so I don't get the point why you'd use the random seed to derive keyset (mis-spelling for keypair?) and what you use those for. 2. public key cannot be directly generated from a seed, it has to involve some calculation with the private key, otherwise, the relationship between the private and the public key cannot be established.
  • – DannyNiu Jun 22 '20 at 04:57
  • I second DannyNiu's interrogation: what would this (feasible thing) achieve? Any party knowing the secret used to derive the private/public key pair would know the private key (or at least would be able to compute it). – fgrieu Jun 22 '20 at 07:57
  • I have added an advantages section for the benefit of those who require context beyond the question I am asking. @DannyNiu 1) TLS-PSK is not widely adopted; I'll rename to "keypair" if that's more accurate; 2) "public key cannot be ...." - I am referring to deriving large primes from a seed in a search for large primes, that are subsequently used to generate both private/public keys. – Kind Contributor Jun 22 '20 at 08:25
  • @fgrieu "Any party knowing the secret used to derive the private/public key pair..." - this is the same as TLS-PSK, but this scheme allows common TLS deployments to be leveraged and given PSK-like capabilities. – Kind Contributor Jun 22 '20 at 08:25
  • How would you distribute such a seed? By using a secure transport layer? How would you trust the public key. Add a ephemeral self signed root certificate to the trust store? Otherwise, for key pair generation, you just seed a CSPRNG and then create the public / private key pair. But there are a lot of dangers doing so, e.g. change of the CSPRNG or algorithm may break your scheme. – Maarten Bodewes Jun 22 '20 at 08:43
  • @MaartenBodewes There are all the same questions for TLS-PSK. It's not like the standard was created just for fun. All I am saying is that my scheme might work on the infrastructure that doesn't support TLS-PSK, and would be used for the same reasons as TLS-PSK. – Kind Contributor Jun 22 '20 at 11:20
  • Just use one or two (in case of client auth) self signed certificates. In that case you can just establish trust in one or two public certificates, avoiding the whole 1:1 secret sharing. With your scheme you'd have to generate two separate certificates that use the same private key. You try and simplify key management, but asymmetric cryptography is much better than symmetric key management. – Maarten Bodewes Jun 22 '20 at 11:36
  • @MaartenBodewes Given they both have the same symmetric key, they only need to generate the same key pair on both sides, and both trust the public key value from the other side. True, the key pairs could be derived and simply shared, but that's not what this post is about. I don't want to know if it's a useful idea, I want to know if it's feasible and secure. The usefulness MAY be distributed derivation, and possibly also slightly smaller transmission size. (Not all people immediately thought a transistor was very useful compared to a valve until it was made) – Kind Contributor Jun 22 '20 at 11:50