i am trying to implement message authentication scheme in VANET using NS2 and nsg tool for tcl scripting . is there any tool like nsg which can create tcl file itself by mplement digital signatures for ns2
It depends what you want to do. I recently developed a module that accepts packets from the routing agent, and sends it further on to the link layer. See tcl/lib/ns-mobilenode.tcl. I did it this way:
} else { ;# no IMEP
set filter [new ENC]
$filter set agent_addr_ [$self node-addr]
$agent target $filter
$filter target [$self set ll_(0)]
# $agent target [$self set ll_(0)]
}
My agent is based on the Agent class. For encryption, I use libssl. E.g., in the simplest case you can use DES encryption like DES_cfb64_encrypt(). I have two different scenarios, in one scenario, I completely destroy the packet received from the upper layer, and I issue another encrypted packet like in the ordinary tunnel. I suppose, you can also do it in a similar way in the lower layers, however, it was pretty enough for me.