views:

58

answers:

2

I need to generate a 64 bit public-private key pair but can't find out any standard algorithm....... How do I do that? Someone please reply asap

+1  A: 

When you say public-private key pair, you imply that you are talking about asymmetric cryptography. Key sizes here are normally much much bigger than this - 512 bit or 1024 bit are common. If you are actually talking symmetric cryptography, then just randomly generate a 64 bit number (and, if you are using an algorithm like DES/3DES, check it against known weak keys for the algorithm).

David M
I need to use asymmetric cryptography for a mobile application so it won't be feasible to store 512 bit key on a mobile, that is why i am looking for a 64 bit key...Is there a way to manually bring down the key size to 64 bit..P.S.-I am new to the field of cryptography
sourabh0612
Can you explain why you can't store more than 64bits?
mdma
No. Why can't you store 512 bits on a mobile? Your average text message is far longer than this... If you are new to cryptography, suggest you find a library that does it for you rather than try to learn it for your project.
David M
it is so because in the application a situation may occur,though it would be very rare, in which the user might have to save the public keys of others manually
sourabh0612
Let's get this straight. 512 bits = 64 bytes. My name, two phone numbers and email address = 58 bytes. Where is the problem with storing 512 bits? I just don't see it.
David M
there is no problem in storing the public key. The problem is that if a situation arises in which the user has to enter the public manually corresponding to a contact then it would not be practically feasible to enter a 512 bit key
sourabh0612
A: 

Offhand, I can't think of a public-key cryptography algorithm that would be even somewhat secure with only a 64-bit key. RSA is by far the most common, but for it a 512 bit key is on the small side. Elliptical curve cryptography doesn't require as large of keys as most other public-key algorithms, but even so you typically need somewhere in the range of 150-200 bits.

Jerry Coffin