i want to see an available examples that simulate encrypted message exchange between two nodes and run on each node an encryption/decryption + key generation algorithm.
You can use the key encryption algorithm based on RC5 algorithm: RC5 is a highly efficient and flexible cryptographic algorithm that can be adjusted to tradeoff security strength with power consumption and computational overhead.
For simulation, you can use the MATLAB or aided software like NAM.
in term of encryption in general there is not a specific algorithm that is used for all the aspects to encrypt exactly as we want ,but I found that RC5 algorithm is one of the algorithm that has a lot of advantages and it is commonly used for this purpose but over the time we may need to another algorithm to meet our requirements.
You can combine the code examples for Bounty Castle (https://gist.github.com/zcdziura/7652286) and for RMI (https://www.cs.ucsb.edu/~cappello/lectures/rmi/helloworld.shtml) to simulate the exchange of ciphertext messages.