Questions tagged [tink]

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

48 questions
11
votes
2 answers

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.ECDSA_P256) Could you show me how to construct a key…
Ursa Major
  • 803
  • 6
  • 20
  • 46
8
votes
1 answer

How to create symmetric encryption key with Google Tink?

I have a key (say) "thisist0psecret" that I want to use as a symmetric encryption/decryption key with the Google Tink library. I am baffled that I am unable to do this simple thing. I can generate new keys (using various templates AES128_GCM,…
Will P.
  • 81
  • 1
  • 4
6
votes
3 answers

How to easily encrypt and decrypt a String using Tink?

Until now, I was using jasypt to encrypt a string before storing it on disk on app closing, and later when opening the app for decrypt the string after retrieving it from disk. It was super easy with jasypt, this was the code: private static final…
NullPointerException
  • 32,153
  • 66
  • 194
  • 346
6
votes
4 answers

Google/Tink: How use public key to verify signature

We want to use the Tink library in our project to be able to verify some incoming signatures given a public key. What we have are the following: The public key as a string The signature itself The plaintext After going through Tink's…
Alex Ntousias
  • 8,264
  • 7
  • 34
  • 46
4
votes
3 answers

Google Tink: How to get raw key string from a KeysetHandle?

I am new to Tink and would like to extract the raw key data(in String form) from KeysetHandle which I generated like this: keysetHandle = KeysetHandle.generateNew( AeadKeyTemplates.AES128_GCM); Or maybe some other API to get…
Manish Kumar Sharma
  • 11,112
  • 7
  • 50
  • 86
4
votes
2 answers

Password encryption using google/tink

Good day, I have used google/tink to encrypt a password for storing in a DB using these steps : // 1. Generate the key material. KeysetHandle keysetHandle = KeysetHandle.generateNew(AeadKeyTemplates.AES128_GCM); // 2. Get the primitive. Aead…
Manish Mehta
  • 289
  • 2
  • 12
3
votes
1 answer

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 Python? I was hoping that Tink library provides some…
Fedor
  • 1,149
  • 1
  • 14
  • 27
3
votes
0 answers

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 API anyhow so I want to secure this process…
Pankaj Savaliya
  • 121
  • 1
  • 2
  • 9
3
votes
1 answer

Android - NullPointerException in android.security.IKeystoreService.del for Huawei devices

When uploading our app to the Google Play store, google's pre-launch report indicates that the app is crashing with a null pointer exception. The issue is regarding KeyStore implementation in Huawei devices only. Stacktrace: Fatal Exception:…
Rajesh
  • 12,393
  • 4
  • 47
  • 76
2
votes
1 answer

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": { "typeUrl": "type.googleapis.com/google.crypto.tink.AesGcmKey", …
user3776598
  • 406
  • 5
  • 17
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
  • 177
  • 9
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
  • 121
  • 1
  • 2
  • 9
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
  • 265
  • 4
  • 15
1
vote
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
  • 200
  • 6
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
  • 3
  • 11
1
2 3 4