A demonstration library for using the Secure Enclave on iOS to create and sign with keys stored in hardware.
SecureEnclaveCrypto is a demonstration library that provides a wrapper for Apple's Secure Enclave API on iOS, allowing developers to create and use cryptographic keys stored in the device's hardware-based Secure Enclave. It solves the problem of securely storing private keys away from the iOS operating system to protect against malware, while also addressing initial API documentation gaps and OpenSSL compatibility issues.
iOS developers building applications that require high-security cryptographic operations, such as secure authentication, data signing, or key management, particularly those needing hardware-backed key storage.
Developers choose SecureEnclaveCrypto because it offers a practical, well-documented example of using Apple's otherwise poorly documented Secure Enclave API, with support for both Swift and Objective-C, and tools to ensure compatibility with common cryptographic standards like OpenSSL.
Demonstration library for using the Secure Enclave on iOS
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
The library provides clear, practical examples for Apple's initially undocumented kSecAttrTokenIDSecureEnclave API, as stated in the README, filling a critical documentation gap for iOS developers.
Includes implementations in both Swift 3 and Objective-C, with separate directories for each, allowing flexibility based on project requirements and language preferences.
Enables private key storage in the Secure Enclave, isolating it from iOS and malware, as highlighted in the project description for enhanced security in cryptographic operations.
Offers a Ruby script (key_builder.rb) to convert public keys to OpenSSL-compatible PEM format, easing interoperability with other systems, as demonstrated in the README with a concrete example.
Focuses only on key creation and data signing, lacking support for other common operations like encryption, decryption, or secure key exchange, which limits its utility for broader security needs.
The Swift code is based on Swift 3, which is obsolete and requires manual updates for compatibility with modern Swift versions, increasing maintenance overhead for developers.
Positioned as a demo library, it may lack rigorous testing, bug fixes, and ongoing maintenance, making it risky for production use without significant adaptation and oversight.