Next: , Up: Algorithms   [Contents][Index]

4.1 Public Key Algorithms

Public key algorithms are used for encryption, decryption, signing and verification of signatures.

Data type: enum gpgme_pubkey_algo_t

The gpgme_pubkey_algo_t type specifies the set of all public key algorithms that are supported by GPGME. Possible values are:


This value indicates the RSA (Rivest, Shamir, Adleman) algorithm.


Deprecated. This value indicates the RSA (Rivest, Shamir, Adleman) algorithm for encryption and decryption only.


Deprecated. This value indicates the RSA (Rivest, Shamir, Adleman) algorithm for signing and verification only.


This value indicates DSA, the Digital Signature Algorithm.


This value indicates ElGamal.


This value also indicates ElGamal and is used specifically in GnuPG.


This value is a generic indicator for ellipic curve algorithms.


This value indicates ECDSA, the Elliptic Curve Digital Signature Algorithm as defined by FIPS 186-2 and RFC-6637.


This value indicates ECDH, the Eliptic Curve Diffie-Hellmann encryption algorithm as defined by RFC-6637.


This value indicates the EdDSA algorithm.

Function: const char * gpgme_pubkey_algo_name (gpgme_pubkey_algo_t algo)

The function gpgme_pubkey_algo_name returns a pointer to a statically allocated string containing a description of the public key algorithm algo. This string can be used to output the name of the public key algorithm to the user.

If algo is not a valid public key algorithm, NULL is returned.

Function: char * gpgme_pubkey_algo_string (gpgme_subkey_t key)

The function gpgme_pubkey_algo_string is a convenience function to build and return an algorithm string in the same way GnuPG does (e.g. “rsa2048” or “ed25519”). The caller must free the result using gpgme_free. On error (e.g. invalid argument or memory exhausted), the function returns NULL and sets ERRNO.

Next: , Up: Algorithms   [Contents][Index]