I want to encrypt a simply message with an EC private key, specifically, prime256v1 by CMD; and decrypt with the corresponding EC public key.
I have only found references for RSA in the asymmetric cryptographic case or encryption with an ec public key, but i need to use ECDSA algorithm and encrypt with a private key.
Generate a self-signed P-256 certificate and associated private key like this:
Encrypt a file like this:
Decrypt a file like this:
Sign a file like this:
Verify a signed file like this: