Re: CryptDecrypt wrong key
From: Jack (jackabcd_0076_at_yahoo.com)
Date: 03/04/05
- Previous message: Martijn Laan: "Re: SE_REGISTRY_WOW64_64KEY?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Fri, 4 Mar 2005 10:12:29 +0100
but which error code to return?
there is no errror code defined for this case!
"lelteto" <lelteto@discussions.microsoft.com> schrieb im Newsbeitrag
news:1D2E55E4-88B0-4162-8930-E8BCA932CC07@microsoft.com...
> 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?
- Previous message: Martijn Laan: "Re: SE_REGISTRY_WOW64_64KEY?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|