It's because of the form of the group order for the curves you list.
They look roughly like 2**n + 2**(n/2). So while technically possible
to end up with 161 bits, with overwhelming probability you end up with
less.
BBB
On Wed, Apr 6, 2016 at 9:22 PM, Frode Nilsen wrote:
> Hi,
>
> When printing
Hi,
When printing the contents of a PEM ECC keypair file for the secp160k1/r1/r2
curves, OpenSSL says the private key is 161 bits:
$ openssl ecparam -name secp160k1 -genkey -out test.pem
$ openssl ec -in test.pem -text -noout
read EC key
Private-Key: (161 bit)
> From: owner-openssl-users On Behalf Of Pierce Ward
> Sent: Wednesday, 31 October, 2007 09:07
> openssl genrsa -out private_key.pem -f4 768
> openssl pkcs8 -in private_key.pem -nocrypt -topk8 -out PK.pem
> cat PK.pem | openssl enc -base64 -d > PK.key
You don't need a separate step there; just
Hi guys,
I'm generating some keys with OpenSSL, and converting them to byte
format using the following commands:
--
openssl genrsa -out private_key.pem -f4 768
openssl pkcs8 -in private_key.pem -nocrypt -topk8 -out PK.pem
cat PK.pem | openssl enc -base64 -d > PK.key
rm -f private_key.