Hi,
yes, no, maybe.
The point isn't if ns-3 is suitable, the point is if any network simulator is suitable.
When you do a simulation, you must have a clear idea of what's the thing you want to measure/test.
Now, about your question, you can use ns-3 to do all you're asking. It's not yet in the codebase, but adding it should be easy enough. Well, it depends if you wanna do it at application level or to add the functionality in an already developed model (which could be a bit more complex).
You'll be able to simulate all the key exchange and so on. The point is: what data will you get ?
- Network overhead: yes, with great detail.
- Computing overhead: no, impossible to measure (because ns-3 is an event-driven simulation and it doesn't take into account (yet) the data processing delays. You could add it, but with considerable effort.
- Memory overhead: yes, but with a twist. How you store data (e.g., keys) is dependent on your architecture, and the data you'll have from ns-3 can be "strange". You'll have a good idea, for example, of the number of keys stored, but not about how much memory is needed (because it depends on the way you store the data).
- Attacking the infrastructure: not really. Attacking a key exchange or cypher is a matter of computing, not data exchange. You can successfully simulate and evaluate things like wormhole attacks, chop chop, or closing a TCP session, but evaluating how secure a crypted exchange is… hard. Im most cases it's even useless to actually crypt the data, it's enough to say "it's crypted" and have the node discard the datagram if the key isn't right.
So, the answer is: it's possible, but you have to carefully think about the data you plan to get.
Hope this helps,
T.