Skip to content

Tink C++ 2.0.0

Compare
Choose a tag to compare
@morambro morambro released this 27 Apr 10:18
· 968 commits to main since this release

Tink is a multi-language, cross-platform library that provides simple and misuse-proof APIs for common cryptographic tasks.

This is Tink C++ 2.0.0

To get started using Tink, see the setup guide.

CMake

You can import Tink C++ as an in-tree dependency.

cmake_minimum_required(VERSION 3.13)

project(Example CXX)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(CMAKE_BUILD_TYPE Release)

# Assumes tink-cc is in third_party.
add_subdirectory(third_party/tink-cc tink)

add_executable(example_app example_app.cc)
target_link_libraries(example_app tink::static)

Bazel

workspace(name = "example")

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "com_github_tink_crypto_tink_cc",
    urls = ["https://github.com/tink-crypto/tink-cc/archive/refs/tags/v2.0.0.zip"],
    strip_prefix = "tink-cc-2.0.0",
    sha256 = "103ddfce800e77f3b3b6b2c808a8611bc734b31ddb12fbcfd8bebc1b96a7e963",
)

# Load Tink dependencies.

load("@com_github_tink_crypto_tink_cc//:tink_cc_deps.bzl", "tink_cc_deps")

tink_cc_deps()

load("@com_github_tink_crypto_tink_cc//:tink_cc_deps_init.bzl", "tink_cc_deps_init")

tink_cc_deps_init()

# ... Your dependencies here ...

WARNING: Different from 1.7.0, labels are now prefixed by tink: for example @tink_cc
becomes @tink_cc//tink:tink_cc, or @tink_cc//aead/... becomes
@tink_cc//tink/aead/....

Bazel users of Tink can use the script tools/update_build_files_for_tink_2_0_bazel.sh to apply the necessary Bazel changes to their > BUILD files:

cd <path/to/tink_cc>
bazel run //tools:update_build_files_for_tink_2_0_bazel -- <path/to/you/project/root> \
  <tink-cc repository name>

WARNING: KMS extensions are now published in separate repositories:

What's new

This is the first release from https://github.com/tink-crypto/tink-cc.

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

  • Upgraded to use Bazel 6.0.0
  • Changed minimum C++ version to C++14
  • Changed minimum version of CMake to 3.13
  • Changed the structure of the repository adding sources to tink. As a consequence, target labels are now prefixed with tink, for example @tink_cc becomes @tink_cc//tink:tink_cc, or @tink_cc//aead/... becomes @tink_cc//tink/aead/....
  • KMS extensions are now published to separate repositories:
  • Upgraded dependencies:
    • Abseil LTS 20230125
    • BoringSSL (Commit from 2023-02-15)
    • Protobuf X.21.9
  • Added support for building on Windows with Microsoft Visual Studio 2019 version 16.10.4.0 or later with CMake and Bazel
  • Added walkthrough examples and ability to build examples with CMake
  • Added new keyset handle APIs (experimental)
  • Added/upgraded CI test scripts
  • Removed deprecated APIs:
    • Removed Catalogue APIs (commits: #1, #2, #3).
    • Removed RegisterKeyManager from Registry (commits: #1)
    • Removed Latest from Tink's *_config.h (commits: #1)
    • Removed config.h (commits: #1)
  • Make util::Status an alias of absl::Status (commits: #1, #2)