Encryption was used in many field of historical. There are many ways to encryption not at all for using theorem or anyway it's just an idea and a little logic! I'll let you see easy example to encryption the word "CAREFUL" thinking to 3x3 table size for each characters then shade each hole with yellow similar to each characters (see below)
Put number 1 to the shade hole and another hole that doesn't shade put any number 1 to 6 up to you, then you will get a table like the pic that I show. after that for confuse you should change some number to characters that about something such as Card's Sequence
I think to A, Jack, Queen, King Cards in card's sequence A is 1, J is 11, Q is 12 and K is 13 before you change number to "A J Q K" you may using Caesar Cipher , n = 9 to shift an alphabet for 9 alphabet there will be "K T A U" So your encryption is