Libgcrypt | |
Ver Layout: | stacked |
Developer: | GnuPG community[1] |
Author: | Werner Koch |
Programming Language: | C |
Operating System: | Cross-platform |
Genre: | Cryptographic library |
License: | GNU Lesser General Public License (LGPLv2.1+) / GNU General Public License (GPLv2+)[2] |
Libgcrypt is a cryptography library developed as a separated module of GnuPG.[3] It can also be used independently of GnuPG, but depends on its error-reporting library Libgpg-error.[4]
It provides functions for all fundamental cryptographic building blocks:
Primitive or Operation | Algorithms or Implementation[5] | |
---|---|---|
symmetric ciphers | AES (128, 192, 256 bits), DES, 3DES, IDEA, CAST5, Blowfish, Twofish (128, 256 bits), Ron's Cipher 2 / RC2 (40, 128 bits), ARCfour / RC4, SEED, Serpent (128, 192, 256 bits), Camellia (128, 192, 256 bits), Salsa20, Salsa20/12, ChaCha20, GOST 28147-89 / GOST R 34.12-2015 (Magma: & Kuznyechik:), SM4, ARIA | |
cipher modes:[7] | ECB, CFB, CBC, OFB, CTR, CCM, GCM, OCB, EAX, XTS, Stream, AES Key Wrap, AES Key Wrap with padding, SIV and GCM-SIV | |
public key algorithms | RSA, ElGamal, DSA, ECDSA, EdDSA, Ed448, DH, EDH, ECDH | |
hash algorithms | MD2, MD4, MD5, SHA-1, SHA-224, SHA-256, SHA-384, SHA-512, SHA3-224, SHA3-256, SHA3-384, SHA3-512, SHAKE128, SHAKE256, RIPEMD-160, TIGER/192, TIGER1, TIGER2, Whirlpool, CRC-24 (as in), CRC-32 (as in ISO 3309), CRC-32 (as in), GOST R 34.11-94 / GOST 34.311-95, GOST R 34.11-2012 (Stribog) /, BLAKE2b (128, 160, 224, 256 Bits), BLAKE2s (160, 256, 384, 512 Bits), SM3[11] | |
message authentication codes (MACs) | HMAC for all hash algorithms, CMAC for all cipher algorithms, GMAC for some cipher algorithms, Poly1305 | |
key derivation functions (KDFs) | ||
elliptic curves | NIST (P-256, P-384, P-521), SECG (secp256k1), ECC Brainpool / (P256r1, P384r1, P512r1), Bernstein (Curve25519, Curve448), GOST R 34.10-2012, SM2[14] |
Libgcrypt features its own multiple precision arithmetic implementation, with assembler implementations for a variety of processors, including Alpha, AMD64, HP PA-RISC, i386, i586, M68K, MIPS 3, PowerPC, and SPARC. It also features an entropy gathering utility, coming in different versions for Unix-like and Windows machines.
Usually multiple, stable branches of Libgcrypt are maintained in parallel; since 2022-03-28 this is the Libgrypt 1.10 branch as stable branch, plus the 1.8 branch as LTS ("long-term support") branch, which will be maintained at least until 2024-12-31.[15]