LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Closed Thread
  Search this Thread
Old 08-14-2002, 03:43 PM   #16
Ionized
Member
 
Registered: Jul 2002
Location: Chicago Suburbs
Distribution: Slackware 8.0
Posts: 51

Rep: Reputation: 15

For the math side of this....does it matter what number e is as long as it's relatively prime to phi?

Also, I thought that to calculate d you use the formula (e*d - 1) (mod phi) = 0. I've been trying to figure this out using small prime numbers, but I can't quite figure it out...
 
Old 08-14-2002, 07:44 PM   #17
TruckStuff
Member
 
Registered: Apr 2002
Posts: 498

Rep: Reputation: 30
Quote:
Originally posted by tyler_durden


thats helpful.

here, to understand why it works you prolly need to do a little brushing up on some math. specifically, (and this isn't spelled right) phi is oliers totent funcion or the number of prime numbers less then n (its more complicated, but thats the basic idea). (and ^ means to the power)

Select two primes p and q
Calculate n = p q
Calculate phi(n) = (p-1)(q-1)
Select e such that 1 < e < phi(n) and gcd(phi(n),e) = 1
Calculate d = e(^-1) mod phi(n)
Public key KU = {e,n}
Private key KR = {d,n}

to encrypt you take plaintext ^ (e) mod n, and to decrypt you take cryptext ^(d) mod n =>plaintext

given e, in order to find d you need phi, which is really hard to find without knowing p or q.
Show off.....
 
Old 08-14-2002, 10:50 PM   #18
tyler_durden
Member
 
Registered: May 2001
Posts: 125

Rep: Reputation: 15
Quote:
Show off.....
yah, you can tell when i get bored at work. plus, it was better then posting rsasecurity.com

Quote:
does it matter what number e is as long as it's relatively prime to phi?
nope. alot of people use something like 2^32 +1 or something (i don't really remember) becuase its faster to do the calculations

Quote:
Also, I thought that to calculate d you use the formula (e*d - 1) (mod phi) = 0. I've been trying to figure this out using small prime numbers, but I can't quite figure it out...
i don't remember. i think you want to solve e*d = 1 (mod phi) using the euclidean, but i don't remember how.
if you drop me an email if you really want to know, i can look through my notes and remember how to do that. ouch, its been a while. it may take me a few days to get back to you.
 
Old 06-28-2008, 04:11 AM   #19
mideast
LQ Newbie
 
Registered: Jun 2008
Posts: 1

Rep: Reputation: 0
factorization of a large number

hallo guys

could anybody find the prime numbers of the following number
376781096648655171476075046480384036003069767135878367046892404899787642486409
?
 
Old 06-28-2008, 06:12 PM   #20
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Quote:
Originally Posted by mideast View Post
hallo guys

could anybody find the prime numbers of the following number
376781096648655171476075046480384036003069767135878367046892404899787642486409
?
I'm closing this. Please do not resurrect dead threads. Maybe open a new thread for your question in the General forum. And I would suggest you make sure to provide some background about where your question is coming from unless you want to risk having your thread closed on the suspicion that it's a homework question.
 
  


Closed Thread



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
C Prime Generator Chrax Programming 9 12-23-2004 01:02 AM
c++ prime numbers loop problem muddlnx Programming 6 08-31-2004 10:14 PM
Adding numbers, break on non-numbers... Cruger Programming 1 03-22-2004 09:18 AM
Algo for Relatively prime No. LinuxTiro Programming 5 11-17-2003 09:02 PM
mersenne prime number zetsui Linux - Software 3 08-23-2003 01:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 05:09 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration