# Bouncy Castle

Bouncy Castle Java Distribution (Mirror)

Repository: https://github.com/bcgit/bc-java
Canonical: https://ross.abutalabs.com/products/bouncy-castle-cryptography-library
Homepage: https://www.bouncycastle.org/download/bouncy-castle-java/
Language: Java
License: MIT
License Family: permissive
Topics: crypto, java, openpgp, dtls, post-quantum-cryptography, tls
Last push: 2026-08-26T13:04:51+00:00
Link (homepage): https://www.bouncycastle.org/download/bouncy-castle-java/
Link (site_page): https://www.bouncycastle.org/documentation
Link (site_page): https://www.bouncycastle.org/documentation/documentation-java
Link (site_page): https://www.bouncycastle.org/documentation/documentation-c
Link (site_page): https://www.bouncycastle.org/documentation/specification_interoperability

## Health v2 (maintenance only)
Score: 77/100 (v2, computed 2026-09-03T02:39:23.370411+00:00)
- activity 99, release rhythm 35, longevity 100
- inputs: {"age_days": 4842, "days_push": 7, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2683, forks 1268 (observed 2026-08-28T04:07:10.143364+00:00)

## What it is
Bouncy Castle is a comprehensive open-source cryptographic library for Java (and C#/.NET) implementing a wide range of algorithms, a JCA/JCE provider, and protocols such as TLS, DTLS, OpenPGP, CMS/S/MIME, and X.509/PKIX. It includes lightweight APIs for constrained environments and supports post-quantum algorithms, with separately licensed FIPS-certified editions.

## Use cases
- implement TLS 1.3 in a Java application
- sign and encrypt files with OpenPGP
- generate and validate X.509 certificates and CSRs
- add a JCE crypto provider with more algorithms than the JDK
- use post-quantum cryptography algorithms in Java
- build S/MIME or CMS signed messages
- do cryptography in C#/.NET without platform dependencies
- implement DTLS for a UDP-based protocol

## When to choose
- you need algorithms or protocols (PGP, CMS, OCSP, CMP, post-quantum) not covered by the standard JDK or .NET crypto APIs
- you need a lightweight crypto API usable in constrained environments like J2ME/Android
- you need fine-grained control over certificate parsing, path validation, or PKI message formats
- you want a permissively licensed, widely audited, long-established crypto library

## When to avoid
- you only need basic TLS/HTTPS - use the platform's built-in TLS stack instead
- you require FIPS 140 compliance - the general edition is not FIPS certified; you need the separate FIPS version
- you want a high-level API that hides crypto details - Bouncy Castle is low-level and requires cryptographic expertise to use safely
- you need crypto in a language other than Java, C#, or Kotlin

## Facets
- artifact type: library
- maturity: stable
- function: cryptography, security, sdk
- domain: security, developer-tools, backend, apis
- platform: jvm, dotnet, cross-platform
- tags: tls, openpgp, x509, pkix, post-quantum-cryptography, jce-provider, fips, dtls, cms, smime, android

## Member repositories
- bcgit/bc-java (main) score 77
- bcgit/bc-csharp (sdk) score 76

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:10.143364+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:17:51.902727+00:00, confidence not recorded.
  - readme: https://github.com/bcgit/bc-java (fetched 2026-08-28T04:07:10.143364+00:00, sha f67f18c2ceff)
  - homepage: https://www.bouncycastle.org/download/bouncy-castle-java/ (fetched 2026-08-29T10:00:31.806726+00:00, sha 24f0d659360a)
  - site_page: https://www.bouncycastle.org/documentation (fetched 2026-08-29T10:00:31.815937+00:00, sha f43929ae62ac)
  - site_page: https://www.bouncycastle.org/documentation/documentation-java (fetched 2026-08-29T10:00:31.817975+00:00, sha bf3c72d6899b)
  - site_page: https://www.bouncycastle.org/documentation/documentation-c (fetched 2026-08-29T10:00:31.820146+00:00, sha fb78e7f6c6f5)
  - site_page: https://www.bouncycastle.org/documentation/specification_interoperability (fetched 2026-08-29T10:00:31.822025+00:00, sha c4f6eb7de147)
  - site_page: https://www.bouncycastle.org/documentation/object-identifiers (fetched 2026-08-29T10:00:31.823817+00:00, sha 31056872b3e5)
  - site_page: https://www.bouncycastle.org/about (fetched 2026-08-29T10:00:31.825955+00:00, sha f6d26733f10a)
  - site_page: https://www.bouncycastle.org/about/license (fetched 2026-08-29T10:00:31.827901+00:00, sha d0718453706c)
  - site_page: https://www.bouncycastle.org/about/bouncy-castle-fips-faq (fetched 2026-08-29T10:00:31.829679+00:00, sha d2c8afae9c41)
- Data as of 2026-08-30T08:39:29.467469+00:00.
