Re: RSA Encryption



Just to confirm, this 128 byte limit is not the limit of C# or .net,
this is a limit set by the RSA 1024 bit algorithm. Am I making the
right statement here?


Thanks

William Stacey [MVP] wrote:
> That is what I was saying. You can't actually encrypt 128 because of the
> padding. Maybe you can if no padding is used, but not sure. It is key size
> related, so a larger key can encrypt more bytes. But normally you will want
> a symmetric encryption for large amounts of data.
>
> --
> William Stacey [MVP]
>
> "no game" <xiangliang@xxxxxxxxxxx> wrote in message
> news:1120158831.054683.76500@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> > For RSA 1024 bit encryption,
> >
> > Is it mean the output number of byte is always 128 bytes, and you can
> > not encrypt more than 128 bytes of data.
> >
> > Thanks
> >
> > William Stacey [MVP] wrote:
> >> The 117 byte limit is related to the size of the Asymetric key size. You
> >> can only encrypt in block of something < key size depending on what
> >> padding
> >> is being used. However, most use a faster symmetric algo like AES
> >> (Rijindael) then encrypt the key and IV with an RSA symmetric key.
> >> --
> >> William Stacey [MVP]
> >>
> >> "no game" <xiangliang@xxxxxxxxxxx> wrote in message
> >> news:1119990515.967299.264100@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> >> > Can I encrypt data more than 117 bytes in C# (can use CAPICOM and
> >> > Crypto API libraries) using RSA 1024 bit.
> >> >
> >> > Any sample code would be appreciated.
> >> >
> >> > Thanks
> >> >
> >

.



Relevant Pages

  • Re: Asp.net 2.0 deployment with encryption
    ... I guesss I will create a rsa key on the production server. ... Export the public xml/key to a common location on some server. ... As for the ASP.NET 2.0 configuration section protection, ... encryption which use a single shared session key to encrypt and decrypte ...
    (microsoft.public.dotnet.framework.aspnet)
  • RSA padding questions
    ... encrypted using RSA and standard OAEP ... padding, ... still produces the same ciphertext 'c'? ... and then have 'm1' be any gibberish random text that would encrypt to ...
    (sci.crypt)
  • Re: What is exponent?
    ... For simple description of RSA algorithm ... I also have the receiver's certificate (public key only). ... Use RSA to encrypt the session key ...
    (microsoft.public.dotnet.security)
  • Re: Decrypt RSA using D
    ... We are planning on using RSA with WSE, so it only uses RSA to encrypt the symmetric key used for the SOAP body--the same scenario you outlined below. ... owner of the private key can decrypt it. ... always embedded inside the CSP key container and never passed out into the ...
    (microsoft.public.dotnet.framework)
  • Re: Java, MSCAPI interoperability - newbie
    ... A good solution (analogous to enveloped email) is to have the two parties have ... Then you can leverage RSA key-exchange protocol very easily. ... data with random symmetric key and encrypt the symmetric key with their local private RSA key ...
    (microsoft.public.platformsdk.security)