How is it possible for us to communicate securely when there’s the possibility of a third party eavesdropping on us? How can we communicate private secrets through public channels? How do such techniques enable us to bank online and carry out other sensitive transactions on the Internet while trusting numerous relays? In this post, I hope to explain public key cryptography, with actual code examples, so that the concepts are a little more concrete.
more here...........http://nickdesaulniers.github.io/blog/2015/02/22/public-key-crypto-code-example/
more here...........http://nickdesaulniers.github.io/blog/2015/02/22/public-key-crypto-code-example/