Encryption Tutorials

Hi ,
I would like to know how to write encrytion functions in c++ in linux environment.so would like u get some tutorials on the topic.
Can anyone help

Since you're asking I'm assuming you aren't a mathematician or a computer scientist.

Try this for simple math behind RSA:
http://world.std.com/~franl/crypto/rsa-guts.html

You will need bignum support -- try GMP
http://swox.com/gmp/

If all of this is too much try:
AES source:
http://www.scherrer.cc/crypt/
Blowfish source:
http://www.schneier.com/blowfish-download.html