How could I make an encryption algorithm? I'd like to learn about it... what knowledge mathematic should I know for that?

can you give me a guide for learn?
thank you