kubo/test/sharness/t0165-keystore-data
2022-02-18 23:42:40 +01:00
..
openssl_ed25519.pem feat(cmds): add cleartext PEM/PKCS8 for key import/export (#8616) 2022-02-10 10:45:02 -05:00
openssl_rsa.pem feat(cmds): add cleartext PEM/PKCS8 for key import/export (#8616) 2022-02-10 10:45:02 -05:00
openssl_secp384r1.pem fix(cmds/keystore): do not allow to import keys we don't generate (#8733) 2022-02-18 23:42:40 +01:00
README.md fix(cmds/keystore): do not allow to import keys we don't generate (#8733) 2022-02-18 23:42:40 +01:00

OpenSSL generated keys for import/export tests

Created with commands:

openssl genpkey -algorithm ED25519 > openssl_ed25519.pem
openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:2048 > openssl_rsa.pem

secp key used in the 'restrict import key' test. From: https://www.openssl.org/docs/man1.1.1/man1/openssl-genpkey.html

openssl genpkey -genparam -algorithm EC -out ecp.pem \
        -pkeyopt ec_paramgen_curve:secp384r1 \
        -pkeyopt ec_param_enc:named_curve
openssl genpkey -paramfile ecp.pem -out openssl_secp384r1.pem
rm ecp.pem

Note: The Bitcoin secp256k1 curve which is what go-libp2p-core/crypto actually generates and would be of interest to test against is not recognized by the Go library:

Error: parsing PKCS8 format: x509: failed to parse EC private key embedded
 in PKCS#8: x509: unknown elliptic curve

We keep the secp384r1 type instead from the original openssl example.