ecurve icon indicating copy to clipboard operation
ecurve copied to clipboard

PEM file

Open baloian opened this issue 9 years ago • 3 comments

Does ecurve support extracting public and private key from PEM file ?

baloian avatar Apr 20 '17 17:04 baloian

Nope :+1:

dcousens avatar Apr 20 '17 22:04 dcousens

So, I cannot use if I have this format of key ? let's say something like this

var paublic_key = '-----BEGIN PUBLIC KEY----- MFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAEi2JCRGh0rM5oxybLI5F1ejljD+RROZEl X2MECets9JnIadvRVG6FzC/hKAxP7ukqUQUaZlLD5y51oSI+TzU5lg== -----END PUBLIC KEY-----'

baloian avatar Apr 20 '17 22:04 baloian

@baloyan you'll need to convert that key to a 32-byte Buffer to be be able to use it in this library. https://github.com/Dexus/pem might help, or https://github.com/crypto-browserify/parse-asn1/

dcousens avatar Apr 20 '17 23:04 dcousens