#1 Yesterday 14:36:02

tfopc
Member
Registered: 2024-01-08
Posts: 37

ECC certificate-based public-key cryptography, decrypt with openssl?

Hi ab,

i want to encrypt some data (files) with your "mormot.tools.ecc"

is it possible to decrypt with the public-key with standard tools (openssl?)

How to get a private key in openssl-compatible format?

openssl ecparam -genkey -name prime256v1 | openssl ec -aes256 -out private_key.pem
openssl ec -in private_key.pem -pubout -out public_key.pem

should the "Base64" from (ecc infopriv -auth key.private -pass P@ssW0rd -rounds 60000) represent the key in pem-format?

Thanks.

Offline

#2 Yesterday 15:43:30

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 15,334
Website

Re: ECC certificate-based public-key cryptography, decrypt with openssl?

No, mormot.tools.ecc is for our own format.

For ASN.1 / X.509 standard formats, use mormot.crypt.ecc.pas functions, or even better the simpler and safer API from CryptPublicKey[ckaEcc256] and CryptPrivateKey[ckaEcc256].

Offline

Board footer

Powered by FluxBB