Erlang's :crypto module

Please let me know if there’s a more appropriate channel for the question. I’m attempting to use the :crypto module. I’m using this :crypto.crypto_one_time(Cipher, Key, Data, EncryptFlag) I would like to encrypt a file using a PGP key; using elliptical curve as my encryption method.

There are other methods such as public_encrypt and public_key:encrypt_public but I run into the same issue using these.

:ecdsa or an equivalent is not an option for the Cipher field.

As far as I remember ecdsa is a hashing algorithm and not an encryption algorithm.

1 Like

Signing, it literally stands for:

Elliptic Curve Digital Signature Algorithm

Erlang do not support encrypting data with other public-key algorithms than RSA.

Okay, it seems to be for signing, not hashing, which is basically hashing with extra data…

Use public key to sign message with ECSDA as encryption method seems to be more detailed and appropriate, I’ll close here.