Questions tagged [tink]
Tink is a multi-language, cross-platform library that provides a simple and misuse-proof API for common cryptographic tasks.
72
questions
1
vote
1
answer
49
views
Tink: Streaming encryption using Vault KMS
I'm trying to encrypt and decrypt using Tink and HashiCorp Vault. When I attempt to encrypt and decrypt within the same session using the same AEAD object, it works fine. However, if I store the ...
0
votes
1
answer
25
views
Tink - streaming encryption with Hashicorp Vault as KMS
I'm trying to use Tink, and I've successfully encrypted a file using streaming AEAD. I've also integrated Tink with Vault and performed encryption for a single message. However, I couldn't find an ...
0
votes
0
answers
46
views
How to decrypt AES-CBC encrypted data with Google Tink?
I have to migrate from Keyczar to Tink, if the old data can be decrypted directly by Tink, we can just migrate to Tink.
But Keyczar used AES-CBC mode for the encryption, I tried to find if Tink ...
0
votes
0
answers
50
views
Can we use Google Tink to encrypt a file using c#?
I want to encrypt files using c# and those files should be able to decrypt in Android and IOS apps.
I want to know whether this can be done using Tink.
Seems c# is not supported but at least if I ...
0
votes
0
answers
35
views
Google Tink Library - Large Dataset encryption
Does Tink Library cache the keys? If I need to encrypt/decrypt a million records, does it make a GCP/KMS api call each time to fetch the key?
0
votes
0
answers
87
views
How to use cmake to build a library with a link to another library aliased
I am trying to build a library that uses the Google tink library and the AWS C++ SDK, but it fails with the following error:
Target "tcc-tink" links to target "AWS::Crypto" but the ...
0
votes
0
answers
97
views
Decryption using streaming AEAD (google tink)
When I try to decrypt ciphertext using streaming aead primitive as part of google tink, I get the following error: java.io.IOException: No matching key found for the ciphertext in the stream
Below is ...
0
votes
0
answers
479
views
Google Pay decryption error: Could not verify intermediate signing key signature
I am trying to decrypt a google payment token using Python google-pay-token-decryption package following this link https://github.com/yoyowallet/google-pay-token-decryption. Currently I keep getting ...
0
votes
1
answer
241
views
How to use Tink's envelope encription with Deterministic AEAD on GCP with python?
I would like to use Tink's envelope encription with Deterministic AEAD on GCP. I want to use it in python. I want to store a KEK key in GCP KMS and and encrypt the DEK key with it.
There is an example ...
0
votes
1
answer
63
views
Add google tink java lib in bazel
I'm working on a java project where bazel is being used. I'm looking to add tink java lib in bazel but looks like com_github_google_tink is not a valid package name.
java_library(
name = "...
0
votes
1
answer
96
views
AeadConfig.register() throws exception
I am trying to use tink to encrypt data.
My initialization routine is as follows:
try {
AeadConfig.register();
} catch (GeneralSecurityException e) {
e....
1
vote
0
answers
323
views
When trying to make an API call i get the error,"errorMessage" : "No recognized authentication method was provided."
I am tyring to make an api call to trade a code for an api access token using a client id and client secret to call the TinkOAuthApi. This was supposed to return an api access token to get a ...
1
vote
1
answer
506
views
How to get string representation of Key from KeySetHandle/KeyTemplate in Google Tink
Here is my code
KeysetHandle handle = KeysetHandle.generateNew(KeyTemplates.get("AES256_GCM"));
Aead aead = handle.getPrimitive(Aead.class);
How can I get the byte /string representation of ...
0
votes
1
answer
2k
views
AES-256-CTR decryption in Golang
I have difficulties to decrypt payload with AES-256-CTR in Golang
Format:
A zero IV.
Not padded.
Input:
func main() {
encryptedKey := []byte{196, 231, 38, 149, 234, 51, 142, 186, 230, 214, 96, 243, ...
5
votes
0
answers
1k
views
What does exception signify AndroidKeystoreAesGcm: encountered a potentially transient KeyStore error, will wait and retry
my current android application employs the tink library from google for encryption of data within my local database
api 'com.google.crypto.tink:tink-android:1.6.1'
my app gradle resembles this:-
...
1
vote
1
answer
751
views
GCP Cloud KMS - custom key, disaster recovery possible?
we are currently getting our heads around gcp cloud kms and how to cater for disaster recovery. this is our current test setup:
Java using Spring boot + Google Tink using KMSEnvelopeAead + AesGcmJce (...
0
votes
1
answer
660
views
java: incompatible types: T cannot be converted to java.lang.String
I am currently working on a encryption and decryption service for my application, using Google Tink.
The problem is the following: I want to program it without using (nearly) duplicate code and ...
1
vote
1
answer
684
views
How to keep backup of Android Keystore's master key or create from user input?
I am using Google/Tink's Deterministic symmetric key encryption in my project. Like this-
byte[] ciphertext;
Context context = getApplicationContext();
String plainText="Hello World";...
6
votes
0
answers
4k
views
Missing class com.google.errorprone.annotations.Immutable on building release apk with R8
I am getting below error on building the release apk with R8 enabled:
Task :app:minifyReleaseWithR8
AGPBI: {"kind":"warning","text":"Missing classes detected while ...
0
votes
0
answers
368
views
How to convert Google Tink KeysetHandle to byte[ ] and back?
I'm trying to convert Google Tink's KeysetHandle into byte [] and to construct the KeysetHandle back from the byte [].
So here is the code I came up with
//Two functions for the conversion
public ...
0
votes
1
answer
201
views
How to do this in Tink's Objective-c?
It seems so much simpler to encrypt using java than obj-c with Tink. Given a known 32-bytes XChaCha20Poly1305 key, and a 16-bytes authenticated data (aad), how can the same be done in objective-c?
...
0
votes
0
answers
609
views
google tink got "referenceerror: self is not defined" when using in Nodejs
We are trying to use google tink and below is a sample that how we use it.
const tinkLoader = () => import("tink-crypto");
tinkLoader().then((tink) => {
tink.hybrid....
2
votes
1
answer
607
views
Intermittently corrupted data with Google Tink encryption
Im investigating the use of com.google.crypto.tink:tink-android:1.6.1 in my current Android project.
The data I am encrypting includes the OAuth2 Access Token/Refresh Token I employ for my remote API ...
0
votes
1
answer
585
views
How to read from a secure websocket with Tink in C++
I'm working on a C++ client app that needs to read from a secure websocket. After looking into some websocket libraries I would like to use easywsclient but it does not support TLS. I tried adding ...
4
votes
1
answer
946
views
Tink GeneralSecurityException: cannot find key template: AES128_GCM Tink
What I tried to run :
KeysetHandle keyHandler = KeysetHandle.generateNew(KeyTemplates.get("AES128_GCM"));
Error I got :
java.security.GeneralSecurityException: cannot find key template: ...
2
votes
0
answers
137
views
AndroidKeysetManager Builder crash with HybridKeyTemplates
I've got Android code that encrypts/decrypts data. It was written over a year ago by another developer (who has since left) and has worked fine until very recently, when it started crashing with the ...
2
votes
2
answers
675
views
How to pass in valid values into cleartext_keyset_json to create a Tink key
In Tink, it is possible to load and write cleartext keysets as jsons. An non-working example is seen below:
{
"primaryKeyId": 2800579,
"key": [
{
"keyData": ...
1
vote
0
answers
360
views
Decrypt Google Pay payment token using Go
I want to implement the decryption of Google Pay payment tokens using the Go language. Google strongly recommends using the Tink library.
I have looked at the instructions provided here, but couldn't ...
0
votes
1
answer
456
views
How to build Google tink library using bazel in C++?
I want to use Google tink library for my app. I bound my code using android ndk. However, I couldn't build Google tink library with bazel. I have tried their examples on GitHub (https://github.com/...
0
votes
1
answer
262
views
Google Tink Hybrid params
Google Tink supports "hybrid encryption" - a convenience method of encrypting a symmetric key with an asymmetric one, encrypting a plaintext with the symmetric key, and bundling the two ...
2
votes
1
answer
808
views
Export keyset entry from Tink with AndroidKeysetManager
I'm using 'androidx.security:security-crypto:1.1.0-alpha02' in an android project. It works fine for file encryption/decription. I've set up a master key inside the hardware keystore that requires ...
0
votes
1
answer
1k
views
How to rotate keys?
I'm looking at the Tink documentation, but I don't see a clear way how to rotate a key. Basically, I would like to do somethink like:
KeyTemplate keyTemplate = AeadKeyTemplates.AES256_GCM;
...
0
votes
1
answer
645
views
How to generate a Java tink key?
I'm using the Google Tink library in my Java project to encrypt two texts, one with Symmetric Key Encryption (SKE), and another one with Deterministic symmetric key encryption (DSKE).
This is a ...
1
vote
0
answers
239
views
Google Tink Key management and sharing from android to .NET to decrypt data to server end which is encrypted at mobile(client) end
I am trying to make an end to end encrypted app where I encrypt data at the mobile end at the time of sending and we can decrypt it at the server(for user info). but I am not able to find any solution ...
4
votes
1
answer
451
views
Mutual TLS in Python using Google Cloud KMS
Is there a way to make HTTP requests over mTLS with private keys stored in Google Cloud Key Management Service?
In this blog post what we need is done in Go. Is it possible to achieve the same in ...
-2
votes
2
answers
2k
views
Android Studio : Gradle sync failed: Could not download tink
When start a project on Android Studio 4.0, Gradle cannot sync completely and Design mode is unavailable. Error message appear - > Gradle sync failed: Could not download tink-1.3.0-rc2.jar (com.google....
-1
votes
1
answer
261
views
Can I decrypt data which is encrypted by Keyczar using Google Tink?
I have been using Google Keyczar for encrypting data in my JAVA app. And I want to change the crypto solution to Google Tink.
But the problem is the already encrypted data by Keyczar. Can I decrypt ...
-1
votes
1
answer
170
views
DeterministicAead one key but change initialization vector?
I'm using Googles Tink DeterministicAead. What I'd like to achieve, is to use the same key over a long time, but change the ciphertext for a certain plaintext every 24 hours (for GDPR reasons).
Can I ...
2
votes
2
answers
2k
views
Issue decrypting a file encrypted with EncryptedFile on Android
I am encrypting a file created on the android app in a Bluetooth service. In another class later on I want to decrypt this file and upload it to a server.
For encryption I am using the AndroidX ...
1
vote
1
answer
235
views
Google TINK - Streaming AEAD Always returning an output file of 1 KB
I am trying to encrypt a file(txt, pdf, doc) using Google Tink - streaming AEAD encryption, below is the Java code which I am trying to execute. But all I get is 1 KB output encrypted file and no ...
1
vote
0
answers
578
views
Implementing envelope encryption on Android using Tink and Google Cloud KMS
The app I am implementing will contains highly sensitive user data and as such we want to encrypt the data before saving it, both locally and online (on Gcloud Firestore). I'd like to do this using ...
1
vote
1
answer
776
views
Google Pay PaymentMethodTokenRecipient function implementation in Golang
I am trying to implement Google Pay decryption method as mentioned.
https://developers.google.com/pay/api/android/guides/resources/payment-data-cryptography#decrypt-token
It mentions to use tink ...
0
votes
1
answer
1k
views
Admob rewarded ads server side verification
I wanted to do server-side validation for Admob rewarded video ads on my android app. For this, I followed the instructions in the admob documentation but failed.
First I imported the google tink ...
1
vote
2
answers
2k
views
Decryption erorr when using tink in Java
I am trying to create an encrypted token that is to be sent as an REST API response. The end user then can send the same token during next request to this api, and I can parse it and get some context ...
0
votes
1
answer
72
views
Are Google Tink ciphertexts portable across programming languages?
I am wondering if I encrypt a plaintext, let's say using the Go SDK whether I will be able to decrypt it using the Java SDK? Is that a design goal of the library to guarantee this portability across ...
1
vote
1
answer
1k
views
How to create master key in Tink android
I wanted to use Tink library and able to encrypt and decrypt data but not understanding what is the purpose of master key in its creation and how to create a master key for it.
private fun ...
2
votes
1
answer
2k
views
How Do I manage Android Keystore KMS for symmetric encryption and decryption?
I want to encrypt and decrypt with symmetrically with android Keystore KMS. I'm aware with Google cloud KMS, and AWS KMS, but I don't want to handle with that platform.
How to manage this generated ...
3
votes
0
answers
122
views
How to encrypt in a client side (Android) and decrypt in a server side (PHP) with "Tink"
I have used this demo for the Android side.
In my case, I want to set this encrypt and decrypt process in the REST API. if someone has API through the reverse process(decompile) of Apk and call this ...
11
votes
2
answers
2k
views
Key construction in Tink for KeysetHandle
The following lines show how to generate a key in Tink:
keysetHandle=KeysetHandle.generateNew(AeadKeyTemplates.AES128_GCM)
privateKeysetHandle = KeysetHandle.generateNew(SignatureKeyTemplates....
-1
votes
1
answer
455
views
AdMob Server Side Validation for Video Reward
I need to verify the video reward of a user on the server, I'm using Google's Admob and as the documentation found on their website I can't find anything that could help me doing that kind of stuff, ...