Algorithm Toys

For learning the details of different security algorithms, I implement some of them. You can uncomment all the log.printXXX to see the middle-process.

For each of them I just finished the most important parts for observing the insided processes and results, that is enough for me to understand them, especially some points many books or specifications do not explain clearly. I ignored some small features, hence I call it TOY.

The list of mplemented algorithms:

Hash: MD5, SM3, SHA-Family.

Symmetric encryption/decryption: DES, AES, SM4.

Asymmetric encryption/decryption: RSA, SM2.

算法玩具包

为了学习一些安全算法的详细内容,我根据各类标准实现了它们。取消程序中 log.printXXX 前的注释,就可以看到运算过程。

对于大部分的算法,我只是完成了每一个必须的步骤,主要目的是为了观看运算期间的中间过程与结果是否与各类标准文档中给出的案例一致。 所以,我把这个主题叫“算法玩具包”,因为我并没有实现所有算法的细节,而只是实现了那些最主要的部分。你懂得。其中有一些细节,如果不是通过自己来实现,就无法领会。

已实现的算法清单如下:

散列函数:MD5、SM3、SHA-224/256/512

对称加解密:DES、AES、SM4

非对称加解密:RSA、SM2