Open nodh opened 3 weeks ago
@iaik-jheher just to double-check: that's a new key, works and behaves as the ephemeral key, only it's not generated, but loaded from external data. I smell boilerplate code from the future
Yes, sounds about right. Signer.ForPEMEncodedPrivateKey
?
Ideally we'd want data classes for encoded private keys though...
I would really need this for verification of samples from specs. Key is defined in PKCS#1 or PKCS#8 format, e.g.:
PKCS#1:
-----BEGIN EC PRIVATE KEY-----
MHcCAQEEIGwHU3LKj2fCxiUWB76jCnxIOJ2KAgYKbYGays8h/g+goAoGCCqGSM49
AwEHoUQDQgAET+Zr8vrF+kdr1zpjK3ufUv1fd7DS0s8Yf8/Ny3Hb4I57Sz20Zabp
brDmqFB7AmrWhdejOPHn9+Ln51i42bCdGQ==
-----END EC PRIVATE KEY-----
and PKCS#8:
-----BEGIN PRIVATE KEY-----
MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgbAdTcsqPZ8LGJRYH
vqMKfEg4nYoCBgptgZrKzyH+D6ChRANCAARP5mvy+sX6R2vXOmMre59S/V93sNLS
zxh/z83LcdvgjntLPbRlpulusOaoUHsCataF16M48ef34ufnWLjZsJ0Z
-----END PRIVATE KEY-----
on it
started in #202
Implement parsing private key from PEM representation, e.g. from this input to an object in Signum.