|
security
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Encrypting short data w/ asymmetric cipherHi, I have some C# code to encrypt a small amount (128 bits) of data using RSA (it uses the RSACryptoServiceProvider). However, the ciphertext generated is 1024 bits. (Of course, when I use AES to do the same thing, the ciphertext is 128 bits.) This may be a limitation of RSA, in general---I don't know. Is there a way to get the MS RSA implementation to generate encrypted data that is the same size as the plaintext? Is there another asymmetric cipher supported by MS that will yield ciphertext that is the same size as the plaintext? In my case, I need 128 bit values that, when encrypted, are still 128 bits.
Thanks! ----------------------- Posted by a user from .NET 247 (http://www.dotnet247.com/) <Id>l7vcrz1Us0iTH8SWrERULQ==</Id> Hi,
RSA ciphertext is always the same size as the size of the key. ElGammal chiphertext is two times as big as the size of key, Cramer-Shoup is three times as big... For shorter size of ciphertext blocks with asymmetric encryption you can ECC schemes (ex. generic ElGammal with ECC has ciphertext size ~ keysize*2 . i.e. with 164 bit ECC key it will be 328 bit cipher text) or NTRUEncrypt - that could give cipher blocksize something around 300 bits (I'm not quite sure about exact blocksize). AFAIK - none of existing asymmetric encryption schemes could give you block size that you are after. -Valery. http://www.harper.no/valery "Henry Pootel via .NET 247" <anonym***@dotnet247.com> wrote in message Hi, I have some C# code to encrypt a small amount (128 bits) of data using news:OA167jUWFHA.1224@TK2MSFTNGP10.phx.gbl... RSA (it uses the RSACryptoServiceProvider). However, the ciphertext generated is 1024 bits. (Of course, when I use AES to do the same thing, the ciphertext is 128 bits.) This may be a limitation of RSA, in general---I don't know. Is there a way to get the MS RSA implementation to generate encrypted data that is the same size as the plaintext? Is there another asymmetric cipher supported by MS that will yield ciphertext that is the same size as the plaintext? In my case, I need 128 bit values that, when encrypted, are still 128 bits. Thanks! ----------------------- Posted by a user from .NET 247 (http://www.dotnet247.com/) <Id>l7vcrz1Us0iTH8SWrERULQ==</Id>
Basic question about Public Private Key Pairs
ASP.NET Uploading Security Issue? WindowsIdentity role caching in ASP.NET IsInRole groupname with white space. How to protect data in executable file? Check for certian privileges Restricting Upload File Types Possible security error loading an Xsl? Impersonation code Forms authentication fails on Windows XP PRO |
|||||||||||||||||||||||