# Install libgcrypt with Homebrew, apk, dnf, MacPorts, Nix, pacman, zypper

Cryptographic library based on the code from GnuPG. Version 1.12.2 via Homebrew; verified 2026-06-22.

## Install

```sh
sudo av install brew:libgcrypt
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install libgcrypt
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install libgcrypt
```

  Evidence: MacPorts ports tree: devel/libgcrypt/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add libgcrypt
```

  Evidence: Alpine Linux edge package indexes: libgcrypt from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz

- dnf (92%):

```sh
sudo dnf install libgcrypt
```

  Evidence: Fedora Rawhide package metadata: libgcrypt from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#libgcrypt
```

  Evidence: nixpkgs package indexes: pkgs/by-name/li/libgcrypt/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S libgcrypt
```

  Evidence: Arch Linux sync databases: libgcrypt from https://geo.mirror.pkgbuild.com/core/os/x86_64/core.db.tar.gz

- zypper (92%):

```sh
sudo zypper install libgcrypt-devel
```

  Evidence: openSUSE Tumbleweed package metadata: libgcrypt-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

## Package facts

- **Package key:** brew:libgcrypt
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/libgcrypt>
- **Version:** 1.12.2
- **Source summary:** Cryptographic library based on the code from GnuPG
- **Homepage:** <https://gnupg.org/related_software/libgcrypt/>
- **Repository:** <https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git>
- **Upstream docs:** <https://www.gnupg.org/documentation/manuals/gcrypt>
- **License:** LGPL-2.1-or-later AND GPL-2.0-or-later
- **Source archive:** <https://gnupg.org/ftp/gcrypt/libgcrypt/libgcrypt-1.12.2.tar.bz2>
- **Last updated:** 2026-06-22T14:05:17-07:00
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- dumpsexp (cli)
- hmac256 (cli)
- libgcrypt-config (cli)
- mpicalc (cli)
- dumpsexp (alias)
- hmac256 (alias)
- libgcrypt-config (alias)
- mpicalc (alias)

## Dependencies

- libgpg-error

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 1.12.2
- Package-manager updated: 2026-06-22
- Local data: ok
- Upstream repository: https://gnupg.org/related_software/libgcrypt/
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

Libgcrypt is the GnuPG project's standalone cryptographic building-block library, split out so applications could use GnuPG-derived primitives without embedding the OpenPGP implementation itself. It matters in package ecosystems because it is a low-level C library whose ABI promises, security releases, and CPU-specific optimizations ripple into many security-sensitive applications.

### Project history

The GnuPG project describes Libgcrypt as a general-purpose cryptographic library originally based on GnuPG code. GnuPG news and release material show the library becoming a separately versioned component by the early 2000s, with a 2003 alpha-series announcement for Libgcrypt 1.1.42 and later 1.2.x, 1.4.x, 1.5.x, 1.7.x, 1.8.x, 1.10.x, and 1.12.x release lines.

Its scope grew from the cryptographic code needed by GnuPG into a broad primitive library covering symmetric ciphers, hashes, MACs, public-key algorithms, multi-precision integers, random-number generation, S-expressions, FIPS-related behavior, and helper tools. The project page also records a packaging-relevant compatibility policy: Libgcrypt versions since 1.2 keep API and ABI compatibility.

### Adoption history

Libgcrypt's adoption follows GnuPG's split-library architecture: GnuPG and related projects can share a maintained cryptographic core while packagers ship it as an independent system library. Homebrew, Linux distributions, Nix, MacPorts, and other package managers expose it as a separate package because many consumers need the library without installing or rebuilding the whole GnuPG stack.

The GnuPG release stream treats Libgcrypt security updates as first-class events. Multiple GnuPG news entries call out Libgcrypt releases for side-channel fixes, stable-branch compatibility, new algorithms, and random-number-generator work, which is why downstream maintainers track it closely.

### How it is used

Developers link against Libgcrypt when they need a C API for cryptographic primitives, MPI arithmetic, random bytes, or S-expression-based public-key operations. The command-line helpers packaged with it, such as hmac256 and mpicalc, are secondary to the library but useful for testing and small operational tasks.

The library intentionally does not provide a complete OpenPGP protocol implementation; it supplies lower-level cryptographic operations. That boundary is important for users choosing between Libgcrypt, GPGME, and the GnuPG command-line tools.

### Why package nerds care

For package maintainers, Libgcrypt is a classic shared-library dependency: small on the surface, but security-critical, ABI-sensitive, and tied to CPU feature detection, FIPS behavior, and distribution hardening policies. Its separate release branches let downstreams apply fixes without forcing an application-level GnuPG upgrade.

Its long API/ABI compatibility promise since 1.2 is unusually package-friendly for a cryptographic C library and helps explain why it appears broadly across Unix-like package sets.

### Timeline

- 2003: Libgcrypt 1.1.42 announced as a general-purpose cryptography library based on GnuPG code.
- 2005: Libgcrypt 1.2.1 announced in the GnuPG news stream.
- 2007: Libgcrypt 1.4.0 announced as a stable branch compatible with the 1.2 series.
- 2011: Libgcrypt 1.5.0 announced as a stable branch compatible with the 1.4 series.
- 2016: Libgcrypt 1.7.0 announced with new algorithms, curves, and performance work.
- 2017: Libgcrypt 1.8.0 announced with Blake2 support, XTS mode, random-number-generator work, and ARM performance improvements.
- 2022: Libgcrypt 1.10.1 announced as a stable branch with API and ABI compatibility to the 1.9 series.
- 2026: Libgcrypt 1.12.2, 1.11.3, and 1.10.4 announced for security advisory T8211.

### Related projects

- GnuPG is the parent ecosystem and original source of the code lineage. GPGME sits at a higher level for applications that want GnuPG integration rather than raw cryptographic primitives. Libgpg-error is commonly paired with GnuPG libraries for shared error handling.

### Sources

- <https://formulae.brew.sh/formula/libgcrypt>
- <https://lists.gnupg.org/pipermail/gnupg-announce/2003q3/000155.html>
- <https://lists.gnupg.org/pipermail/gnupg-announce/2022q1/000471.html>
- <https://www.gnupg.org/documentation/manuals/gcrypt/>
- <https://www.gnupg.org/news.html>
- <https://www.gnupg.org/software/libgcrypt/index.html>


## Security Notes

No matching local secret-handling manifest was found for libgcrypt. Nucleus package metadata is still published here so future coverage has a stable package URL.


## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** libgcrypt
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## Other Package-Manager Records

- Nix - libgcrypt: normalized package name match | nixpkgs package indexes: pkgs/by-name/li/libgcrypt/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - libgcrypt - 1.12.2-r0: normalized package name match | Alpine Linux edge package indexes: libgcrypt from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | General purpose crypto library based on the code used in GnuPG | https://www.gnupg.org/
- apk - libgcrypt-dev - 1.12.2-r0: normalized package name match | Alpine Linux edge package indexes: libgcrypt-dev from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | General purpose crypto library based on the code used in GnuPG (development files) | https://www.gnupg.org/
- apk - libgcrypt-doc - 1.12.2-r0: normalized package name match | Alpine Linux edge package indexes: libgcrypt-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | General purpose crypto library based on the code used in GnuPG (documentation) | https://www.gnupg.org/
- apk - libgcrypt-static - 1.12.2-r0: normalized package name match | Alpine Linux edge package indexes: libgcrypt-static from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | General purpose crypto library based on the code used in GnuPG (static library) | https://www.gnupg.org/
- dnf - libgcrypt - 1.12.2-1.fc45: normalized package name match | Fedora Rawhide package metadata: libgcrypt from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | A general-purpose cryptography library | https://www.gnupg.org/
- dnf - libgcrypt-devel - 1.12.2-1.fc45: normalized package name match | Fedora Rawhide package metadata: libgcrypt-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Development files for the libgcrypt package | https://www.gnupg.org/
- pacman - libgcrypt - 1.12.2-1: normalized package name match | Arch Linux sync databases: libgcrypt from https://geo.mirror.pkgbuild.com/core/os/x86_64/core.db.tar.gz | General purpose cryptographic library based on the code from GnuPG | https://www.gnupg.org
- zypper - libgcrypt-devel - 1.12.2-1.2: normalized package name match | openSUSE Tumbleweed package metadata: libgcrypt-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | The GNU Crypto Library | https://gnupg.org/software/libgcrypt
- zypper - libgcrypt-devel-32bit - 1.12.2-1.2: normalized package name match | openSUSE Tumbleweed package metadata: libgcrypt-devel-32bit from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | The GNU Crypto Library | https://gnupg.org/software/libgcrypt
- zypper - libgcrypt-devel-x86-64-v3 - 1.12.2-1.2: normalized package name match | openSUSE Tumbleweed package metadata: libgcrypt-devel-x86-64-v3 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | The GNU Crypto Library | https://gnupg.org/software/libgcrypt
- zypper - libgcrypt20 - 1.12.2-1.2: normalized package name match | openSUSE Tumbleweed package metadata: libgcrypt20 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | The GNU Crypto Library | https://gnupg.org/software/libgcrypt
- zypper - libgcrypt20-32bit - 1.12.2-1.2: normalized package name match | openSUSE Tumbleweed package metadata: libgcrypt20-32bit from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | The GNU Crypto Library | https://gnupg.org/software/libgcrypt
- zypper - libgcrypt20-x86-64-v3 - 1.12.2-1.2: normalized package name match | openSUSE Tumbleweed package metadata: libgcrypt20-x86-64-v3 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | The GNU Crypto Library | https://gnupg.org/software/libgcrypt
- MacPorts - libgcrypt: normalized package name match | MacPorts ports tree: devel/libgcrypt/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Related links

- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Homebrew utility packages](https://www.automicvault.com/pkg/brew-utility-packages/) - Matched curated package taxonomy and local package facts.
- [libgpg-error](https://www.automicvault.com/pkg/brew/libgpg-error/) - Runtime dependency declared by Homebrew.
- [aide](https://www.automicvault.com/pkg/brew/aide/) - Popular package that depends on this formula.
- [bitlbee](https://www.automicvault.com/pkg/brew/bitlbee/) - Popular package that depends on this formula.
- [clamz](https://www.automicvault.com/pkg/brew/clamz/) - Popular package that depends on this formula.
- [collectd](https://www.automicvault.com/pkg/brew/collectd/) - Popular package that depends on this formula.
- [dar](https://www.automicvault.com/pkg/brew/dar/) - Popular package that depends on this formula.
- [felinks](https://www.automicvault.com/pkg/brew/felinks/) - Popular package that depends on this formula.
- [freediameter](https://www.automicvault.com/pkg/brew/freediameter/) - Popular package that depends on this formula.
- [freeipmi](https://www.automicvault.com/pkg/brew/freeipmi/) - Popular package that depends on this formula.
- [libassuan](https://www.automicvault.com/pkg/brew/libassuan/) - Local package facts share a topical domain. Shared terms: config, error, libgpg, libgpg-error.
- [libksba](https://www.automicvault.com/pkg/brew/libksba/) - Local package facts share a topical domain. Shared terms: config, error, libgpg, libgpg-error.

## Combined YAML source

View the package source record on GitHub. [combined/libgcrypt.yml](https://github.com/automic-vault/db/blob/main/combined/libgcrypt.yml)


## Sources

- Nucleus package database
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
