In this paper some basic concepts about cryptography are described. Some examples of simple cryptosystems are given and fmally a protocol based on quantum principles that enables to make coding almost secure against the attack of eavesdroppers is presented.