Closed Rudranand closed 2 years ago
Hi @Rudranand, in principle, I don't see anything wrong with the code snippet you provided. Without any more context I am not sure I can help. What I can suggest is trying to use https://github.com/google/tink/tree/master/examples/python/encrypted_keyset to decrypt the keyset (it assumes a different primitive, but the decryption step should work assuming you are using Cloud KMS).
Note: I noticed the Python example uses a constant named SIGN_PRIVATE_KEYSET_PATH_V2
while the Java example SIGN_PRIVATE_KEYSET_PATH
.
Hi @morambro, thanks for the reply, I have resolved the error it was related to the root.pem
.
I am using kms to generate digital signature private keyset using tinkey. How I can read that keyset to sign the data. I have done that in java in this way
I was try to do this in python in this way
it's throwing error
2022-04-13 14:34:29,369 [Thread-10 ] [ERROR] ('Decryption failed.',) ERROR:root:Decryption failed. 2022-04-13 14:34:29,370 [Thread-10 ] [ERROR] Decryption failed.