Fact-checked by Grok 2 weeks ago

Libgcrypt

Libgcrypt is a cryptographic library developed by the GNU Project as a general-purpose collection of building blocks for implementing secure encryption, hashing, and authentication in applications. Originally derived from the code used in GnuPG, it provides portable, efficient implementations of symmetric ciphers such as , ChaCha20, and ; hash algorithms including , , and ; message authentication codes like and CMAC; and support for algorithms such as , ECDSA, and . The library emphasizes security and compliance with modern cryptographic standards, offering modes of operation for ciphers (e.g., GCM, ) and additional utilities for random number generation, large integer arithmetic, and key derivation functions, making it suitable for both low-level and high-level cryptographic needs across systems and Windows. It depends on the companion library libgpg-error for error handling and maintains /ABI compatibility since version 1.2 to ensure seamless integration in software projects. Licensed under the GNU Lesser General Public License version 2.1 or later (LGPLv2.1+), Libgcrypt allows linking with while requiring availability for modifications. Development of Libgcrypt began as a modular extraction from GnuPG to promote reusability, with the project hosted under the GnuPG umbrella and distributed via the official GnuPG servers due to historical U.S. export restrictions on . The current stable release is version 1.11.2, issued on August 4, 2025, following a series of updates that include long-term support for version 1.8 and end-of-life designations for earlier branches like 1.7 in 2019. and documentation are maintained in a public repository, encouraging community contributions while adhering to GNU's principles.

Introduction

Overview

Libgcrypt is a general-purpose cryptographic that provides essential building blocks for implementing secure applications, including symmetric ciphers, hash algorithms, message authentication codes (MACs), public-key algorithms, key derivation functions, and . Originally derived from the code used in GnuPG, it serves as a modular component that can operate independently while sharing foundational elements with the GNU Privacy Guard ecosystem. The library's primary use cases include performing standalone cryptographic operations in software applications, integrating with GnuPG tools for enhanced security features, and supporting broader needs such as secure communications protocols and data protection mechanisms. Libgcrypt requires the companion libgpg-error library for standardized error handling across GnuPG-related components. As of November 2025, the current stable version is 1.11.2, released on August 4, 2025. It offers cross-platform compatibility, running natively on most POSIX-compliant systems and pre-POSIX environments, with support for Windows through cross-compilation, and architectures such as x86 and ARM.

Design Principles

Libgcrypt emphasizes modularity by providing a collection of low-level cryptographic primitives, such as symmetric ciphers, hash functions, message authentication codes, public-key algorithms, multi-precision integer operations, and random number generation, without implementing higher-level protocols like OpenPGP or S/MIME. This design allows developers to integrate these building blocks flexibly into custom applications or larger systems, avoiding the constraints of protocol-specific libraries. Originally extracted as a modular component from the GnuPG codebase, Libgcrypt enables reuse across the GNU ecosystem while maintaining independence. A security-first approach guides Libgcrypt's development, prioritizing robust protections against common threats. The library includes deprecated or insecure algorithms for compatibility but deprecates them and favors modern standards such as and SHA-256 over weak options like or SHA-1. Recent versions include various constant-time operation improvements, with ongoing development for critical functions such as decryption and using techniques like Barrett or Montgomery reduction where applicable. Version 1.11.0 introduced support for quantum-resistant algorithms like and Classic McEliece, along with new APIs for Key Encapsulation Mechanisms (KEMs), enhancing preparedness for . For randomness, Libgcrypt employs a (CSPRNG) with dedicated entropy gathering modules that collect high-quality from sources like /dev/random, getentropy(), or , ensuring sufficient mixing before output and including fork detection for . Portability and efficiency are core to Libgcrypt's implementation, written in to ensure compatibility across systems, Windows, and other platforms without reliance on non-standard features. To optimize performance, the library includes hand-optimized assembler code for specific architectures, such as AMD64 for processors, for embedded and mobile devices, and PowerPC, accelerating operations like encryption and elliptic curve computations where hardware support allows. This balance enables broad deployment while delivering efficient execution suitable for both resource-constrained environments and high-performance servers. Libgcrypt maintains API stability through backward compatibility since version 1.2.0, preserving the (ABI) and ensuring that applications built against earlier stable releases continue to function without modification across subsequent updates. As part of the Project, it is developed under the GNU Lesser License (LGPLv2.1+), promoting open-source principles that facilitate code auditability, security reviews by the community, and collaborative contributions via public repositories. This ethos supports ongoing scrutiny and improvement, aligning with guidelines for accessibility and trustworthiness.

History

Origins and Development

Libgcrypt originated as the cryptographic component within , an open-source implementation of the OpenPGP standard developed by Werner Koch and first released on September 7, 1999. The library's code was initially embedded in to handle symmetric and asymmetric , hashing, and other , but it was extracted into a standalone module around 2000–2001 to facilitate reuse in other software projects independent of . This separation was motivated by the need for a modular, general-purpose cryptographic backend, particularly in the context of U.S. export controls on cryptographic software during the late 1990s and early 2000s, allowing distribution through servers without the full package. The initial standalone release, version 1.1.0, arrived in April 2001, representing the first distinct version detached from GnuPG's and designated as alpha quality. Subsequent alpha releases, such as 1.1.3 in 2001, refined the library while emphasizing its experimental status. Libgcrypt is maintained by the GnuPG Project under Project umbrella, with development coordinated through contributions from researchers and distributed via GNU's infrastructure. Version control transitioned to in the mid-2000s, enabling collaborative enhancements while preserving backward compatibility. Key early milestones include the integration with libgpg-error in the early 2000s, which standardized error reporting across GnuPG-related libraries. Around 2017, the project adopted a for , exemplified by the 1.8 series as an LTS branch, alongside shorter development cycles to balance and .

Major Releases

Libgcrypt's development follows a that includes stable branches for ongoing maintenance, (LTS) branches for extended enterprise use, and end-of-life (EOL) designations for older series. The 1.8 series serves as an LTS branch, receiving security and updates. The current stable branch, 1.11, began with version 1.11.0 in June 2024 and remains ABI-stable, with patch releases like 1.11.2 in August 2025 addressing bug fixes. Earlier series, such as 1.6 and 1.7, reached EOL on June 30, 2017, and June 30, 2019, respectively, after which no further updates were provided. Major releases occur approximately every 1-2 years, with patch releases issued more frequently for security and stability enhancements. The 1.2.0 release on April 16, 2004, marked the first version with full and ABI compatibility, establishing a foundation for subsequent development while transitioning to LGPL licensing. Version 1.4.0, released on December 10, 2007, introduced experimental support including ECDSA and enhanced compliance options for enterprise environments, while maintaining upward compatibility with the 1.2 series. The 1.5.0 release on June 29, 2011, focused on performance and security improvements, incorporating AES-NI instructions for side-channel mitigations and adding support for ECDH, OAEP, and PSS padding schemes. In December 2013, version 1.6.0 added Ed25519 support and mitigations against the Yarom/Falkner (CVE-2013-4242), alongside performance boosts for ciphers and hashes. The 1.7.0 release on April 15, 2016, expanded algorithm support with variants, , and additional ECC curves like and secp256k1. Version 1.8.0, released on July 18, 2017, introduced XTS mode and Blake-2 hashing as part of its LTS designation, emphasizing long-term stability for production systems. The 1.9.0 release on January 19, 2021, added Ed448 and X448 curves along with , though it was quickly superseded by 1.9.1 due to a critical bug. In March 2022, 1.10.1 launched the 1.10 stable branch, incorporating and Balloon KDF modes while preparing infrastructure for through new control codes for algorithm validation. The most recent major release, 1.11.0 on June 19, 2024, advanced post-quantum readiness with a new and support for algorithms like , (FIPS 203), and Classic McEliece, alongside aliases for Brainpool curves (bp256, bp384, bp512). This version maintains full API/ABI compatibility with prior series, ensuring seamless upgrades.

Technical Features

Supported Algorithms

Libgcrypt provides a comprehensive set of , including symmetric and asymmetric algorithms, hash functions, message authentication codes, and key derivation functions, all implemented to support secure applications within ecosystem.

Symmetric Ciphers

Libgcrypt supports a variety of symmetric block and stream ciphers, enabling and decryption operations for data protection. The library includes in all standard variants (128, 192, and 256-bit keys), which operates on 128-bit blocks and is widely used for its efficiency and security. Other block ciphers encompass Blowfish (key sizes from 8 to 576 bits in 8-bit increments, 64-bit blocks), (128, 192, and 256-bit keys, 128-bit blocks), CAST5 (128-bit keys, 64-bit blocks), and 3DES (56-bit effective key for DES, 168-bit for 3DES, 64-bit blocks), (128 and 256-bit keys, 128-bit blocks), (128, 192, and 256-bit keys, 128-bit blocks), (128-bit keys, 128-bit blocks), and Arcfour ( stream cipher with variable key sizes up to 256 bits). Stream ciphers like ChaCha20 (256-bit keys, ) are also available for high-speed applications. These ciphers can be operated in multiple modes to suit different security requirements, including ECB (Electronic Codebook), (Cipher Block Chaining), CFB (Cipher Feedback), OFB (Output Feedback), CTR (Counter), GCM (Galois/Counter Mode for ), CCM (Counter with ), (Offset Codebook Mode), and XTS (XEX-based Tweaked Codebook for ). Advanced AEAD ( with Associated Data) modes such as , , GCM-SIV, and Poly1305 are likewise supported, providing alongside .

Hash Functions

The library implements a broad range of hash algorithms for and digital signatures, covering legacy, standard, and modern variants. Supported hashes include the SHA family: (160-bit output), SHA-224/256/384/512 (224 to 512-bit outputs), SHA-512/224 and SHA-512/256 (truncated variants), and SHA3-224/256/384/512 (Keccak-based, 224 to 512-bit outputs). Additionally, SHAKE128 and SHAKE256 (extendable-output functions with 128- and 256-bit security levels) enable variable-length outputs. The MD family features , , and (128-bit outputs, though MD2 is reserved without implementation). Other hashes comprise RIPEMD-160 (160-bit), Tiger and its variants (Tiger1, Tiger2, 192-bit), (512-bit), and newer additions like Blake2b (160 to 512-bit variants) and Blake2s (128 to 256-bit variants), along with SM3 (256-bit) and (256/512-bit).

Message Authentication

Libgcrypt facilitates message authentication through several mechanisms to verify and . (Hash-based Message Authentication Code) is supported with all aforementioned hash functions, such as and , allowing flexible construction based on the underlying hash's properties. (Cipher-based MAC) is available for block ciphers including , 3DES, , CAST5, , , , , and SM4, providing a standards-compliant alternative to . Poly1305, a high-speed , operates in standalone mode or combined with ciphers like (as in Poly1305-), , , , and , adhering to RFC 8439 for AEAD constructions. Further options include GMAC with , , , , and , as well as GOST28147_IMIT for legacy compatibility.

Public-Key Algorithms

Public-key cryptography in Libgcrypt supports , , and signing for and . is implemented with key sizes up to 8192 bits, suitable for both and signatures. (Digital Signature Algorithm) and ElGamal are provided for signing and , respectively, with standard parameter sets. (ECC) is extensively supported, including ECDSA () and (Edwards-curve DSA) for signatures, as well as ECDH for key agreement. Specific curves include NIST standards (P-192, P-224, P-256, P-384, P-521), Brainpool curves (P256r1, P384r1, P512r1), and ed25519 (per 7748 and 8032), and secp256k1 for broader compatibility.

Key Derivation

To derive keys from passphrases or other inputs, Libgcrypt includes robust key derivation functions (KDFs) resistant to brute-force attacks. (PKCS#5 v2.0) supports iterations and salting with underlying hashes like SHA-256. provides memory-hard derivation with parameters for cost (N), parallelization (p), and salt size. variants—Argon2i (data-independent), Argon2d (data-dependent), and Argon2id (hybrid)—offer advanced memory-hard protection, configurable with memory, time, and parallelism costs, as added in version 1.11.0. OpenPGP S2K modes (simple, salted, and iterated+salted) are also available for legacy compatibility.

Other Primitives

Beyond core algorithms, Libgcrypt incorporates a Multi-Precision Integer (MPI) library for , essential for public-key operations and . This enables efficient handling of large integers in cryptographic computations. Elliptic curve operations are integrated via the framework, leveraging the aforementioned curves for optimized performance in constrained environments.

Random Number Generation

Libgcrypt employs a multi-layered random number generation system designed to provide cryptographically secure randomness for various applications, including and creation. The library supports multiple (PRNG) types to balance security, performance, and compliance requirements. The standard DRNG, based on Peter Gutmann's continuous seeding PRNG using , serves as the default mechanism and is continuously reseeded with fresh to maintain unpredictability. For compliance, Libgcrypt implements a deterministic random number generator (DRNG) adhering to , utilizing in X9.31 mode, which undergoes power-up self-tests and restricts operations to approved algorithms. Additionally, a system-dependent secure random option wraps native operating system interfaces, such as /dev/urandom on systems, while a weak random variant is available for non-cryptographic purposes, often mapping to the strong random pool or using generation techniques to avoid depleting high-quality . Entropy collection in Libgcrypt draws from diverse sources to ensure a robust pool of unpredictable bits, mitigating risks from single-point failures. Primary sources include system calls like getrandom() or /dev/urandom on Unix systems, which provide -generated entropy based on events and interrupts. random number generators (RNGs), such as Intel's instruction on x86 processors or VIA engines, are integrated when available to inject high-entropy bits directly from physical noise sources like thermal variations. In modes, particularly on older Unix systems, entropy can be gathered via the Entropy Gathering Daemon (EGD) or Unix-specific collectors that poll process timings and system statistics, historically including inputs from devices like keyboards and mice for additional variability, though modern implementations prioritize more reliable and methods. These sources are modular, allowing to disable or prioritize certain collectors for environmental adaptability. Initialization of the subsystem occurs automatically upon library startup, but users can accelerate it using gcry_control(GCRYCTL_ENABLE_QUICK_RANDOM), which permits faster to the strong random pool by relaxing initial requirements, though this is disabled in FIPS mode to enforce strict . Automatic reseeding happens periodically through polling, ensuring the PRNG remains resistant to exhaustion or . In FIPS mode, the deterministic DRNG requires explicit functions and reseeds only after a fixed number of outputs (e.g., 1000 blocks), preventing reliance on continuous external while maintaining forward . To address security threats like prediction attacks, Libgcrypt implements periodic entropy polling from configured sources, continuously refreshing the internal pool to exceed the entropy needed for the requested security level and thwarting attempts to infer future outputs from observed ones. The FIPS-mode DRNG further enhances this by operating deterministically post-seed, avoiding vulnerabilities inherent in some continuous-seeding designs. is handled via the gcry_random_level_t , offering levels such as GCRY_WEAK_RANDOM for low-security needs (e.g., nonces), GCRY_STRONG_RANDOM (or normal) for general cryptographic use like session keys, GCRY_VERY_STRONG_RANDOM for high-stakes operations like long-term keys, and secure variants that allocate output in tamper-resistant memory to prevent side-channel leaks. These levels allow applications to tailor randomness quality without altering the underlying PRNG .

Architecture

Core Components

Libgcrypt's architecture centers on a core engine that handles algorithm dispatching and state management through dedicated subsystems for symmetric encryption, hashing, public-key operations, and more. This engine provides a unified for selecting and invoking , routing requests to the appropriate implementation based on the chosen and . Context handles, such as gcry_cipher_hd_t for symmetric ciphers and gcry_hash_hd_t for message digests, encapsulate the operational , including keys, initialization vectors, and partial computations, ensuring that operations like or hashing maintain continuity across multiple calls without global state pollution. These handles are created via functions like gcry_cipher_open or gcry_hash_open, used for data, and released with gcry_cipher_close or gcry_hash_close, forming an open-use-close paradigm that interconnects the subsystems efficiently. Error handling in Libgcrypt is tightly integrated with the libgpg-error library, which standardizes error codes across GnuPG components for consistent reporting. All library functions return gcry_error_t values, which combine an error source (e.g., GCRYERR_SOURCE) and a code (e.g., GPG_ERR_NO_ERROR for success or GPG_ERR_INV_VALUE for invalid arguments), allowing precise diagnosis without information loss during propagation from internal engines to the application. This integration ensures that errors from algorithm dispatching or context operations are uniformly managed, with aliases provided for libgpg-error functions to maintain namespace consistency within Libgcrypt. The library employs a reentrant design to support multi-threading, relying on user-registered callbacks to synchronize access across threads () or Pth. Thread safety is enabled by calling gcry_control(GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread) during initialization, which installs mutex operations like gcry_pthread_mutex_lock and gcry_pthread_mutex_unlock to protect shared resources such as pools and context handles. This callback mechanism allows the core engine to wrap blocking calls and coordinate with the application's threading model, ensuring that algorithm dispatching and state management remain safe in concurrent environments while avoiding inherent non-thread-safe operations like certain in-place modifications. Memory management emphasizes security through dedicated allocation functions that interconnect with the core engine and context handles. The gcry_malloc_secure function allocates memory from a protected pool designed for sensitive data, such as keys and intermediates, using constant-time wiping via gcry_free to mitigate timing attacks by preventing residual data leakage even if the operating system swaps or reuses pages. Standard allocations via gcry_malloc suffice for non-sensitive buffers, but secure memory integrates seamlessly with handles—e.g., cipher keys passed to gcry_cipher_setkey are copied into secure space if allocated accordingly—enhancing overall resistance to side-channel exploits during dispatching and processing. Applications can override these allocators via gcry_control for custom secure handling. Platform adaptations are facilitated by an Autoconf-based build system that detects and enables CPU-specific accelerations during configuration, optimizing the core engine's dispatching to features like AES-NI for faster symmetric operations. The ./configure script probes for instructions such as intel-aesni, arm-aes, or ppc-altivec, compiling assembly-optimized implementations accordingly and exposing them through runtime checks via gcry_control(GCRYCTL_GET_HWFEATURES). This ensures handles leverage native accelerations transparently, with options to disable features post-build (e.g., via /etc/gcrypt/hwf.deny) for compatibility or policies, interconnecting hardware awareness across error handling, threading, and memory subsystems without altering the .

Multi-Precision Arithmetic

Libgcrypt's multi-precision (MPI) library provides the foundational arithmetic capabilities required for asymmetric , enabling operations on arbitrarily large integers through the gcry_mpi_t . This type represents multi-precision integers as opaque handles, internally structured as arrays of limbs—machine-word-sized units, typically 32 bits on 32-bit systems or 64 bits on 64-bit architectures—to facilitate efficient storage and computation. The library supports integers of arbitrary size, constrained primarily by available . The MPI library offers a comprehensive set of operations, including basic arithmetic such as via gcry_mpi_add, which computes the of two MPIs and stores the result in a third; through gcry_mpi_mul; and subtraction with gcry_mpi_sub. For cryptographic needs, it includes with gcry_mpi_powm, essential for like and , where the result is reduced a specified base; and modular inverse computation using gcry_mpi_invm, which finds the under a . Primality testing is supported by gcry_prime_check, a probabilistic function using the Miller-Rabin that returns 0 if the MPI is likely prime and GPG_ERR_NO_PRIME otherwise. Allocation and deallocation are handled by gcry_mpi_new (or its secure-memory variant gcry_mpi_snew) for creating new MPIs with an optional initial bit length, and gcry_mpi_release for cleanup. The implementation consists of portable C code derived from an early version of the GNU Multi-Precision Library (GMP), extensively modified for security and reduced footprint, with assembler accelerations to enhance performance on specific architectures. For instance, benefits from optimized assembly for operations like Karatsuba multiplication, while processors utilize tailored code for Montgomery reduction, enabling faster critical for . These low-level optimizations are selectively enabled at runtime based on CPU detection, balancing portability with speed gains of up to several times over pure C implementations. Internally, the MPI library integrates seamlessly with higher-level cryptographic primitives, such as (ECC) point arithmetic—using structures like gcry_mpi_point_t built on MPIs for point addition and —and routines that rely on primality testing and modular operations to produce secure parameters. This backend ensures consistent, side-channel-resistant arithmetic across Libgcrypt's public-key algorithms.

Usage

Initialization and Configuration

To use Libgcrypt in an application, the library must first be loaded and initialized by calling the function gcry_check_version, which verifies the library against a required minimum and performs initial subsystem setup, including for multi-threaded access. This function must be invoked as the first Libgcrypt operation, before any cryptographic functions, and it returns a string with the actual (e.g., "1.10.2") or NULL if the is incompatible. For example, the following code checks for a minimum :
c
#include <gcrypt.h>

if (!gcry_check_version (GCRYPT_VERSION)) {
  fputs ("libgcrypt is too old (need " GCRYPT_VERSION ")\n", stderr);
  exit (2);
}
Failure to call this function early can lead to , such as warnings about missing initialization in logs. of Libgcrypt occurs primarily through the gcry_control , which allows fine-tuning of library behavior before full operational use. To enable FIPS 140-2 mode, which restricts the library to approved algorithms and enforces stricter security checks, invoke gcry_control(GCRYCTL_FORCE_FIPS_MODE, 1) prior to gcry_check_version; this mode can also be triggered via the environment variable LIBGCRYPT_FORCE_FIPS_MODE=1 or system files like /etc/gcrypt/fips_enabled. For multi-threaded applications, is handled automatically since version 1.6, but older setups may require gcry_control(GCRYCTL_SET_THREAD_CBS, &callbacks) to register custom thread callbacks, though this is now obsolete. Hardware acceleration features, such as or VIA , can be disabled with gcry_control(GCRYCTL_DISABLE_HWF, "feature_name", NULL) before initialization to ensure portability or compliance; these features are detected via system interfaces like /proc/cpuinfo on . After , signal the end of setup with gcry_control(GCRYCTL_INITIALIZATION_FINISHED, 0) to notify the that no further changes are expected. Error handling during initialization involves checking return values from these functions, which are of type gcry_error_t; a value of GPG_ERR_NO_ERROR (0) indicates success, while GPG_ERR_GENERAL (1) or other codes like GPG_ERR_ENOMEM signal failures such as version mismatches or memory allocation issues. Applications should use gcry_strerror(err) to obtain human-readable descriptions for logging or user feedback. Secure memory, used for sensitive data like keys, must be allocated early via gcry_control(GCRYCTL_INIT_SECMEM, size, 0) (e.g., 16384 bytes), potentially requiring elevated privileges on some systems, and can be disabled with GCRYCTL_DISABLE_SECMEM if not needed. For long-running applications, resource cleanup is recommended at shutdown by calling gcry_control(GCRYCTL_TERM_SECMEM, 0) to zeroize and release secure memory, ensuring sensitive data is securely wiped; this operation is safe in signal handlers or exit routines but not thread-safe. Environment variables like GCRY_DEBUG can enable debug output during setup for troubleshooting, while HOME influences default paths for configuration files such as /etc/gcrypt/. To promote locale-independent behavior, especially for error messages and string handling, applications should set LC_ALL=C before loading the library.

Programming Interfaces

Libgcrypt provides a C-based for cryptographic operations, designed for ease of use while maintaining security through secure memory allocation and error reporting. The follows a handle-based model where contexts are created for specific operations, configured, used, and then closed to ensure proper and data wiping. This assumes that the library has been initialized via functions like gcry_check_version and gcry_control, as detailed in prior configuration steps.

Cipher API

The symmetric cipher API enables encryption and decryption using block and stream ciphers such as . To perform operations, a handle is first allocated with gcry_cipher_open, which takes the algorithm ID (e.g., GCRY_CIPHER_AES), mode (e.g., GCRY_CIPHER_MODE_CBC), and flags (e.g., GCRY_CIPHER_SECURE for secure ). The function returns a gcry_error_t; success yields 0 and populates the handle pointer, while errors include invalid algorithm (GPG_ERR_INV_ALGO) or memory failure. Next, gcry_cipher_setkey configures the by providing the handle, a buffer, and its in bytes; it returns an if the mismatches the algorithm's requirements, such as 128–256 bits for . For modes requiring an (IV), gcry_cipher_setiv sets it similarly, ensuring the matches the block size (e.g., 16 bytes for ). Encryption proceeds with gcry_cipher_encrypt, which processes input into an output (or in-place if output is null), requiring input to be multiples of the block size in certain modes; it returns 0 on success or errors like buffer overlap (GPG_ERR_INV_ARG). Decryption uses gcry_cipher_decrypt analogously. Finally, gcry_cipher_close releases the , zeroizing sensitive without return value. A basic AES-256-CBC pseudocode snippet illustrates the flow:
gcry_cipher_hd_t hd;
gcry_error_t err = gcry_cipher_open(&hd, GCRY_CIPHER_AES256, GCRY_CIPHER_MODE_CBC, 0);
if (err) { /* [handle](/page/Handle) error */ }
err = gcry_cipher_setkey(hd, key, 32);
err = gcry_cipher_setiv(hd, iv, 16);
err = gcry_cipher_encrypt(hd, outbuf, outlen, inbuf, inlen);
gcry_cipher_close(hd);

API

Hashing operations compute message digests using like SHA-256 via a multi-step process. gcry_md_open creates a for the specified ID (e.g., GCRY_MD_SHA256) and flags, returning an error for unsupported or allocation issues; it allows multiple in one via subsequent gcry_md_enable calls. Data is fed incrementally with gcry_md_write, which appends a of given length to the digest without value, supporting efficient streaming for large inputs. To retrieve the digest, gcry_md_read extracts the result for a specific (or the primary if unspecified), returning a pointer to the fixed-size output (e.g., 32 bytes for SHA-256) valid until the handle changes; it returns if the algorithm was not enabled. The handle is freed with gcry_md_close, which zeroizes internals and ignores null inputs. This API also supports by setting the GCRY_MD_FLAG_HMAC flag and a key via gcry_md_setkey.

Public-Key API

Public-key cryptography in Libgcrypt uses S-expressions (gcry_sexp_t) to represent keys, data, and parameters, providing a structured, human-readable format for asymmetric operations like RSA. Key generation occurs with gcry_pk_genkey, which takes a parameter S-expression (e.g., (genkey (rsa (nbits 2048)))) and outputs the keypair S-expression; it returns 0 on success or errors for invalid parameters or insufficient randomness. Encryption employs gcry_pk_encrypt, passing data as an S-expression (e.g., (data (flags pkcs1)(value %m))), the public key S-expression, and receiving the ciphertext S-expression; errors include invalid key format (GPG_ERR_INV_OBJ). Decryption mirrors this with gcry_pk_decrypt using the private key, yielding the plaintext S-expression. These functions ensure padding schemes like PKCS#1 are applied correctly. A simple RSA signing pseudocode (using gcry_pk_sign analogously to encrypt) might look like:
gcry_sexp_t keypair, data_sexp, sig_sexp;
gcry_pk_genkey(&keypair, parm_sexp);  // parm_sexp defines [RSA](/page/RSA) params
gcry_sexp_build(&data_sexp, NULL, "(data (flags raw)(value %s))", hash_data);
gcry_pk_sign(&sig_sexp, data_sexp, keypair);  // Uses private [key](/page/Key) component
gcry_sexp_release(keypair); gcry_sexp_release(data_sexp); gcry_sexp_release(sig_sexp);

MAC and KDF

Message authentication codes (MACs) such as and CMAC are handled through a dedicated . gcry_mac_open allocates a handle for an algorithm ID (e.g., GCRY_MAC_HMAC_SHA256 or GCRY_MAC_CMAC_AES), with flags for secure , returning an for unsupported algorithms; the is set via gcry_mac_setkey with no length restrictions for but block-cipher aligned for CMAC. Data is processed with gcry_mac_write (similar to hashing), and the tag retrieved via gcry_mac_read; the handle closes with gcry_mac_close. For key derivation, gcry_pbkdf2 (via the general gcry_kdf_derive with GCRY_KDF_PBKDF2) derives keys from s, taking the , sub-algorithm (e.g., SHA-256), , count, and desired key size, outputting to a buffer; it enforces high s (e.g., 100,000+) for resistance to brute-force attacks and returns errors for invalid parameters like zero s.

Error Handling

All API functions return a gcry_error_t, a composite of source and code, checked via macros like gcry_err_code(err) for values such as GPG_ERR_NO_ERROR (0) or GPG_ERR_INV_VALUE for out-of-range parameters (e.g., invalid key lengths). Common issues include GPG_ERR_INV_ARG for buffer overlaps or GPG_ERR_INV_OPHR for unsupported operations on handles; descriptive strings are obtainable via gcry_strerror. Developers must verify returns immediately to prevent , with the library using libgpg-error for standardized codes across GnuPG components.

Security Considerations

Known Vulnerabilities

Libgcrypt has experienced several notable security vulnerabilities, primarily involving side-channel attacks, overflows, and implementation flaws in . A heap overflow vulnerability was discovered in 2021, stemming from an incorrect assumption in the block management code during decryption operations, which could lead to . This issue, designated CVE-2021-3345, affected Libgcrypt version 1.9.0 and was fixed in version 1.9.1. In 2019, the C implementation of in Libgcrypt was found vulnerable to a flush-and-reload , as physical addresses were accessible to other processes, potentially leaking the cipher key. Known as CVE-2019-12904, this flaw impacted versions up to 1.8.4, with assembler implementations unaffected. A cache-timing on key operations was identified in 2017, enabling recovery of 1024-bit private keys through monitoring of cache behavior during left-to-right . This vulnerability, CVE-2017-7526, was mitigated in Libgcrypt 1.7.8 by adopting a right-to-left sliding-window method. In 2024, a timing-based side-channel in the implementation was discovered, allowing a Bleichenbacher-style to recover from PKCS#1 v1.5 encrypted ciphertexts. Designated CVE-2024-2236, this affects Libgcrypt versions before 1.10.2, 1.9.1, and 1.8.8, and was fixed in those releases. These vulnerabilities were most exploitable in remote scenarios within GnuPG-based applications, such as , though no widespread breaches have been reported; they nonetheless triggered prompt security patches. Vulnerability disclosures for Libgcrypt are coordinated through the GnuPG project, with fixes developed upstream and backported to branches for broader compatibility.

Audits and Best Practices

Libgcrypt has been subject to ongoing security reviews through integration with automated testing frameworks and formal validation processes. In 2019, the library was integrated into Google's OSS-Fuzz project, enabling continuous to identify potential vulnerabilities in its and interfaces. This integration supports for algorithms, helping to detect implementation flaws early in development. Community-driven audits and code reviews continue via the project's repository, where contributors submit patches and security analyses. The library achieves partial compliance with standards in versions 1.4 and later, with validated configurations listed in the NIST Cryptographic Module Validation Program (CMVP) database, such as certificate #2657 for version 1.6.3. These validations cover core cryptographic functions but do not constitute full module certification, allowing Libgcrypt to be used within FIPS-certified systems like those in . More recent versions support mode, enforcing NIST-approved algorithms and self-tests, though enabling this mode does not automatically confer approval as a standalone module. Users should verify current certification status via the NIST database before deployment in regulated environments. To maximize security, enable FIPS mode explicitly for compliance-sensitive applications using runtime controls like GCRYCTL_FORCE_FIPS_MODE or environment variables such as LIBGCRYPT_FORCE_FIPS_MODE; this restricts operations to approved algorithms and requires successful self-tests on initialization. Avoid deprecated or weak algorithms, such as for hashing and for symmetric encryption, opting instead for stronger alternatives like SHA-256 and to prevent known cryptographic weaknesses. Implementations in Libgcrypt incorporate constant-time operations where possible, particularly for decryption and primitives, to resist timing-based side-channel attacks—developers should verify and enable these modes via flags. Always validate inputs to cryptographic functions, such as key sizes and parameters, to mitigate oracle attacks and invalid data exploitation. For production deployments, update to the latest version in the 1.8 series, which includes security enhancements and bug fixes; the 1.7 series reached end-of-life in 2019. When building higher-level protocols, integrate Libgcrypt with libraries like for TLS/SSL handling, ensuring consistent cryptographic backends across components. In virtualized environments, explicitly test random number generator (RNG) entropy sources, as VMs may exhibit reduced hardware randomness—use gcry_random_bytes_secure and monitor pool quality with tools like rngd to maintain sufficient for key generation. Regularly monitor GnuPG project announcements for patches addressing newly discovered issues in Libgcrypt.

Licensing and Distribution

License Terms

Libgcrypt, the core cryptographic library, is released under the GNU Lesser General Public License version 2.1 or later (LGPLv2.1+), a permissive that explicitly allows developers to link the library into proprietary or closed-source applications without obligating the release of the application's , provided the library itself remains dynamically linked. This licensing choice facilitates broad integration into diverse software ecosystems, including commercial products, while ensuring the library's remains freely available for modification and redistribution. In contrast, the accompanying helper programs—such as tools for testing and configuration—and the associated documentation are distributed under the stricter version 2 or later (GPLv2+), which imposes requirements on any derivative works, mandating the distribution of for modifications. Key implications of the LGPLv2.1+ for users include the rights to freely redistribute the unmodified library, modify it for personal or internal use, and incorporate it into commercial offerings; however, if the library is modified and redistributed (e.g., as part of a larger software package), the modified must be made available under the same license, typically via a mechanism that allows relinking with the original or updated library. Dynamic linking preserves proprietary integrity by avoiding the need to disclose application source, whereas static linking would trigger full GPL-like obligations. As with all software, no is provided, and users assume all risk of use. This dual-licensing approach, with LGPL for the library to avoid stronger copyleft restrictions, was adopted to mirror the model of the GnuPG project—from which Libgcrypt's codebase was originally derived—while promoting wider adoption by enabling reuse in non-free software without compromising the GNU project's free software principles.

Availability and Ports

Libgcrypt source distributions are available from the official GnuPG FTP archive at gnupg.org/ftp/gcrypt/libgcrypt/, with the current stable release being version 1.11.2, issued on August 4, 2025, as the tarball libgcrypt-1.11.2.tar.bz2. Each release includes a corresponding .sig file containing a GnuPG signature, enabling users to verify the integrity and authenticity of the download using public keys from the GnuPG project. The library is widely packaged for major distributions, including Debian's libgcrypt20-dev for development files, Fedora's libgcrypt-devel package, and Linux's libgcrypt-dev, all providing version 1.11.2 in their repositories by late 2025. Libgcrypt compiles natively on and BSD platforms and supports cross-compilation for other environments, such as Windows via the MSYS2 toolchain, using the Native Development Kit (NDK), embedded systems including , and macOS through Homebrew; iOS builds are feasible via similar cross-compilation methods adapted from macOS toolchains. Developers can access the source code via the official repository at dev.gnupg.org/libgcrypt.git, with a web available for browsing, and report issues through the project's bug tracker hosted at dev.gnupg.org. Historically, Libgcrypt distributions have been hosted on GnuPG-specific mirrors rather than standard archives, a practice stemming from former U.S. export controls on cryptographic software, which were lifted in 2000.

References

  1. [1]
    Libgcrypt - GnuPG
    Feb 10, 2025 · Libgcrypt is a general-purpose cryptographic library providing functions for symmetric ciphers, hash algorithms, MACs, and public key ...
  2. [2]
    Libraries - GnuPG
    Mar 22, 2017 · Libgcrypt is a general purpose cryptographic library based on the code from GnuPG. It provides functions for all cryptographic building blocks: ...
  3. [3]
    Error Handling (The Libgcrypt Reference Manual) - GnuPG
    Libgcrypt uses the libgpg-error library. This allows to share the error codes with other components of the GnuPG system, and to pass error values transparently ...
  4. [4]
    [PDF] The Libgcrypt Reference Manual - GnuPG
    Apr 6, 2023 · Even with binary compatibility, new features may have been introduced, but due to problem with the dynamic linker an old version may actually be.
  5. [5]
    [gnutls-help] hashing in older versions
    ... primitives, so libgcrypt is another option. If you don't want to add new dependencies to a project that already relies on GnuTLS, you should probably choose ...
  6. [6]
    libgcrypt: Implement constant-time RSA decryption (Marvin attack fix)
    May 28, 2024 · The current MPI code is not constant time, potentially leaking plaintext when the attacker can observe enough decipher operations using RSA
  7. [7]
    T3269 (Constant-time) modular reduction - GnuPG
    In libgcrypt 1.7.8, for modular exponentiation, it simply uses _gcry_mpih_divrem. We can use Barret or Montgomery modular reduction here.
  8. [8]
    [Announce] Libgcrypt 1.11.0 released
    Jun 19, 2024 · We are pleased to announce the availability of Libgcrypt version 1.11.0. This release starts a new stable branch of Libgcrypt with full API and ABI ...
  9. [9]
    CSPRNG Description (The Libgcrypt Reference Manual) - GnuPG
    An entropy estimation is used to mix in enough data from the gather modules before returning the actual random output. Process fork detection and protection is ...
  10. [10]
    Random-Number Subsystem Architecture (The Libgcrypt ... - GnuPG
    All generators make use of so-called entropy gathering modules: rndgetentropy. Uses the operating system provided getentropy function. rndoldlinux. Uses the ...
  11. [11]
    Libgcrypt-1.2.0 released - GNU mailing lists
    We are pleased to announce the availability of Libgcrypt 1.2.0, which is the first stable release of this general purpose crypto library ...
  12. [12]
    Libgcrypt - Wikidata
    quotation. First release of Libgcrypt which is a result of splitting GnuPG into libgcrypt and GnuPG (English). retrieved. 19 June 2024. 1.11.2. publication date.
  13. [13]
    Libgcrypt 1.1.3 released - GnuPG and GNUTLS Mailing List Archives
    Jul 14, 2017 · > a first stand-alone version of Libgcrypt has been released. This is > version 1.1.3 and should be considered as Alpha quality. We have to > use this quite ...libgcrypt 1.1.5 released[git] GCRYPT - branch, master, updated. libgcrypt-1.7.3-106-g27148e6More results from lists.gnupg.org
  14. [14]
  15. [15]
    All News - GnuPG
    We are pleased to announce the availability of Libgcrypt version 1.7.6. This is a maintenance release for the stable version of Libgcrypt with a few bug fixes.
  16. [16]
    ftp.gnupg.org:gcrypt/libgcrypt/
    ftp.gnupg.org:gcrypt/libgcrypt/ ... This is the stable version of Libgcrypt. For devlopment versions see ../alpha/libgcrypt/. Parent ...
  17. [17]
    [Announce] Libgcrypt-1.2.0 released
    Apr 16, 2004 · We are pleased to announce the availability of Libgcrypt 1.2.0, which is the first stable release of this general purpose crypto library based on GnuPG code.
  18. [18]
    [Announce] Libgcrypt 1.4.0 (stable) released
    We are pleased to announce the availability of Libgcrypt 1.4.0. This is the new stable version of Libgcrypt and upward compatible with the 1.2 series.
  19. [19]
    Enabling FIPS mode - The Libgcrypt Reference Manual - GnuPG
    Libgcrypt may be used in a FIPS 140-2 mode. Note, that this does not necessary mean that Libcgrypt is an appoved FIPS 140-2 module.
  20. [20]
    [Announce] Libgcrypt 1.5.0 released
    [Announce] Libgcrypt 1.5.0 released. Werner Koch wk at gnupg.org. Wed Jun 29 12:18:34 CEST 2011. Messages sorted by: [ date ] [ thread ] ...
  21. [21]
    [Announce] Libgcrypt 1.6.0 released
    Dec 16, 2013 · [Announce] Libgcrypt 1.6.0 released. Werner Koch wk at gnupg.org. Mon Dec 16 18:49:01 CET 2013. Previous message: [Announce] Details on the ...
  22. [22]
    [Announce] Libgcrypt 1.7.0 released
    Apr 15, 2016 · This is a new stable version of Libgcrypt with full API and ABI compatibiliy to the 1.6 series. Its main features are new algorithms, curves, and performance ...
  23. [23]
    [Announce] Libgcrypt 1.8.0 released
    Jul 18, 2017 · ... libgpg-error is now used to wrap the blocking read of /dev/random. This allows other nPth threads to run while Libgcrypt is gathering entropy ...
  24. [24]
    [Announce] Libgcrypt 1.9.0 relased
    Jan 19, 2021 · We are pleased to announce the availability of Libgcrypt version 1.9.0. This release starts a new stable branch of Libgcrypt with full API and ABI ...
  25. [25]
    [Announce] [Security fix] Libgcrypt 1.9.1 relased
    Jan 29, 2021 · ... released version is affected: - Libgcrypt 1.9.0 (released 2021-01-19) All other versions are not affected. On 2021-01-28 Tavis Ormandy ...
  26. [26]
    [Announce] Libgcrypt 1.10.1 released
    Mar 28, 2022 · ... release starts a new stable branch of Libgcrypt with full API and ABI compatibility to the 1.9 series ... Libgcrypt 1.10.0 and 1.10.1 ...<|separator|>
  27. [27]
    Libgcrypt 1.10.1 released - GNU mailing lists
    Mar 28, 2022 · Libgcrypt 1.10.1 released ; From: Werner Koch ; Subject: Libgcrypt 1.10.1 released ; Date: Mon, 28 Mar 2022 16:40:13 +0200 ; User-agent: Gnus/5.13 ( ...Libgcrypt 1.3.0 (development) releasedLibgcrypt 1.7.0 releasedMore results from lists.gnu.org
  28. [28]
  29. [29]
    Available ciphers (The Libgcrypt Reference Manual) - GnuPG
    CAST128-5 block cipher algorithm. The key size is 128 bits. GCRY_CIPHER_BLOWFISH. The blowfish algorithm. The supported key sizes are 8 to 576 bits in 8 bit ...
  30. [30]
    Available cipher modes (The Libgcrypt Reference Manual) - GnuPG
    Cipher Block Chaining mode. Stream mode, only to be used with stream cipher algorithms. Output Feedback mode. Counter mode.
  31. [31]
    Available hash algorithms (The Libgcrypt Reference Manual) - GnuPG
    Available hash algorithms include SHA-1, SHA-224, SHA-256, SHA-512, SHA3-224, SHA3-256, SHA3-384, SHA3-512, SHAKE128, SHAKE256, and SHA3_512.
  32. [32]
    Available MAC algorithms (The Libgcrypt Reference Manual)
    ### Summary of Available MAC Algorithms in Libgcrypt
  33. [33]
    Available algorithms (The Libgcrypt Reference Manual) - GnuPG
    Libgcrypt supports the RSA (Rivest-Shamir-Adleman) algorithms as well as DSA (Digital Signature Algorithm), Elgamal, ECDSA, ECDH, and EdDSA.
  34. [34]
    ECC - GnuPG wiki
    "Elliptic curve cryptography (ECC) is an approach to public-key cryptography based on the algebraic structure of elliptic curves over finite fields. One of the ...
  35. [35]
    Key Derivation (The Libgcrypt Reference Manual) - GnuPG
    Libgcypt provides a general purpose function to derive keys from strings. Derive a key from a passphrase. keysize gives the requested size of the key in octets.
  36. [36]
    index
    - **Origins**: Libgcrypt originated from code in GnuPG.
  37. [37]
    [PDF] The Libgcrypt Reference Manual - GnuPG
    Apr 6, 2023 · This manual is for Libgcrypt version 1.10.2 and was last updated 6 April 2023. Libgcrypt is GNU's library of cryptographic building blocks.
  38. [38]
    Architecture (The Libgcrypt Reference Manual)
    ### Summary of Libgcrypt Architecture
  39. [39]
    Multi-Threading - The Libgcrypt Reference Manual - GnuPG
    2.5 Multi-Threading. As mentioned earlier, the Libgcrypt library is thread-safe if you adhere to the following requirements: If your application is multi- ...
  40. [40]
    Memory allocation (The Libgcrypt Reference Manual) - GnuPG
    Like gcry_malloc , but uses secure memory. Function: void * gcry_calloc (size_t n , size_t m ). This function allocates a cleared block of memory ...
  41. [41]
    Hardware features (The Libgcrypt Reference Manual) - GnuPG
    To disable a feature for all processes using Libgcrypt 1.6 or newer, create the file /etc/gcrypt/hwf.deny and put each feature not to be used on a single line.
  42. [42]
    MPI library (The Libgcrypt Reference Manual) - GnuPG
    In the context of Libgcrypt and in most other applications, these large numbers are called MPIs (multi-precision-integers).
  43. [43]
    Prime numbers (The Libgcrypt Reference Manual)
    **Summary of Primality Testing Functions in Libgcrypt MPI:**
  44. [44]
    Top (The Libgcrypt Reference Manual) - GnuPG
    This manual is for Libgcrypt version 1.10.2 and was last updated 6 April 2023. Libgcrypt is GNU's library of cryptographic building blocks.
  45. [45]
    Working with cipher handles (The Libgcrypt Reference Manual)
    To use a cipher algorithm, you must first allocate an according handle. This is to be done using the open function.
  46. [46]
    Working with hash algorithms (The Libgcrypt Reference Manual)
    For a list of supported algorithms, see Available hash algorithms. The flags allowed for mode are: GCRY_MD_FLAG_SECURE. Allocate all buffers and the ...
  47. [47]
    Public Key cryptography (The Libgcrypt Reference Manual)
    - **Public Key Cryptography Overview**:
  48. [48]
    Working with MAC algorithms (The Libgcrypt Reference Manual)
    ### Summary of `gcry_mac_open` and Related Functions for HMAC/CMAC
  49. [49]
    Error Codes (The Libgcrypt Reference Manual) - GnuPG
    The library libgpg-error defines many error values. The following list includes the most important error codes.
  50. [50]
    CVE-2021-3345 Detail - NVD
    Jan 29, 2021 · c in Libgcrypt version 1.9.0 has a heap-based buffer overflow when the digest final function sets a large count value. It is recommended to ...Missing: 33487 | Show results with:33487
  51. [51]
    CVE-2019-12904 Detail - NVD
    Jun 19, 2019 · In Libgcrypt 1.8.4, the C implementation of AES is vulnerable to a flush-and-reload side-channel attack because physical addresses are available to other ...
  52. [52]
    CVE-2019-12904 - Red Hat Customer Portal
    [Disputed] A vulnerability has been identified in Libgcrypt due to a flaw in its C implementation of AES. This vulnerability enables a remote attacker to ...
  53. [53]
    Libgcrypt 1.8.0 released - GNU mailing lists
    Jul 18, 2017 · The GnuPG Project is pleased to announce the availability of Libgcrypt version 1.8.0. This is a new stable version of Libgcrypt with full ...Libgcrypt 1.8.5 releasedLibgcrypt 1.8.1 and 1.7.9 to fix CVE-2017-0379More results from lists.gnu.org
  54. [54]
    [PDF] The Million-Key Question—Investigating the Origins of RSA Public ...
    Aug 10, 2016 · A prime p is strong if both p−1 and p+1 have a large prime factor (used by libgcrypt 1.65 in ... bias observed in the raw random data. 6.1 ...
  55. [55]
    Security researchers Crack 1024-bit RSA Encryption in GnuPG Library
    Jul 4, 2017 · Experts have devised a side-channel attack on RSA secret keys that allowed to crack 1024-bit RSA Encryption in GnuPG Crypto Library.
  56. [56]
    libgcrypt integration into OSS-Fuzz differential cryptography fuzzer
    libgcrypt integration into OSS-Fuzz differential cryptography fuzzer. Guido Vranken guidovranken at gmail.com. Wed May 8 21:58:49 CEST 2019.
  57. [57]
    Cryptographic Module Validation Program | CSRC
    The libgcrypt FIPS Runtime Module is a general purpose cryptographic library designed to provide FIPS 140-2 validated cryptographic functionality for use ...
  58. [58]
    1.119. libgcrypt | 5.4 Technical Notes | Red Hat Enterprise Linux | 5
    Note: libgcrypt 1.4.4 is currently undergoing FIPS-140-2 validation. FIPS mode is disabled by default, however, to ensure the libgcrypt library maintains ...
  59. [59]
    [PDF] 20.04 Libgcrypt Cryptographic Module Software Version 3.0 and 3.1 ...
    Aug 26, 2021 · o use of AES-NI instructions for AES implementations; o use of AVX, SSSE3, SHLD and strict assembler instructions for SHA implementations ...
  60. [60]
    Cryptographic Backend (GnuTLS 3.8.10)
    Older versions of GnuTLS used to support libgcrypt, but it was switched with nettle mainly for performance reasons and secondary because it is a simpler library ...Missing: integration | Show results with:integration
  61. [61]
    Understanding the Red Hat Enterprise Linux random number ...
    Jan 30, 2019 · Systemd, optionally, loads kernel modules which will improve the kernel's entropy gathering process on a virtual machine (e.g., virtio-rng).
  62. [62]
    Release Notes - GnuPG
    This is an update of the old stable branch.. Announcement. GnuPG stable 1.4.0 (2004-12-16). This is the first relese of the new stable branch of GnuPG.<|separator|>
  63. [63]
    gpg/libgcrypt: The GNU crypto library. NOTE: Maintainers ... - GitHub
    Overview -------- Libgcrypt is a general purpose crypto library based on the code used in GnuPG. Libgcrypt depends on the library `libgpg-error', which must be ...
  64. [64]
    Integrity Check - GnuPG
    Jun 5, 2025 · You can check that the version of GnuPG that you want to install is original and unmodified by either verifying the file's signature or comparing the checksum.
  65. [65]
    Debian -- Package Search Results -- libgcrypt
    You have searched for source packages that names contain libgcrypt in all suites, all sections, and all architectures. Found 1 matching packages.
  66. [66]
    libgcrypt - Alpine Linux packages
    Aug 5, 2025 · Package, libgcrypt. Version, 1.11.2-r0. Description, General purpose crypto library based on the code used in GnuPG.
  67. [67]
    mingw-w64-x86_64-libgcrypt - MSYS2 Packages
    Aug 17, 2025 · Base Package: mingw-w64-libgcrypt. Description: General purpose cryptographic library based on the code from GnuPG (mingw-w64) ...
  68. [68]
    Compiling libgcrypt and libgpgerror for Android with Cmake
    Aug 23, 2017 · I had to choose a different library. My choice was libgcrypt. Now I struggle to compile libgpgerr for android. (iOS is working fine)Openssl Build Issue with Android NDK r8 - c++ - Stack OverflowHow to build OpenSSL to generate libcrypto.a with Android NDK ...More results from stackoverflow.com
  69. [69]
    libgcrypt - Homebrew Formulae
    Formula code: libgcrypt.rb on GitHub. Bottle (binary package) installation support provided for: macOS on. Apple Silicon, tahoe, ✓. sequoia, ✓. sonoma, ✓.Missing: iOS | Show results with:iOS
  70. [70]
    Login
    ### Summary