I recently decided to write my own symmetric encryption program (which could be used in a custom password manager for example). I would like your opinion about him, did I make big mistakes? else would it be easily breakable?
It is basically a Vigenere fork trying to get closer to the principles of Vernam encryption but remaining easy to use (you can use any key in order to encrypt your text).
How does it work?
Example :
Alphabet: [a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z]
List : [1,18,3,17,0]
Word: "hello"
h+1 = j
e+18 = w
l+3 = o
l+17=c (as the alphabet is finished, we continue at the beginning)
o+0=o
Output: "jwoco"
The principles of Vernam encryption specifies that :
Is my explanation clear? Do you agree with me? Do you have any clarifications to add? improvements to propose or algorithms of random number generation and hash to advise me?
have a nice day, Thomas!
A relevant anecdote from Bruce Schneier:
See https://www.schneier.com/crypto-gram/archives/1998/1015.html#cipherdesign
A cryptographer friend tells the story of an amateur who kept bothering him with the cipher he invented. The cryptographer would break the cipher, the amateur would make a change to "fix" it, and the cryptographer would break it again. This exchange went on a few times until the cryptographer became fed up. When the amateur visited him to hear what the cryptographer thought, the cryptographer put three envelopes face down on the table. "In each of these envelopes is an attack against your cipher. Take one and read it. Don't come back until you've discovered the other two attacks." The amateur was never heard from again.
Use AES.