OSS TanbouSign in with GitHub

use AES, ChaCha20, SHA, HMAC, KDFs, and other cryptographic primitives in pure Swift

About these scores

OSS scale score is an unbounded metric that log-compresses and weights Stars, Watchers, Forks, and Contributors. Discovery score is the current OSS scale score minus the score at discovery. Update pace is commits in the last 30 days, growth momentum is the OSS scale score difference within the recent observation window, and OSS health is a 0–100 rating based on available recency, Community Health, and release data.

Stars
10,580
Primary language
Swift
License
Not determined
Repository last updated
Aug 19, 2026
On this page

Overview

CryptoSwift is a pure-Swift collection of cryptographic primitives and utilities. It provides AES, ChaCha20/XChaCha20, SHA-2/SHA-3, HMAC, PBKDF2, HKDF, Scrypt, RSA, and related APIs across Apple platforms, Linux, and Android.

Features and best fit

Based on official documentation; not hands-on tested · Content checked:

Key features

Use hashes, MACs, ciphers, and KDFs from Swift APIs

SHA-256/SHA-512/SHA-3, HMAC, AES, ChaCha20, PBKDF2, HKDF, Scrypt, and other algorithms are available with helpers for String, Data, and [UInt8], including incremental APIs.

Sources: [2]

Follow recommended defaults that favor modern hashes and AEAD

The README recommends AEAD constructions such as AES-GCM, AES-CCM, and ChaCha20-Poly1305 for new protocols, while treating MD5/SHA-1, ECB, and similar options as legacy interoperability features.

Sources: [2]

Best fit

Fits Swift code that needs cross-platform crypto or algorithms beyond Apple-only APIs

It is useful for protocol compatibility, cross-platform libraries, and cipher or KDF requirements that are not conveniently covered by CryptoKit or CommonCrypto alone.

Sources: [2]

Before adoption

Version 1.10.0 supports Swift 5.6+ and iOS 11+, and crypto-heavy workloads should be profiled in Release builds

Package.swift uses Swift tools 5.6 and declares iOS 11, macOS 10.13, tvOS 11, and watchOS 4 minimums. The README notes that Debug builds can be dramatically slower for crypto-heavy workloads. Version 1.10.0 also fixes XChaCha20-Poly1305 nonce metadata and Scrypt/SecureBytes memory handling.

Sources: [3][2][4]

Official sources

  1. [1]krzyzanowskim/CryptoSwift — GitHub repository(2026-10-06)
  2. [2]CryptoSwift 1.10.0 — README(2026-10-06)
  3. [3]CryptoSwift 1.10.0 — Package.swift(2026-10-06)
  4. [4]CryptoSwift 1.10.0 release(2026-10-06)
  5. [5]CryptoSwift license(2026-10-06)
Supplemental curator note

CryptoSwift fits cross-platform Swift and protocol-compatibility needs. For new designs, follow the project's modern AEAD and hash recommendations and benchmark crypto-heavy workloads in Release builds.

Try it in 3 steps

  1. 1

    Add CryptoSwift 1.10.0 with SwiftPM

    Pin the reviewed release. The current line supports Swift 5.6+ and iOS 11+.

    .package(url: "https://github.com/krzyzanowskim/CryptoSwift.git", exact: "1.10.0")
  2. 2

    Add the CryptoSwift product to the target

    Link CryptoSwift from the target that performs cryptographic operations.

    .product(name: "CryptoSwift", package: "CryptoSwift")
  3. 3

    Calculate a SHA-256 digest

    Use the Data helper to calculate SHA-256 and render the digest as hexadecimal.

    import CryptoSwift let digest = Data("hello".utf8).sha256() print(digest.toHexString())
Check the official README

Growth

Growth trends · Last 30 days

10,580 Stars

Trend data is still being collected.

Development activity

Last 90 days · weekly

Commits (last 30 days)
0
Open PRs
4

Development activity is still being collected.

Built with

Categories and tags

GitHub data

GitHub dataView detailed GitHub data

GitHub Topics

  • swift
  • aes
  • cryptography
  • commoncrypto
  • cryptoswift
  • md5
  • sha1
  • hmac-authentication
  • sha3
  • cipher
  • digest
  • aes-gcm
Stars
10,580
Forks
1,808
Watchers
184
Open issues
0
Contributors
117
Owner type
User
Primary language
Swift
License
Not determined
Repository last updated
Aug 19, 2026
Write a related article

Share a guide or use case for this OSS in Markdown. Articles are published after administrator approval.

Report incorrect information

Tell us if any listing information is incorrect or outdated.

After reading this page, do you know what to do next?