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
2
votes
1 answer

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 authentication to be used. private static MasterKey…
zjmo
  • 625
  • 2
  • 8
2
votes
2 answers

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 androidx.security:security-crypto:1.0.0-alpha02 library…
mcfisty
  • 187
  • 10
2
votes
1 answer

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 Android Keystore private key for both (client,…
Pankaj Savaliya
  • 141
  • 1
  • 2
  • 11
1
vote
1 answer

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.printStackTrace(); } This is throwing an…
feroze
  • 7,380
  • 7
  • 40
  • 57
1
vote
0 answers

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 successful response. However, I am receving an the error…
1
vote
1 answer

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 the key tha KeysetHandle uses here?
P basak
  • 4,874
  • 11
  • 40
  • 63
1
vote
1 answer

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 (i.e. generated DEK by tink that will be encrypted…
1
vote
1 answer

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"; try { DeterministicAeadConfig.register(); …
Tanmoy
  • 11
  • 3
1
vote
0 answers

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 figure out how to convert an already existing…
Nomad
  • 313
  • 2
  • 4
  • 18
1
vote
0 answers

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 or example for how we can manage or share key…
Deepak
  • 127
  • 4
  • 11
1
vote
1 answer

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 errors. All Input files whether 2 MB or more than 10…
1
vote
0 answers

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 Envelope Encryption. Currently I have a Python…
HDW
  • 308
  • 2
  • 14
1
vote
1 answer

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 library with the example of Java…
1
vote
2 answers

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 info (of the previous one). Since I'm new to…
Termin4t0r
  • 199
  • 3
  • 10
1
vote
1 answer

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 getOrGenerateNewKeysetHandle(): KeysetHandle { …
marsuser
  • 125
  • 9