我的对称加密算法安全吗?

Is my symmetric encryption algorithm safe?

我最近决定编写自己的对称加密程序(例如可以在自定义密码管理器中使用)。 我想听听你对他的看法,我是不是犯了大错?不然容易坏吗?

它基本上是一个 Vigenere 分支,试图更接近 Vernam 加密的原理,但仍然易于使用(您可以使用任何密钥来加密您的文本)。

它是如何工作的?

Vernam加密原理规定:

我解释清楚了吗?你是否同意我的观点?您有任何要补充的说明吗?随机数生成和哈希算法的改进建议或建议?

祝你有愉快的一天, 托马斯!

Bruce Schneier 的相关轶事:

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.

使用 AES。