ECC keypair generation with password

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I've been using this command to generate a password protected ECC keypair.

openssl ecparam -name prime256v1 -genkey -noout | openssl pkey -aes256 -passout pass:passwd -text > tmpecprivkey.pem

The output is a
-----BEGIN ENCRYPTED PRIVATE KEY-----

which I parsed using

	PEM_read_PrivateKey(pemKeyFile, NULL, NULL, (void *)password);
	*ecKey = EVP_PKEY_get1_EC_KEY(evpPkey);
	privateKeyBn = EC_KEY_get0_private_key(ecKey);

Now I must send the PEM file to a crypto library that does not support
-----BEGIN ENCRYPTED PRIVATE KEY-----

It expects
-----BEGIN EC PRIVATE KEY-----

Its parser does accept a password.

Is there a way to generate that PEM file?  I.e.

A password protected ECC keypair in -----BEGIN EC PRIVATE KEY----- format/









[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux