OPNsense Forum

English Forums => General Discussion => Topic started by: b.a. on April 09, 2023, 04:25:03 AM

Title: [Problem solved, feature request] EC private key should include curve params
Post by: b.a. on April 09, 2023, 04:25:03 AM
PKI works flawlessly everywhere.

Environment



Repro


Expected outcome


Actual outcome



Root cause



Remediation


Prepend one of the following implicit "named" curves to the beginning of the pk

prime256v1 (NIST P-256)

-----BEGIN EC PARAMETERS-----
BggqhkjOPQMBBw==
-----END EC PARAMETERS-----



secp384r1

-----BEGIN EC PARAMETERS-----
BgUrgQQAIg==
-----END EC PARAMETERS-----



secp521r1

-----BEGIN EC PARAMETERS-----
BgUrgQQAIw==
-----END EC PARAMETERS-----


Also worth mentioning https://safecurves.cr.yp.to


Requested long-term solution


Prepend the BEGIN EC PARAMETERS section to the download pk.

If a user doesn't want it, they can remove it.

It's far more difficult to find them (it took me extra time to find these and verify them) than it is to remove them.