| 1 | # OpenSSL generated keys for import/export tests |
| 2 | |
| 3 | Created with commands: |
| 4 | |
| 5 | ```bash |
| 6 | openssl genpkey -algorithm ED25519 > openssl_ed25519.pem |
| 7 | openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:2048 > openssl_rsa.pem |
| 8 | ``` |
| 9 | |
| 10 | secp key used in the 'restrict import key' test. |
| 11 | From: https://docs.openssl.org/1.1.1/man1/genpkey/ |
| 12 | ```bash |
| 13 | openssl genpkey -genparam -algorithm EC -out ecp.pem \ |
| 14 | -pkeyopt ec_paramgen_curve:secp384r1 \ |
| 15 | -pkeyopt ec_param_enc:named_curve |
| 16 | openssl genpkey -paramfile ecp.pem -out openssl_secp384r1.pem |
| 17 | rm ecp.pem |
| 18 | ``` |
| 19 | Note: The Bitcoin `secp256k1` curve which is what `go-libp2p-core/crypto` |
| 20 | actually generates and would be of interest to test against is not |
| 21 | recognized by the Go library: |
| 22 | ``` |
| 23 | Error: parsing PKCS8 format: x509: failed to parse EC private key embedded |
| 24 | in PKCS#8: x509: unknown elliptic curve |
| 25 | ``` |
| 26 | We keep the `secp384r1` type instead from the original openssl example. |