Amazing technological breakthrough possible @S-Logix pro@slogix.in

Office Address

  • #5, First Floor, 4th Street Dr. Subbarayan Nagar Kodambakkam, Chennai-600 024 Landmark : Samiyar Madam
  • pro@slogix.in
  • +91- 81240 01111

Social List

How to generate and verify signature using RSA algorithm in NS2?

Description

A node that the RREQ verifies that the sender is authenticated user or not by verifying the signature generated using asymmetric cryptography algorithm RSA and it forwards the RREQ to destination only if it is received from authenticated user otherwise it will not forward the RREQ.

Sample Code

set source 22
set destination 24
set udp [new Agent/UDP]
$ns attach-agent $n_($source) $udp
set cbr [new Application/Traffic/CBR]
$cbr set packetSize_ 512
$cbr set interval_ 0.1
$cbr attach-agent $udp
set lm($destination) [new Agent/LossMonitor]
$ns attach-agent $n_($destination) $lm($destination)
$ns connect $udp $lm($destination)
$ns at [expr $now + 2.0] "$cbr start"
$ns at [expr $now + 5.0] "$cbr stop"

generate and verify signature using RSA algorithm in NS2
Screenshots

 generate and verify signature using RSA algorithm in NS2