OWASP Top10 2021 (2.Cryptographic Failures失败的加密方式)

OWASP Top10 2021排第二的Cryptographic Failures(失败的加密方式) 原谅我初级的翻译 与上一篇不同是Broken Access Control影响业务和影响数据的区别 既然是加密肯定是涉及到敏感数据例如密码,身份证,银行卡号等等 在加密过程中或者直接为加密就造成了Cryptographic Failures(失败的加密方式) 举例说明(代码) index.html

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Cryptographic Failures</title>
</head>
<body>
<form action="./login.php" method="POST">
<label for="">账号:</label>
<input type="text" name="username">
<label for="">密码:</label>
<input type="password" name="password" id="password">
<button type="submit">提交</button>
</form>
</body>
</html>

提交账号密码简单登陆页 第一没有使用HTTP证书导致造成了一个Cryptographic Failures(失败的加密方式) 提交 敏感数据没有加密(密码)造成了又一个Cryptographic Failures(失败的加密方式) 如果我们加密呢? 登陆 看代码知道使用了MD5加密 但大家知道MD5被碰撞也就是解密出来的几率很高所以现在被认为成了不安全的加密方式 使用不安全的加密方式又造成了又一个Cryptographic Failures(失败的加密方式)

从上面几个例子可以得出Cryptographic Failures大致的一个分类,但不完全。Cryptographic Failures包含了很多内容 可以到密码学范畴例如王小云院士研究的密码学 也可以是要求密码大于12位包含大小写加特殊符号等等造成的问题都可以归纳为Cryptographic Failures

修复:找合适的加密方式(非对称不可逆等等)