Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. iOS
  3. SecureEnclaveCrypto

SecureEnclaveCrypto

Apache-2.0Swift

A demonstration library for using the Secure Enclave on iOS to create and sign with keys stored in hardware.

GitHubGitHub
288 stars41 forks0 contributors

What is SecureEnclaveCrypto?

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.

Target Audience

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.

Value Proposition

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.

Overview

Demonstration library for using the Secure Enclave on iOS

Use Cases

Best For

  • Implementing hardware-backed key storage for iOS apps
  • Adding secure digital signature capabilities to mobile applications
  • Learning how to use Apple's Secure Enclave API in Swift or Objective-C
  • Developing high-security authentication systems on iOS
  • Converting Secure Enclave public keys to OpenSSL-compatible formats
  • Protecting private keys from iOS-based malware or exploits

Not Ideal For

  • Projects requiring cross-platform cryptographic key management across iOS, Android, and web
  • Apps needing a comprehensive cryptographic library with features like encryption, decryption, or key rotation beyond signing
  • Teams looking for a production-ready, actively maintained library with regular updates and support
  • Developers working with modern Swift versions who need out-of-the-box compatibility without code migration

Pros & Cons

Pros

Demystifies Undocumented API

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.

Dual Language Support

Includes implementations in both Swift 3 and Objective-C, with separate directories for each, allowing flexibility based on project requirements and language preferences.

Hardware-Backed Key Isolation

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.

OpenSSL Compatibility Tool

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.

Cons

Limited Cryptographic Scope

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.

Outdated Swift Implementation

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.

Demonstration-Only Nature

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.

Frequently Asked Questions

Quick Stats

Stars288
Forks41
Contributors0
Open Issues4
Last commit5 years ago
CreatedSince 2016

Tags

#apple#keychain#crypto#mobile-security#ios#objective-c#hardware-security#security#digital-signatures#cryptography#secure-enclave#swift#macos#key-management

Built With

O
Objective-C
i
iOS SDK
S
Swift

Included in

iOS51.7k
Auto-fetched 11 hours ago

Related Projects

CryptoSwiftCryptoSwift

CryptoSwift is a growing collection of standard and secure cryptographic algorithms implemented in Swift

Stars10,574
Forks1,803
Last commit20 days ago
RNCryptorRNCryptor

CCCryptor (AES encryption) wrappers for iOS and Mac in Swift. -- For ObjC, see RNCryptor/RNCryptor-objc

Stars3,356
Forks512
Last commit1 year ago
ThemisThemis

Easy to use cryptographic framework for data protection: secure messaging with forward secrecy and secure data storage. Has unified APIs across 14 platforms.

Stars1,974
Forks159
Last commit4 months ago
SwiftyRSASwiftyRSA

RSA public/private key encryption in Swift

Stars1,303
Forks358
Last commit1 year ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub