Which PHP mcrypt cipher is safest?

2019-01-14 01:27发布

So guys, there's plenty of different ciphers available - but which one is the safest to use nowadays?

List: http://www.php.net/manual/en/mcrypt.ciphers.php

7条回答
一夜七次
2楼-- · 2019-01-14 02:26

According to the NIST paper, RJINDAEL had a low security margin compared to MARS, twofish or serpent. If you really need the strongest cipher, choose one of those.

http://csrc.nist.gov/archive/aes/round2/r2report.pdf

To quote: "MARS appears to have a high security margin. A precise characterization of MARS is difficult because of the fact that MARS employs two different kinds of rounds. MARS has received some criticism based on its complexity, which may have hindered its security analysis during the timeframe of the AES development process.

Rijndael appears to have an adequate security margin. The security margin is a bit difficult to measure because the number of rounds changes with the key size. Rijndael has received some criticism on two grounds: that its security margin is on the low side among the finalists, and that its mathematical structure may lead to attacks. However, its structure is fairly simple, which may have facilitated its security analysis during the specified timeframe of the AES development process.

Serpent appears to have a high security margin. Serpent also has a simple structure, which may have facilitated its security analysis during the specified timeframe of the AES development process.

Twofish appears to have a high security margin. Since Twofish uses key-dependent round function, the notion of security margin may have less meaning for this algorithm than for the other finalists. The dependence of the Twofish S-boxes on only k/2 bits of entropy in the k-bit key case has led to a speculation that Twofish may be amenable to a divide-and-conquer attack, although no such attack has been found. Twofish has received some criticism for its complexity, making analysis difficult during the timeframe of the AES development process."

查看更多
登录 后发表回答