LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices

Reply
 
Search this Thread
Old 09-17-2008, 01:07 PM   #1
leedude
Member
 
Registered: Jan 2007
Location: Scotland
Distribution: Fedora, Debian
Posts: 81

Rep: Reputation: 15
asymmetric key cryptography


Specifically, how does it work?
i know the theory:
alice makes a random number, and makes a public key and a private key from it.
alice sends the public key to bob.
bob encrypts the data with the key, and sends it to alice.
alice decrypts the data with the private key.

how are these keys generated?
for instance, say i wanted to encrypt 23, 45, 12, 35.
How would i generate the public(encryption) key and the private(decryption) key, given the random number 45436, so that the private key couldn't be derived somehow from the public one?
What is a key generation function like?


im not big on maths, but i understand modular arithmetic/calculus(a bit).


This is bugging me.
Lee.

Last edited by leedude; 09-17-2008 at 01:19 PM.
 
Old 09-17-2008, 01:32 PM   #2
w3bd3vil
Senior Member
 
Registered: Jun 2006
Location: Hyderabad, India
Distribution: Fedora
Posts: 1,189

Rep: Reputation: 49
You could build your own algorithm for this, but its not all easy to build anything related to crypto which as cryptic as the current algos. If you want to have a look at how stuff is done refer to RSA module in perl. Should provide an insight.

Heres a link
You could also refer the sources of OpenPGP, which is used for email.
 
Old 09-17-2008, 01:40 PM   #3
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,240

Rep: Reputation: 121Reputation: 121
(Google is your friend)

Unfortunately, if you're not big on math, then you're just going to have to accept that it works. On a high level, I can sort of understand Diffie-Hellman, which is probably the textbook case, but only if I apply myself to it.

You can find an explanation of DH here:
http://en.wikipedia.org/wiki/Diffie-Hellman.

You can find the general case of asymmetric cryptography here:
http://en.wikipedia.org/wiki/Public-key_cryptography.
 
Old 09-17-2008, 02:57 PM   #4
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
Note this key phrase from the wiki:
Quote:
The keys are related mathematically, but the private key cannot be practically derived from the public key.
This suggests to me that with enough computing power you can do it.
 
Old 09-17-2008, 03:17 PM   #5
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,240

Rep: Reputation: 121Reputation: 121
Quote:
Originally Posted by H_TeXMeX_H View Post
Note this key phrase from the wiki:

Quote:
The keys are related mathematically, but the private key cannot be practically derived from the public key.
This suggests to me that with enough computing power you can do it.
When they say practically, they really mean it's not practical to bother trying to brute-force a modern crypto algorithm. Here's a good link for past and current massively-distributed cracking projects.

http://www.distributed.net/rc5/
 
Old 09-19-2008, 04:58 AM   #6
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,261

Rep: Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028
Here's a good handbook : http://www.gnupg.org/gph/en/manual.html
 
Old 09-19-2008, 06:47 AM   #7
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
Quote:
Originally Posted by Quakeboy02 View Post
When they say practically, they really mean it's not practical to bother trying to brute-force a modern crypto algorithm. Here's a good link for past and current massively-distributed cracking projects.

http://www.distributed.net/rc5/
Yup, it certainly will take a long time, unless you have a cluster of supercomputers or something.
 
Old 09-19-2008, 08:12 AM   #8
sundialsvcs
Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 5,324

Rep: Reputation: 1099Reputation: 1099Reputation: 1099Reputation: 1099Reputation: 1099Reputation: 1099Reputation: 1099Reputation: 1099
Public-key (asymmetric-key) cryptography is normally used just for keying systems. This is the initial-handshake that takes place when the two communicating systems are deciding upon (or the sender wishes to convey...) the private (symmetric) key that is to be used for a particular message. That private key is chosen randomly.

By sending each message in a randomly-chosen private key, encryption can occur very fast (the math is simple...) and the key used to encrypt each message is now unique. That portion of the message which carries the per-message keying information is very small and unpredictable.

When someone wants to "bust a key," they're not going to bother doing a brute-force search anyway. They're going to use some kind of a wedge: theft, break-in, torture, the expected characteristics of the message itself, guesses about the key ("it's a dictionary word...") and so-on.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: OpenSSH with Public Key Cryptography Tutorial LXer Syndicated Linux News 0 10-13-2006 08:03 AM
Cryptography wwnexc Linux - Security 1 03-29-2006 08:21 PM
Cryptography Libraries makk0 Programming 4 09-21-2004 10:57 PM


All times are GMT -5. The time now is 02:32 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration