Understand Tink's security and usability design goals
masterTink is designed to provide high-level cryptographic primitives that are difficult to misuse. Its core design principles include:
- Security: Built on top of established libraries (like BoringSSL and JCA) with integrated countermeasures against weaknesses identified by Project Wycheproof.
- Easiness: High-level interfaces allow common operations (encryption, signatures) to be performed with minimal code, abstracting away implementation details.
- Hard-to-misuse: Tink prevents common cryptographic errors by design. For example, it manages nonces internally so users cannot accidentally reuse them. Security guarantees are baked into the interfaces.
- Readability: Security properties (e.g., resistance to chosen-ciphertext attacks) are explicitly stated in the interfaces. Dangerous operations (like loading cleartext keys) are separated into distinct APIs to facilitate auditing and restriction.
- Extensibility: Supports easy integration of new primitives, algorithms, ciphertext formats, and key management systems.
- Agility: Supports crypto agility, including key rotation and the deprecation of obsolete schemes. You can switch implementations by rotating keys without recompiling code.
- Interoperability: Ciphertexts are compatible with existing libraries. Tink supports major KMS providers like Amazon KMS, Google Cloud KMS, Android Keystore, and iOS Keychain.
- Versatility: Components are recombinant and modular, allowing you to use only the specific primitives (e.g., only digital signatures) required for your application.