LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-17-2018, 04:14 AM   #1
Kushalj
LQ Newbie
 
Registered: Jan 2018
Posts: 22

Rep: Reputation: Disabled
code required


how to code rsa algorithim between the two nodes in ns2 tcl file
 
Old 02-17-2018, 04:31 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 11,288

Rep: Reputation: 3392Reputation: 3392Reputation: 3392Reputation: 3392Reputation: 3392Reputation: 3392Reputation: 3392Reputation: 3392Reputation: 3392Reputation: 3392Reputation: 3392
https://is.gd/27cw0C
 
Old 02-17-2018, 04:37 AM   #3
Kushalj
LQ Newbie
 
Registered: Jan 2018
Posts: 22

Original Poster
Rep: Reputation: Disabled
i want to make a prog which SECURE INTRUSION DETECTION SYSTEM IN MOBILE AD HOC
NETWORKS USING RSA ALGORITHM!
 
Old 02-17-2018, 05:27 AM   #4
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,671

Rep: Reputation: 218Reputation: 218Reputation: 218
Could you describe more what you'd like to do? I do not understand how RSA would secure your intrusion detection. What do you want to secure the system against? Where will the RSA be implemented (at which protocol layer)?
 
1 members found this post helpful.
Old 02-17-2018, 06:54 AM   #5
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 11,288

Rep: Reputation: 3392Reputation: 3392Reputation: 3392Reputation: 3392Reputation: 3392Reputation: 3392Reputation: 3392Reputation: 3392Reputation: 3392Reputation: 3392Reputation: 3392
https://www.linuxquestions.org/quest...2/#post5810424
 
Old 02-17-2018, 10:37 AM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 20,550

Rep: Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037
Quote:
Originally Posted by Kushalj View Post
i want to make a prog which SECURE INTRUSION DETECTION SYSTEM IN MOBILE AD HOC
NETWORKS USING RSA ALGORITHM!
Yes, we understand what you want; but as you were told in your OTHER thread about the same topics:
  1. We WILL NOT look things up for you
  2. We WILL NOT write your code for you
  3. *YOU*, personally, are expected to do your own work, post your efforts, and tell us where you're stuck
After you do these three things, and explain your actual PROBLEM in detail, we will be happy to help. Otherwise, there is nothing for us to help WITH....since all you've done so far is tell us "I want xxxxx".
 
Old 02-17-2018, 10:53 AM   #7
Kushalj
LQ Newbie
 
Registered: Jan 2018
Posts: 22

Original Poster
Rep: Reputation: Disabled
ok ,in between two nodes i want to apply rsa algorithim but i dont know how to put ?
 
Old 02-17-2018, 10:56 AM   #8
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,230

Rep: Reputation: 712Reputation: 712Reputation: 712Reputation: 712Reputation: 712Reputation: 712Reputation: 712
ssh key?
 
Old 02-17-2018, 10:58 AM   #9
Kushalj
LQ Newbie
 
Registered: Jan 2018
Posts: 22

Original Poster
Rep: Reputation: Disabled
yes
 
Old 02-17-2018, 11:40 AM   #10
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,230

Rep: Reputation: 712Reputation: 712Reputation: 712Reputation: 712Reputation: 712Reputation: 712Reputation: 712
Code:
ssh-keygen -t rsa -b 4096
 
Old 02-17-2018, 11:42 AM   #11
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 20,550

Rep: Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037
Quote:
Originally Posted by Kushalj View Post
ok ,in between two nodes i want to apply rsa algorithim but i dont know how to put ?
You seem to be either intentionally ignoring what you're told, or just don't understand. We UNDERSTAND WHAT YOU WANT....and if you want help, you need to POST THE CODE/THINGS that ****YOU HAVE DONE/TRIED/RESEARCHED**** on your own. Do you understand that????

We WILL NOT write it for you, or research it for you. You have STILL not shown one single piece of effort of your own, in any of your threads, but keep repeating what you want over and over.

Here's a different tactic to try: YOU go do something, show us what you did, and tell us what the results were. THEN ask us for help.
 
Old 02-17-2018, 11:49 AM   #12
Kushalj
LQ Newbie
 
Registered: Jan 2018
Posts: 22

Original Poster
Rep: Reputation: Disabled
ok you can't understand
 
Old 02-18-2018, 10:42 AM   #13
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 20,550

Rep: Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037
Quote:
Originally Posted by Kushalj View Post
ok you can't understand
WE can't understand?? Sorry, no...we understand very well what you're looking for. You are not understanding that you won't get handouts, despite rephrashing your question over and over. Show your efforts and tell us where you're stuck, and we will help. If you don't, you will get NOTHING. Do you understand that?
 
3 members found this post helpful.
Old 02-18-2018, 04:26 PM   #14
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=14, FreeBSD_10{.0|.1|.2}
Posts: 4,716
Blog Entries: 6

Rep: Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575
Quote:
Originally Posted by Kushalj View Post
how to code rsa algorithim between the two nodes in ns2 tcl file

ok ,in between two nodes i want to apply rsa algorithim but i dont know how to put ?

ok you can't understand
Please review the Site FAQ for guidance in posting your questions and general forum usage.

Especially, please read the link at bottom of that page, How To Ask Questions The Smart Way.

As noted in the above FAQ link, while members are willing to help with your problems, LQ is not a help desk or a place to have others complete your work for you. Most members will expect you to have performed simple online searches for information and to have tried to find a solution on your own, before asking your questions here.

It is possible that others might not understand your questions, but it is up to you to provide a complete description of your problem, including what you have done so far and where your are stuck. The better you explain, the better we can help.

In order for this thread to continue, please try to rephrase your question as described in the FAQ, and make effort to interact more usefully with those offering help. I would also ask others to refrain from further replies until you have done so.
.
 
4 members found this post helpful.
Old 02-23-2018, 07:49 AM   #15
Kushalj
LQ Newbie
 
Registered: Jan 2018
Posts: 22

Original Poster
Rep: Reputation: Disabled
How to generate the xgraph for below tcl file ?

#======================================================================
# Define options
#======================================================================
set val(chan) Channel/WirelessChannel ;# channel type
set val(prop) Propagation/TwoRayGround ;# radio-propagation model
set val(ant) Antenna/OmniAntenna ;# Antenna type
set val(ll) LL ;# Link layer type
set val(ifq) Queue/DropTail/PriQueue ;# Interface queue type
set val(ifqlen) 50 ;# max packet in ifq
set val(netif) Phy/WirelessPhy ;# network interface type
set val(mac) Mac/802_11 ;# MAC type
set val(nn) 6 ;# number of mobilenodes
set val(rp) AODV ;# routing protocol
set val(x) 800
set val(y) 800



set ns [new Simulator]
#ns-random 0

set f [open out.tr w]
$ns trace-all $f
set namtrace [open out.nam w]
$ns namtrace-all-wireless $namtrace $val(x) $val(y)
set topo [new Topography]
$topo load_flatgrid 800 800

create-god $val(nn)

set chan_1 [new $val(chan)]
set chan_2 [new $val(chan)]
set chan_3 [new $val(chan)]
set chan_4 [new $val(chan)]
set chan_5 [new $val(chan)]
set chan_6 [new $val(chan)]

# CONFIGURE AND CREATE NODES

$ns node-config -adhocRouting $val(rp) \
-llType $val(ll) \
-macType $val(mac) \
-ifqType $val(ifq) \
-ifqLen $val(ifqlen) \
-antType $val(ant) \
-propType $val(prop) \
-phyType $val(netif) \
#-channelType $val(chan) \
-topoInstance $topo \
-agentTrace ON \
-routerTrace ON \
-macTrace ON \
-movementTrace OFF \
-channel $chan_1

proc finish {} {
global ns namtrace
$ns flush-trace
close $namtrace
exec nam -r 5m out.nam &
exit 0
}

# define color index
$ns color 0 blue
$ns color 1 red
$ns color 2 chocolate
$ns color 3 red
$ns color 4 brown
$ns color 5 tan
$ns color 6 gold
$ns color 7 black

set n(0) [$ns node]
$ns at 0.0 "$n(0) color blue"
$n(0) color "0"
$n(0) shape "circle"
set n(1) [$ns node]
$ns at 0.0 "$n(1) color red"
$n(1) color "blue"
$n(1) shape "circle"
set n(2) [$ns node]
$n(2) color "tan"
$n(2) shape "circle"
set n(3) [$ns node]
$n(3) color "red"
$n(3) shape "circle"
set n(4) [$ns node]
$n(4) color "tan"
$n(4) shape "circle"
set n(5) [$ns node]
$ns at 0.0 "$n(5) color blue"
$n(5) color "red"
$n(5) shape "circle"


for {set i 0} {$i < $val(nn)} {incr i} {
$ns initial_node_pos $n($i) 30+i*100
}
$ns at 0.0 "[$n(1) set ragent_] malicious"

$ns at 0.0 "$n(0) setdest 100.0 100.0 3000.0"
$ns at 0.0 "$n(1) setdest 200.0 200.0 3000.0"
$ns at 0.0 "$n(2) setdest 300.0 200.0 3000.0"
$ns at 0.0 "$n(3) setdest 400.0 300.0 3000.0"
$ns at 0.0 "$n(4) setdest 500.0 300.0 3000.0"
$ns at 0.0 "$n(5) setdest 600.0 400.0 3000.0"

# CONFIGURE AND SET UP A FLOW

set sink0 [new Agent/LossMonitor]
set sink1 [new Agent/LossMonitor]
set sink2 [new Agent/LossMonitor]
set sink3 [new Agent/LossMonitor]
set sink4 [new Agent/LossMonitor]
set sink5 [new Agent/LossMonitor]
$ns attach-agent $n(0) $sink0
$ns attach-agent $n(1) $sink1
$ns attach-agent $n(2) $sink2
$ns attach-agent $n(3) $sink3
$ns attach-agent $n(4) $sink4
$ns attach-agent $n(5) $sink5

#$ns attach-agent $sink2 $sink3
set tcp0 [new Agent/TCP]
$ns attach-agent $n(0) $tcp0
set tcp1 [new Agent/TCP]
$ns attach-agent $n(1) $tcp1
set tcp2 [new Agent/TCP]
$ns attach-agent $n(2) $tcp2
set tcp3 [new Agent/TCP]
$ns attach-agent $n(3) $tcp3
set tcp4 [new Agent/TCP]
$ns attach-agent $n(4) $tcp4
set tcp5 [new Agent/TCP]
$ns attach-agent $n(5) $tcp5


proc attach-CBR-traffic { node sink size interval } {
#Get an instance of the simulator
set ns [Simulator instance]
#Create a CBR agent and attach it to the node
set cbr [new Agent/CBR]
$ns attach-agent $node $cbr
$cbr set packetSize_ $size
$cbr set interval_ $interval

#Attach CBR source to sink;
$ns connect $cbr $sink
return $cbr
}

set cbr0 [attach-CBR-traffic $n(0) $sink5 1000 .030]
$ns at 0.5 "$cbr0 start"
$ns at 5.5 "finish"
puts "Start of simulation.."
$ns run
 
  


Reply

Tags
crcn, ubuntu 16.04


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
ajax.googleapis.com required for CODE tags button catkin LQ Suggestions & Feedback 4 04-23-2015 01:04 PM
[SOLVED] Is it possible to optimize C code using SSE*/AVX* ? or is assembly required ? metaschima Programming 8 06-28-2014 12:38 PM
challenge for c programmers:code urgently required ehtisham Programming 7 11-22-2010 01:47 AM
Samsung yp-u3 code required for ubuntu byker Linux - Newbie 3 03-22-2009 04:14 AM
Document required about Fedora source code ahm_irf Fedora 1 02-11-2007 10:16 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:46 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration