ATCryptography

0.1.8

A Swift library providing cryptographic utilities for the AT Protocol.
ATProtoKit/ATCryptography

What's New

v0.1.8

2025-05-17T14:26:34Z

Version 0.1.8 includes the following changes:

  • Removed deprecations in favour of warnings in the documentation.
    • The deprecations were causing more issues than what it’s worth. Given that no one will use these methods directly, it’s better to document the fact that the methods should only be used for iOS 15 and earlier, as well as tvOS 15 and earlier.

Once again, thank you for your support. Please give feedback, bug reports, and contributions if you have time. Consider starring this project if you find it helpful, and feel free to donate an amount that reflects the value it has brought to you. Your support helps ensure the continued development and improvement of this project. You can also speak to me on Bluesky (@cjrriley.com) for any questions.

An icon for ATCryptography, which contains three stacks of rounded rectangles in an isometric top view. At the top stack, the at symbol is in a thick weight, with a pointed arrow at the tip. The background of the stack contains many 0s and 1s in a fade. The three stacks are lighter shades of blue.

ATCryptography

Cryptographic utilities for the AT Protocol, written in Swift.

GitHub Repo stars

Static Badge GitHub Sponsors

This Swift package implements cryptographic operations required by the AT Protocol, using Apple's swift-crypto and compatible libraries. It's designed to be similar in features as the crypto package in the official atproto TypeScript repository. ATCryptography supports the following cryptographic systems:

  • "p256," otherwise known as "secp256r1" or "NIST P-256."
  • "k256," otherwise known as "secp256k1" or "NIST K-256."

The library provides helpers for key management, signing, verification, hashing, and encoding. These utilities are aligned with AT Protocol’s cryptographic requirements, including low-S signatures, byte representation compression, and string encodings.

For details on cryptography in the AT Protocol, refer to the Cryptography section of the specification.

Installation

You can use the Swift Package Manager to download and import the library into your project:

dependencies: [
    .package(url: "https://github.com/ATProtoKit/ATCryptography.git", from: "0.1.0")
]

Then under targets:

targets: [
    .target(
        // name: "[name of target]",
        dependencies: [
            .product(name: "ATCryptography", package: "atcryptography")
        ]
    )
]

Requirements

ATCryptography is designed to be a server application. For a Linux server, Swift 6.0 or later is required. The minimum requirements include:

  • Amazon Linux 2
  • Debian 12
  • Fedora 39
  • Red Hat UBI 9
  • Ubuntu 20.04

You can also use it on macOS. Please target macOS 13 or later.

You can also use this project for any programs you make using Swift and running on Docker.

Warning

As of right now, Windows support is theoretically possible, but not has not been tested to work. Contributions and feedback on making it fully compatible for Windows and Windows Server are welcomed.

Submitting Contributions and Feedback

While this project will change significantly, feedback, issues, and contributions are highly welcomed and encouraged. If you'd like to contribute to this project, please be sure to read both the API Guidelines as well as the Contributor Guidelines before submitting a pull request. Any issues (such as bug reports or feedback) can be submitted in the Issues tab. Finally, if there are any security vulnerabilities, please read SECURITY.md for how to report it.

If you have any questions, you can ask me on Bluesky (@cjrriley.com). And while you're at it, give me a follow! I'm also active on the Bluesky API Touchers Discord server.

License

This Swift package is using the Apache 2.0 License. Please view LICENSE.md for more details.

Description

  • Swift Tools 6.0.0
View More Packages from this Author

Dependencies

Last updated: Sun Jun 15 2025 21:49:42 GMT-0900 (Hawaii-Aleutian Daylight Time)