LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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


Reply
  Search this Thread
Old 04-30-2013, 06:04 PM   #1
MrUmunhum
Member
 
Registered: May 2006
Location: Mt Umunhum, CA, USA, Earth
Distribution: Debian/ Fedora/ Ubuntu/ Raspbian
Posts: 549

Rep: Reputation: 40
Generating the same Symmetric Key without using random seed


Hi group,

I have a C program that does peer to peer functions. I am using RSA PKI to encrypt the packets. I need to be able to generate the same PKI keys on both machines. So I don't want to use a random seed. RSA_generate_key() calls random. Is there another API I can use that does not use random?

Thanks for your time.
 
Old 05-01-2013, 07:07 AM   #2
Gullible Jones
Member
 
Registered: Apr 2011
Posts: 142

Rep: Reputation: 10
Wouldn't it be better to use the public-key encryption to send a common (random) passphrase, and then use symmetric encryption for the data itself? IIRC this is how SSL works.

(DISCLAIMER: I'm a total newbie at the moment. Take everything I say with several grains of salt.)
 
Old 05-01-2013, 08:10 AM   #3
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
Just save yourself a lot of trouble and set up a VPN connection or an SSH tunnel between the two machines ... using digital certificates to secure the link.

If you are using PKI and feel the need to have "identical keys on both machines," you're missing the entire point ... barking up the wrong tree, as they say. Step back from your strategy and take a closer look. Or, describe what you're doing on this forum so that others can help you to use PKI more effectively.

Basically ... I think that you shouldn't have to "cobble up your own" solution here. (Actum Ne Agas: Do Not Do A Thing Already Done.™) And that, if for some reason you do, you're definitely not using PKI in the manner that its designers intended. Don't keep banging your head against this problem, because it's the wrong problem.
 
1 members found this post helpful.
  


Reply



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
Random Seed. What is it? cwizardone Slackware 6 03-24-2007 05:39 AM
Creating random seed different for different processors tsakunthala Programming 1 01-05-2007 11:33 AM
system hanging on 'Saving random seed' PennyroyalFrog Linux - Newbie 9 10-01-2005 02:45 PM
Kernel panic while saving random seed SAnton Linux - Software 1 09-27-2005 03:01 AM
using /dev/(u)random for seed ? PTBmilo Programming 2 04-15-2003 01:19 AM

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

All times are GMT -5. The time now is 05:39 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