generating rsa public and private key pairs in cpp

generating rsa public and private key pairs in cpp

Post by the_unwanted on Fri May 10, 2013 3:54 pm
([msg=75534]see generating rsa public and private key pairs in cpp[/msg])

i need to generate public and private key pairs for wireless nodes in a network
i need to deploy a programm that produces rsa public and private key for wireless nodes in a netwok so that they can send signed messages to other nodes
im using network simulator 3 NS-3 for testing my new protocol but i am stuck at generating key pairs
since mac address is different for different nodes . can we can generate unique keys for a particular node based on mac address(as a seed may be) ?,so that generated keys doesnt conflict with other node keys
but i dont know how to do that
the algorithm (programm) deployed on every node should generate key pairs for that node
can u guys help me solving this problem ?
ps: using CPP
the_unwanted
New User
New User
 
Posts: 5
Joined: Wed Jan 19, 2011 11:39 am
Blog: View Blog (0)


generating rsa public and private key pairs in cpp

Post by the_unwanted on Fri May 10, 2013 4:01 pm
([msg=75535]see generating rsa public and private key pairs in cpp[/msg])

i need to generate public and private key pairs for wireless nodes in a network
i need to deploy a programm that produces rsa public and private key for wireless nodes in a netwok so that they can send signed messages to other nodes
im using network simulator 3 NS-3 for testing my new protocol but i am stuck at generating key pairs
since mac address is different for different nodes . can we can generate unique keys for a particular node based on mac address(as a seed may be) ?,so that generated keys doesnt conflict with other node keys
but i dont know how to do that
the algorithm (programm) deployed on every node should generate key pairs for that node
can u guys help me solving this problem ?
ps: using CPP
the_unwanted
New User
New User
 
Posts: 5
Joined: Wed Jan 19, 2011 11:39 am
Blog: View Blog (0)


Re: generating rsa public and private key pairs in cpp

Post by -Ninjex- on Fri May 10, 2013 4:42 pm
([msg=75537]see Re: generating rsa public and private key pairs in cpp[/msg])

I really wouldn't know how to do this, and your post was a bit hard to understand, but I think maybe using born again shell scripting might help or be able to do the trick.
If you're not willing to learn, no one can help you. If you're determined to learn, no one can stop you.⠠⠵
The absence of evidence is not evidence of absence.
I can explain it for you, but I can't understand it for you.
User avatar
-Ninjex-
Addict
Addict
 
Posts: 1308
Joined: Sun Sep 02, 2012 8:02 pm
Blog: View Blog (0)


Re: generating rsa public and private key pairs in cpp

Post by -Ninjex- on Fri May 10, 2013 7:51 pm
([msg=75540]see Re: generating rsa public and private key pairs in cpp[/msg])

viewtopic.php?f=102&t=10194

You already posted this in the C/C++ section, please do not double post.
Users are aware that your post exists, even if you feel they do not.

People simply either do not know, haven't got to your question yet, or don't care to post.
If you're not willing to learn, no one can help you. If you're determined to learn, no one can stop you.⠠⠵
The absence of evidence is not evidence of absence.
I can explain it for you, but I can't understand it for you.
User avatar
-Ninjex-
Addict
Addict
 
Posts: 1308
Joined: Sun Sep 02, 2012 8:02 pm
Blog: View Blog (0)


Re: generating rsa public and private key pairs in cpp

Post by the_unwanted on Sat May 11, 2013 6:02 am
([msg=75547]see Re: generating rsa public and private key pairs in cpp[/msg])

all i need to generate public and private keys for a node(here node is simulated computer or router) ..
since there are number of nodes we have generate keys so that no two nodes have same key pairs
first of all i dont know how to generate public and private key pairs for a node
so can u help me generating keys for a node and also no two nodes should have same key pairs
the_unwanted
New User
New User
 
Posts: 5
Joined: Wed Jan 19, 2011 11:39 am
Blog: View Blog (0)


Re: generating rsa public and private key pairs in cpp

Post by the_unwanted on Sat May 11, 2013 7:14 am
([msg=75549]see Re: generating rsa public and private key pairs in cpp[/msg])

as question comes under both cryptography and cpp programming i posted in both sections
the_unwanted
New User
New User
 
Posts: 5
Joined: Wed Jan 19, 2011 11:39 am
Blog: View Blog (0)


Re: generating rsa public and private key pairs in cpp

Post by -Ninjex- on Sat May 11, 2013 2:18 pm
([msg=75556]see Re: generating rsa public and private key pairs in cpp[/msg])

the_unwanted wrote:all i need to generate public and private keys for a node(here node is simulated computer or router) ..
since there are number of nodes we have generate keys so that no two nodes have same key pairs
first of all i dont know how to generate public and private key pairs for a node
so can u help me generating keys for a node and also no two nodes should have same key pairs


Well, you could create a program to generate the keys for you.
If you are talking about keys such as RSA pub/priv keys, linux has a command for that.

In linux, go to your home directory
Code: Select all
cd ~/
then you should make a directory called .ssh, we can do this by the following
Code: Select all
mkdir .ssh
Next, you need to change directories into it, simply with
Code: Select all
cd .ssh


Now to generate the pair, you will use a command similar to:
Code: Select all
ssh-keygen -t rsa -C "place comment here"


With the exec command or similar in multiple programming languages, you should be able to set up a program to create these keys for you, and then place them in the right place.

If you still don't understand, let me know.


I think this is what you are talking about anyways?
If you're not willing to learn, no one can help you. If you're determined to learn, no one can stop you.⠠⠵
The absence of evidence is not evidence of absence.
I can explain it for you, but I can't understand it for you.
User avatar
-Ninjex-
Addict
Addict
 
Posts: 1308
Joined: Sun Sep 02, 2012 8:02 pm
Blog: View Blog (0)


Re: generating rsa public and private key pairs in cpp

Post by LoGiCaL__ on Sat May 11, 2013 4:31 pm
([msg=75560]see Re: generating rsa public and private key pairs in cpp[/msg])

Merged topic. No need to have two of the same threads floating around. While I do agree with the posts falling under the two categories, it's really just not necessary. Anyone who checks the active topics page will see it no matter what category it's in.
User avatar
LoGiCaL__
Addict
Addict
 
Posts: 1060
Joined: Sun May 30, 2010 12:33 pm
Blog: View Blog (0)



Return to C and C++

Who is online

Users browsing this forum: No registered users and 0 guests