Install Tink

You can build Tink from source or use language-specific packages. The instructions below will get you started.

Python

Tink supports Python 3.7 or newer on macOS and Linux.

The simplest way to use Tink is to install a binary release for your system from PyPI, by running the following command:

pip3 install tink

If a binary package isn't published for your environment, pip will automatically resort to building the project using the source distribution published to PyPI. If this is the case, you'll need Bazel and the protobuf compiler installed to successfully build the project.

Java

Tink supports Java 8 or newer. You can include Tink in Java projects using Maven:

Specify the current release of Tink as a project dependency using the following configuration:

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

Key management system integration

If you plan to use a key management system with your Tink implementation (generally recommended), it’s necessary to add a dependency to your Java config. Key management has more information about best practices for managing keys.

For AWS KMS, add the dependency on tink-awskms:

<dependencies>
  <dependency>
    <groupId>com.google.crypto.tink</groupId>
    <artifactId>tink-awskms</artifactId>
    <version>1.6.0</version>
  </dependency>
</dependencies>

For Google Cloud KMS, add the dependency on tink-gcpkms:

<dependencies>
  <dependency>
    <groupId>com.google.crypto.tink</groupId>
    <artifactId>tink-gcpkms</artifactId>
    <version>1.6.0</version>
  </dependency>
</dependencies>