Is there a way to deterministically create an RSA private-key for an X.509 certificate, ideally through a library which has been vetted already?
i.e. user enters some phrase like "this is my private group", and that seed value is used to generate a private RSA key which I can then use as a certificate authority. But in such a way I can get the same key predictably on different machines from just that seed value.
My use case is I would like to support pre-shared keys in my application, but use the existing X.509 support it uses for keying. If I could create a predictable X.509 certificate from some initial value, then this would be trivial since users could verify each other's certificates against the generated key.
I would like to avoid hand-rolling a library to do this for obvious reasons, but this doesn't seem to be a commonly done thing - even though obviously various systems which support PSK must, internally, be doing something quite similar.
-honreq, and if that is omitted-subj //CN=testis wrong and results in empty Subject and Issuer which is invalid and unusable. However, if you did create certs, you could see those (and all) fields withopenssl x509 -textwithout needing python code.openssl ca(reading a CSR created withopenssl req -newwithout-x509) can control start/end times, and uses serial from a file you can set, but is more effort to set up thanreq -new -x509(orx509 -req -selfsign) – dave_thompson_085 Jun 22 '22 at 04:07