I'm lost in a twisty maze of openssl command line options, seemingly all alike...
A public datasheet from a chip company shows this public key for use in chip authentication with secp224r1: 048A9B380AF2EE1B98DC417FECC263F8449C7625CECE82D9B916C992DA209D68 422B81EC20B65A66B5102A61596AF3379200599316A00A1410
I have saved it do disk as ascii-hex and as binary. I cannot find the openssl magic spell to make it into a PEM public key for signature verification. These are my best failed attempts:
$ openssl ec -in key57.hex -pubin -inform der -pubout -outform pem
read EC key
unable to load Key
34359738384:error:0D07209B:asn1 encoding routines:ASN1_get_object:too long:crypto/asn1/asn1_lib.c:91:
34359738384:error:0D068066:asn1 encoding routines:asn1_check_tlen:bad object header:crypto/asn1/tasn_dec.c:1118:
34359738384:error:0D07803A:asn1 encoding routines:asn1_item_embed_d2i:nested asn1 error:crypto/asn1/tasn_dec.c:290:Type=X509_ALGOR
34359738384:error:0D08303A:asn1 encoding routines:asn1_template_noexp_d2i:nested asn1 error:crypto/asn1/tasn_dec.c:627:Field=algor, Type=X509_PUBKEY
$ openssl ec -in key57.bin -pubin -inform der -pubout -outform pem
read EC key
unable to load Key
34359738384:error:0D07207B:asn1 encoding routines:ASN1_get_object:header too long:crypto/asn1/asn1_lib.c:101:
The key is 114 hex digits representing 56 bytes with a prefix of 04. What is this key format properly called, and what is the right way to get it into a format usable to something like: openssl dgst -sha1 -verify public.pem -signature signature.bin test.bin