Re: CryptDecrypt wrong key

From: Jack (jackabcd_0076_at_yahoo.com)
Date: 03/04/05

  • Next message: Jack: "Re: Behavior when multiple access to one key container"
    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?


  • Next message: Jack: "Re: Behavior when multiple access to one key container"

    Relevant Pages

    • RE: CryptDecryptMessage vs CryptDecrypt
      ... decrypt (or encrypt) raw RSA. ... DATA encryption / decryption. ... encrypted "raw" data through function CryptDecrypt. ...
      (microsoft.public.platformsdk.security)
    • RE: CryptDecrypt wrong key
      ... it is recognized as wrong decryption. ... (ie. after applying the RSA exponentiation with the private key). ... highly unlikely that with the wrogn decryption key the format would be ... CryptDecrypt would return error. ...
      (microsoft.public.platformsdk.security)
    • Re: Name this key exchange
      ... RSA is faster than DH at encryption and slower at decryption. ... Bob generates a secret by choosing a random number r and setting ...
      (sci.crypt)
    • Re: Encrypting using RSA private Key
      ... the answer is YES but only if you rewrite the rsa algo:-D ... encryption: ... decryption: M=C^D mod N ... Is it possible to encrypt using the RSA private key and decrypt using the ...
      (microsoft.public.dotnet.security)
    • Re: ASN1 bad tag value met on EnvelopedData.Decrypt str
      ... > for decrypting RSA encrypted blob you have to know how it is encoded (i.e. ... > too many traps that you can step into if you simply try using plain RSA ... > - RSA encryption doesn't change Jacobi symbol. ... Using low decryption exponent (in attempt ...
      (microsoft.public.platformsdk.security)