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

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:`GPGME_PK_RSA`

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

`GPGME_PK_RSA_E`

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

`GPGME_PK_RSA_S`

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

`GPGME_PK_DSA`

This value indicates DSA, the Digital Signature Algorithm.

`GPGME_PK_ELG`

This value indicates ElGamal.

`GPGME_PK_ELG_E`

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

`GPGME_PK_ECC`

SINCE: 1.5.0

This value is a generic indicator for ellipic curve algorithms.

`GPGME_PK_ECDSA`

SINCE: 1.3.0

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

`GPGME_PK_ECDH`

SINCE: 1.3.0

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

`GPGME_PK_EDDSA`

SINCE: 1.7.0

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`) SINCE: 1.7.0

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: Hash Algorithms, Up: Algorithms [Contents][Index]