RE: CryptDecrypt wrong key
From: lelteto (lelteto_at_discussions.microsoft.com)
Date: 02/25/05
- Next message: lelteto: "RE: How to add a friendly name to a certificate"
- Previous message: Anthony Hunter: "Getting the SID for the Administrators group"
- In reply to: Peodor: "CryptDecrypt wrong key"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Fri, 25 Feb 2005 08:47:11 -0800
Yes, it is recognized as wrong decryption. The reason is that the encrypted
data is FORMATTED (see PKCS #1) and this format is checked after decryption
(ie. after applying the RSA exponentiation with the private key). It is
highly unlikely that with the wrogn decryption key the format would be
correct. So yes, CryptDecrypt would return error (FALSE).
Laszlo Elteto
SafeNet, Inc.
"Peodor" wrote:
> Hi,
>
> Assume something is RSA public key encrypted with CryptEncrypt.
>
> What happens if WRONG RSA private key is supplied when it is decrypted with
> CryptDecrypt?
> Is it detected that wrong key is supplied?
> Is true or false returned? Last error?
- Next message: lelteto: "RE: How to add a friendly name to a certificate"
- Previous message: Anthony Hunter: "Getting the SID for the Administrators group"
- In reply to: Peodor: "CryptDecrypt wrong key"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|