CryptoSwift is a cryptographic library that provides pure Swift implementations of standard and secure cryptographic algorithms.
The library addresses the need for cryptographic primitives in Swift applications without requiring external C dependencies. It implements algorithms across multiple categories: hash functions including MD5, SHA1, SHA2 variants, and SHA3; symmetric ciphers such as AES, ChaCha20, XChaCha20, Rabbit, and Blowfish; message authenticators including HMAC, Poly1305, CMAC, and CBC-MAC; cyclic redundancy checks; and RSA for public-key encryption and signatures. The pure Swift approach means all cryptographic operations are implemented directly in Swift rather than wrapping system libraries or C code.
Developers should choose this tool if they need cryptographic functionality in Swift applications targeting Apple platforms, Linux, or Android without introducing C dependencies. It suits projects requiring standard algorithms with convenient extensions for common Swift types like String, Data, and Array<UInt8>. The library supports incremental updates and streaming APIs for processing large amounts of data. The minimum Swift version requirement is 5.6, with support across iOS 11, macOS 10.13, Mac Catalyst 13, tvOS 11, watchOS 4, and visionOS 1.
The project maintains active development with regular updates to support current Swift toolchains. Contributions are actively solicited and the project sustains itself through GitHub Sponsors. The codebase exercises compatibility across Apple platforms, Linux, and Android through continuous integration. Legacy branches are available for developers using older Swift compilers, though these branches are not actively maintained.