rsacsp decrypt error

From: Tim Wallace (twallace-ThisDoesNotBelong-AT-emailDOTcom)
Date: 09/16/05


Date: Fri, 16 Sep 2005 16:54:27 -0400

I'm afraid I'm quite the novice when it comes to using encryption. I've run
into the following problem. I am using an instance of
RASCryptoServiceProvider to encrypt 30 text character in one application,
then sending that value via socket to another application where I try to
decrypt. I am getting an error that I'm sure will be straightforward to
someone, just not me. Here is the error message I catch: "The data to be
decrypted exceeds the maximum for this modulus of 128 bytes."

I created my key pair as follows:

    CspParameters cp = new CspParameters();
    cp.KeyContainerName = "some_container_name";
    RSACryptoServiceProvider rsa = new RSACryptoServiceProvider(cp);

I attempt to decrypt using the same key pair, but receive the error above.
Can anyone shed some light as to what is possibly going wrong? I only need
to decrypt small amounts of data for now (256 characters or less).
Thanks:
Tim



Relevant Pages

  • Re: any compiler that takes encrypted input
    ... character value i.e. character 'a' becomes 'a'+10 th character in the ... I am taking the case of easiest way of encryption. ... Additionally, in the scheme you are proposing, the key to decrypt the ... If this is the point where you indicate that "of course" the algorithm ...
    (comp.lang.c)
  • Re: Encrypt/decrypt problem
    ... I didn't mean I wanted to encrypt/decrypt Chinese character. ... decrypt back to orignal. ... I also tried other encryption FLL but result was the same. ... the encrypted string generated from _crypt.vcx looks like gabage ...
    (microsoft.public.fox.programmer.exchange)
  • Re: can the administrator of the exchange server view all the emails?
    ... If you don't have the key pair to decrypt the message, ... If encryption is necessary to secure the message contents ... then do the encryption at the gateway, ...
    (microsoft.public.exchange.admin)
  • How do I Use DPAPI to Encrypt and Decrypt Data (C#/VB.NET)?
    ... Use DPAPI to Encrypt and Decrypt Data ... The code below demonstrates how to call Data Protection API (DPAPI) ... In addition to encryption and decryption, ... public static string Encrypt ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Byte array to string and back - newbie question
    ... // Create a symmetric algorithm. ... This is done to make encryption more ... // Encrypt a string into a string using a password ... // Decrypt a byte array into a byte array using a key and an IV ...
    (microsoft.public.dotnet.framework.aspnet.security)