Tink v1.4.0 Release Notes

Release Date: 2020-07-14 // about 2 years ago
  • Tink is a multi-language, cross-platform library that provides simple and misuse-proof APIs for common cryptographic tasks.

    This is Tink 1.4.0.

    The complete list of changes since 1.3.0 can be found here.

    What's new

    ๐Ÿ”’ Security fixes

    ๐Ÿš€ This release fixes the following potential security issues, affected users are recommended to upgrade.

    Quan Nguyen of Snap Inc. found that AES-CTR-HMAC-AEAD keys and the EncryptThenAuthenticate subtle implementation may be vulnerable to chosen-ciphertext attacks. An attacker can generate ciphertexts that bypass the HMAC verification if and only if all of the following conditions are true:

    • Tink C++ is used on systems where size_t is a 32-bit integer. This is usually the case on 32-bit machines.

    - The attacker can specify long (>= 229 bytes ~ 536MB) associated data.

    Streaming AEAD implementations encrypt the plaintext in segments. Tink uses a 4-byte segment counter. When encrypting a stream consisting of more than 232 segments, the segment counter might overflow and lead to leakage of key material or plaintext. This problem was found in the Java and Go implementations of the AES-GCM-HKDF-Streaming key type.


    ๐Ÿ‘ This version introduces support for Python 3.7 and 3.8.

    ๐Ÿ‘€ Tink in Python is built on top of C++. It supports all primitives but Streaming AEAD. For an overview, see the HOW-TO. In addition, there are illustrative examples of using Tink in Python which can be used as a jumping off point.

    ๐ŸŽ PyPi binary packages for Linux and macOS are provided.

    pip3 install tink


    Attempt to erase keys from memory after use.

    โž• Adding support for CordAead, which is a more memory-efficient version of Aead that uses absl::Cord.

    ๐Ÿ“š We no longer offer prebuilt binaries for C++. Please check out this documentation for how to compile your application together with Tink using Bazel or CMake.


    • Removing Obj-C protobufs.

      cd /path/to/your/Xcode project/ pod init pod 'Tink', '1.4.0'pod install


    • ๐Ÿ‘ Cleaning up Godoc and adding better examples.

      go get github.com/google/tink/go/...


    • ๐Ÿ‘ Removing support for Java 7.

      <dependency> <groupId>com.google.crypto.tink</groupId> <artifactId>tink</artifactId> <version>1.4.0</version> </dependency>


    ๐Ÿ›  Bundling a shaded copy of Google Protobuf. This fixes an annoying version conflict bug.

    Bundling a rule file to ensure compatibility with Proguard/R8.

    ๐Ÿ”จ Refactoring Android Keystore integration

    โœ… Running a self-test to only enable the integration if Android Keystore is working properly.

    Do not automatically generate fresh keys if keys exist but are corrupt. This won't recover corrupt keys, but at least it will allow to gather more data on Android Keystore failures.

    dependencies {
      implementation 'com.google.crypto.tink:tink-android:1.4.0'


    ๐ŸŽ Tinkey can now be installed via Homebrew on Linux and macOS.

    brew tap google/tink https://github.com/google/tink brew install tinkey

    The binaries can also be downloaded from

    Known issues

    • ๐Ÿ— Tink in Obj-C doesn't build. That is, you can't build it yourself using Bazel. You can still use it in your apps by installing our prebuilt package, as noted above.