I have an ECDSA Public Key in DER Format.
I viewed the file in an ASN1 Editor and there's the OID 1.2.840.10045.1.1
whose superior (1.2.840.10045.1
) is ecdsa-with-SHA1
. So I thought that SHA1 is used here. But it turns out that a signature generated with the corresponding private key could only be verified with openssl when I used EVP_sha256()
.
How do I get this information about which hash algorithm is used from the whole key? This is the whole key:
308201333081EC06072A8648CE3D0201
3081E0020101302C06072A8648CE3D01
01022100A9FB57DBA1EEA9BC3E660A90
9D838D726E3BF623D52620282013481D
1F6E5377304404207D5A0975FC2C3057
EEF67530417AFFE7FB8055C126DC5C6C
E94A4B44F330B5D9042026DC5C6CE94A
4B44F330B5D9BBD77CBF958416295CF7
E1CE6BCCDC18FF8C07B60441048BD2AE
B9CB7E57CB2C4B482FFC81B7AFB9DE27
E1E3BD23C23A4453BD9ACE3262547EF8
35C3DAC4FD97F8461A14611DC9C27745
132DED8E545C1D54C72F046997022100
A9FB57DBA1EEA9BC3E660A909D838D71
8C397AA3B561A6F7901E0E82974856A7
0201010342000448E231AF19DF341C82
63521A9436ACBCA5ACB7E3C56A63187B
F22539BE8242FF82F5521F619977FEE1
3457490123F04915671C7AF755E98465
FD20AECAAF7F58
EDIT: This is a signature in plain format, verifiable with the public key posted above:
93 ea c4 0a 7e 26 04 dc b9 a1 05 34 b1 52 57 2a
0e 1a c8 d2 d5 fc 96 e5 95 c2 45 3d 71 c7 82 8a
0c ac 72 96 01 8c ef 87 b6 9c e2 55 74 e6 de 2d
c6 a3 5c f0 c6 5e 72 27 3a 30 e0 50 33 16 ed 2d