# Install libksba with Homebrew, apk, apt, dnf, MacPorts, Nix, pacman, zypper

X.509 and CMS library. Version 1.8.0 via Homebrew; verified 2026-05-14.

## Install

```sh
sudo av install brew:libksba
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install libksba
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install libksba
```

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

### Linux

- apk (92%):

```sh
sudo apk add libksba
```

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

- Debian apt (92%):

```sh
sudo apt install libksba-dev
```

  Evidence: Debian stable package indexes: libksba-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install libksba
```

  Evidence: Fedora Rawhide package metadata: libksba 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#libksba
```

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

- pacman (92%):

```sh
sudo pacman -S libksba
```

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

- zypper (92%):

```sh
sudo zypper install libksba-devel
```

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

## Package facts

- **Package key:** brew:libksba
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/libksba>
- **Version:** 1.8.0
- **Source summary:** X.509 and CMS library
- **Homepage:** <https://www.gnupg.org/related_software/libksba/>
- **Repository:** <https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libksba.git%3Ba%3Dsummary>
- **Upstream docs:** <https://www.gnupg.org/documentation/manuals/ksba>
- **License:** LGPL-3.0-or-later OR GPL-2.0-or-later
- **Source archive:** <https://gnupg.org/ftp/gcrypt/libksba/libksba-1.8.0.tar.bz2>
- **Last updated:** 2026-05-14T01:41:21Z
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- ksba-config (cli)
- ksba-config (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.8.0
- Package-manager updated: 2026-05-14
- Local data: ok
- Upstream repository: https://www.gnupg.org/related_software/libksba/
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

Libksba is GnuPG's X.509 and CMS library. It gives C applications a shared interface for parsing and handling X.509 certificates, CMS/PKCS#7 messages, certificate revocation lists, and PKCS#10 certificate requests.

### Project history

GnuPG's Libksba page describes the library as a way to hide the many protocol details and dialects of X.509 certificates, CMS data, and related objects behind one C API. The README explains that KSBA is pronounced Kasbah, ships as a standard shared library, and deliberately does not rely on another cryptographic library.

The reference manual edition 1.0.6 was last updated on 2009-01-09 for KSBA 1.0.6, showing that Libksba had already stabilized as a documented component of the GnuPG library set by the late 2000s. GnuPG download metadata lists Libksba 1.8.0 on 2026-05-13.

### Adoption history

Libksba's adoption is mostly through GnuPG and GnuPG-adjacent packaging. The README says GnuPG's dirmngr module makes extensive use of Libksba's OCSP feature, while GnuPG documentation and related manuals identify gpgsm as the X.509/CMS counterpart to gpg for S/MIME workflows.

It appears in Homebrew, Debian, Ubuntu, Fedora, Alpine, Arch, MacPorts, Nix, and openSUSE because GnuPG stacks are base security infrastructure on Unix-like systems. Users rarely install it for its own UI; they inherit it through certificate, S/MIME, and CMS support.

### How it is used

Developers use Libksba when they need C-level access to X.509 certificate structures, CMS messages, CRLs, PKCS#10 requests, and related parsing/serialization inside GnuPG-style applications. Packagers see ksba-config as the small build-helper executable attached to the library.

### Why package nerds care

Libksba is significant because it is a quiet security plumbing package: not the cryptographic primitive library, not the mail client, and not the gpg command, but the X.509/CMS parser layer that lets GnuPG's S/MIME side exist as a separately packaged dependency.

### Timeline

- 2001: README copyright range begins with 2001 for g10 Code GmbH.
- 2009-01-09: KSBA Reference Manual edition 1.0.6 last updated for library version 1.0.6.
- 2020-11-19: GnuPG Libksba web page source date.
- 2026-05-13: GnuPG download page lists Libksba 1.8.0.

### Related projects

- Related projects include GnuPG, gpgsm, dirmngr, GPGME, Gpg4win, S/MIME, X.509, CMS/PKCS#7, CRLs, OCSP, and PKCS#10 tooling.

### Sources

- <https://formulae.brew.sh/formula/libksba>
- <https://github.com/gpg/libksba>
- <https://www.gnupg.org/documentation/manuals/ksba>
- <https://www.gnupg.org/download/index.html>
- <https://www.gnupg.org/software/libksba/index.html>


## Security Notes

No matching local secret-handling manifest was found for libksba. 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:** libksba
- **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

- Debian apt - libksba-dev - 1.6.7-2+b1: normalized package name match | Debian stable package indexes: libksba-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | X.509 and CMS support library - development files | https://www.gnupg.org/related_software/libksba/
- Debian apt - libksba-mingw-w64-dev - 1.6.7-2: normalized package name match | Debian stable package indexes: libksba-mingw-w64-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | X.509 and CMS support library (Windows development) | https://www.gnupg.org/related_software/libksba/
- Debian apt - libksba8 - 1.6.7-2+b1: normalized package name match | Debian stable package indexes: libksba8 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | X.509 and CMS support library | https://www.gnupg.org/related_software/libksba/
- Nix - libksba: normalized package name match | nixpkgs package indexes: pkgs/by-name/li/libksba/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - libksba-dev - 1.6.6-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libksba-dev from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | X.509 and CMS support library - development files | https://www.gnupg.org/related_software/libksba/
- Ubuntu apt - libksba-mingw-w64-dev - 1.6.6-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libksba-mingw-w64-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | X.509 and CMS support library (Windows development) | https://www.gnupg.org/related_software/libksba/
- Ubuntu apt - libksba8 - 1.6.6-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libksba8 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | X.509 and CMS support library | https://www.gnupg.org/related_software/libksba/
- apk - libksba - 1.7.0-r0: normalized package name match | Alpine Linux edge package indexes: libksba from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Libksba is a CMS and X.509 access library | https://www.gnupg.org/software/libksba/index.html
- apk - libksba-dev - 1.7.0-r0: normalized package name match | Alpine Linux edge package indexes: libksba-dev from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Libksba is a CMS and X.509 access library (development files) | https://www.gnupg.org/software/libksba/index.html
- apk - libksba-doc - 1.7.0-r0: normalized package name match | Alpine Linux edge package indexes: libksba-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Libksba is a CMS and X.509 access library (documentation) | https://www.gnupg.org/software/libksba/index.html
- dnf - libksba - 1.8.0-1.fc45: normalized package name match | Fedora Rawhide package metadata: libksba from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | CMS and X.509 library | https://www.gnupg.org/
- dnf - libksba-devel - 1.8.0-1.fc45: normalized package name match | Fedora Rawhide package metadata: libksba-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Development headers and libraries for libksba | https://www.gnupg.org/
- pacman - libksba - 1.8.0-1: normalized package name match | Arch Linux sync databases: libksba from https://geo.mirror.pkgbuild.com/core/os/x86_64/core.db.tar.gz | Library for working with X.509 certificates, CMS data and related objects | https://www.gnupg.org/related_software/libksba/
- zypper - libksba-devel - 1.8.0-1.1: normalized package name match | openSUSE Tumbleweed package metadata: libksba-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | A X.509 Library | https://www.gnupg.org
- zypper - libksba8 - 1.8.0-1.1: normalized package name match | openSUSE Tumbleweed package metadata: libksba8 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | A X.509 Library | https://www.gnupg.org
- MacPorts - libksba: normalized package name match | MacPorts ports tree: devel/libksba/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.
- [gnupg](https://www.automicvault.com/pkg/brew/gnupg/) - Popular package that depends on this formula.
- [ntbtls](https://www.automicvault.com/pkg/brew/ntbtls/) - 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.
- [libgcrypt](https://www.automicvault.com/pkg/brew/libgcrypt/) - 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/libksba.yml](https://github.com/automic-vault/db/blob/main/combined/libksba.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
