1

"Keyset does not exist". I know that there are tons of question about this error, but mine is totally different.

I'm not gona use the key from windows certificate store, but load the public key & private key from 2 bare strings, using method "fromXMLString".

rsa.fromXMLString "<RSAKeyValue><Modulus>......"

then

rsa.SignData buffer, algSHA1

and Booom! : "Keyset does not exist"

Can someone please tell me that using the rsa key pair from 2 xmlStrings is innocent and it entirely does not relate to windows certificate store? I have my own approach of storing & loading certificate/keys.

PS: The other answers for questions on this error told questioner to set correct permission for private key in cert-store. But in my case, I used no private key file in that store, right ?

4
  • And I assume you used the ToXMLString function for those bare strings?
    – schroeder
    Commented Feb 25, 2014 at 22:05
  • I've tried it that way, but here I have these 2 strings from some conversions. I'm sure that the 2 keys are correct cause they do the encrypt/decrypt stuffs well. Just the sign stuff is stucking.
    – David Tran
    Commented Feb 26, 2014 at 3:20
  • 3
    I’m voting to close this question because it's about how to use a programming interface, not about the security of this interface. Commented Nov 3, 2020 at 11:07
  • 1
    This question should be tagged with a programming language/library, and asked on SO.
    – CBHacking
    Commented Mar 3, 2021 at 5:52

1 Answer 1

0

I met the same problem, and I find solution now. You need use the same rsa that you used to generate the signature to generate a public key and provite key for all to use, then use this public Key & private key for all other action: encrypt,decrypt,verify, you will not see this error.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .