Home All Groups Group Topic Archive Search About

very short public key encryption

Author
1 Feb 2006 1:46 PM
Lloyd Dupont
I would like to (if possible) shuffle my licence key data with a public key
encryption algorithm.
Basically I wonder if it's possible to use buffer of 8 bytes long for my
data.

I did a quick test with RSA (below) but it (apparently) used 128 bytes long
buffer.

Any tips?

----- T.cs -----
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.Globalization;
using System.IO;
using System.Text;
using System.Security.Cryptography;

// csc /nologo T.cs && t
class RSACSPSample
{

static void Main()
{
  byte[] data = new byte[] { 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14};


  RSACryptoServiceProvider rsa = new RSACryptoServiceProvider();

  byte[] crypted = rsa.Encrypt(data, false);
  byte[] decrypt = rsa.Decrypt(crypted, false);

  Console.WriteLine("Crypted length "+crypted.Length);
  Console.WriteLine("Decrypted length "+decrypt.Length);
  foreach(byte b in decrypt)
   Console.Write("{0} ", b);
  Console.WriteLine();
}
}


--
I have taken a vow of poverty. If you want to really piss me off, send me
money.

Author
1 Feb 2006 9:14 PM
Valery Pryamikov
8 bytes (64 bits) is TOO SHORT EVEN FOR SYMMETRIC ENCRYPTION algorithms.
For asymmetric algorithms - elliptic curves gives one of the shortes keys
(the most efficient attack on ecc is fully exponential), but somewhat more
or less secure ecc keys starts after 140 bits, and you really should use
more than 160 bits for real security. NTRU also has rather short public
keys, however I know very little about NTRU (it's patented).
As about RSA with subexponential factoring algoritms - Jason Papodopoulous'
implementation of the self intialising quadratic sieve (msieve) manages to
factor 200 bits number in about 30 seconds on my 1.6 MHz Centrino laptop.

-Valery.
http://www.harper.no/valery

Show quote
"Lloyd Dupont" <net.galador@ld> wrote in message
news:%23s1ZZXzJGHA.516@TK2MSFTNGP15.phx.gbl...
>I would like to (if possible) shuffle my licence key data with a public key
>encryption algorithm.
> Basically I wonder if it's possible to use buffer of 8 bytes long for my
> data.
>
> I did a quick test with RSA (below) but it (apparently) used 128 bytes
> long buffer.
>
> Any tips?
>
> ----- T.cs -----
> using System;
> using System.Collections.Generic;
> using System.Drawing;
> using System.Drawing.Imaging;
> using System.Globalization;
> using System.IO;
> using System.Text;
> using System.Security.Cryptography;
>
> // csc /nologo T.cs && t
> class RSACSPSample
> {
>
> static void Main()
> {
>  byte[] data = new byte[] { 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14};
>
>
>  RSACryptoServiceProvider rsa = new RSACryptoServiceProvider();
>
>  byte[] crypted = rsa.Encrypt(data, false);
>  byte[] decrypt = rsa.Decrypt(crypted, false);
>
>  Console.WriteLine("Crypted length "+crypted.Length);
>  Console.WriteLine("Decrypted length "+decrypt.Length);
>  foreach(byte b in decrypt)
>   Console.Write("{0} ", b);
>  Console.WriteLine();
> }
> }
>
>
> --
> I have taken a vow of poverty. If you want to really piss me off, send me
> money.
>
>
Author
2 Feb 2006 5:42 AM
Lloyd Dupont
Allright...
I will stay with TEA then ;-)
http://www.ftp.cl.cam.ac.uk/ftp/papers/djw-rmn/djw-rmn-tea.html

--
Regards,
Lloyd Dupont

NovaMind development team
NovaMind Software
Mind Mapping Software
<www.nova-mind.com>
Show quote
"Valery Pryamikov" <val***@harper.no> wrote in message
news:upKlYS3JGHA.1424@TK2MSFTNGP12.phx.gbl...
>8 bytes (64 bits) is TOO SHORT EVEN FOR SYMMETRIC ENCRYPTION algorithms.
> For asymmetric algorithms - elliptic curves gives one of the shortes keys
> (the most efficient attack on ecc is fully exponential), but somewhat more
> or less secure ecc keys starts after 140 bits, and you really should use
> more than 160 bits for real security. NTRU also has rather short public
> keys, however I know very little about NTRU (it's patented).
> As about RSA with subexponential factoring algoritms - Jason
> Papodopoulous' implementation of the self intialising quadratic sieve
> (msieve) manages to factor 200 bits number in about 30 seconds on my 1.6
> MHz Centrino laptop.
>
> -Valery.
> http://www.harper.no/valery
>
> "Lloyd Dupont" <net.galador@ld> wrote in message
> news:%23s1ZZXzJGHA.516@TK2MSFTNGP15.phx.gbl...
>>I would like to (if possible) shuffle my licence key data with a public
>>key encryption algorithm.
>> Basically I wonder if it's possible to use buffer of 8 bytes long for my
>> data.
>>
>> I did a quick test with RSA (below) but it (apparently) used 128 bytes
>> long buffer.
>>
>> Any tips?
>>
>> ----- T.cs -----
>> using System;
>> using System.Collections.Generic;
>> using System.Drawing;
>> using System.Drawing.Imaging;
>> using System.Globalization;
>> using System.IO;
>> using System.Text;
>> using System.Security.Cryptography;
>>
>> // csc /nologo T.cs && t
>> class RSACSPSample
>> {
>>
>> static void Main()
>> {
>>  byte[] data = new byte[] { 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14};
>>
>>
>>  RSACryptoServiceProvider rsa = new RSACryptoServiceProvider();
>>
>>  byte[] crypted = rsa.Encrypt(data, false);
>>  byte[] decrypt = rsa.Decrypt(crypted, false);
>>
>>  Console.WriteLine("Crypted length "+crypted.Length);
>>  Console.WriteLine("Decrypted length "+decrypt.Length);
>>  foreach(byte b in decrypt)
>>   Console.Write("{0} ", b);
>>  Console.WriteLine();
>> }
>> }
>>
>>
>> --
>> I have taken a vow of poverty. If you want to really piss me off, send me
>> money.
>>
>>
>

AddThis Social Bookmark Button