I gave this talk to people on XING Porto.
It talks about how RSA works and give some examples in plain Ruby.