Skip to content

Commit 19d3e9d

Browse files
committed
Rust: Correct the qhelp.
1 parent ad26822 commit 19d3e9d

File tree

1 file changed

+28
-27
lines changed

1 file changed

+28
-27
lines changed

rust/ql/src/queries/security/CWE-328/WeakSensitiveDataHashing.qhelp

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,25 @@
1010

1111
<p>
1212
A strong cryptographic hash function should be resistant to:
13-
<ul>
14-
<li>
15-
<b>Pre-image attacks</b>. If you know a hash value <code>h(x)</code>,
16-
you should not be able to easily find the input <code>x</code>.
17-
</li>
18-
<li>
19-
<b>Collision attacks</b>. If you know a hash value <code>h(x)</code>,
20-
you should not be able to easily find a different input
21-
<code>y</code>
22-
with the same hash value <code>h(x) = h(y)</code>.
23-
</li>
24-
<li>
25-
<b>Brute force</b>. For passwords and other data with limited
26-
input space, if you know a hash value <code>h(x)</code>
27-
you should not be able to find the input <code>x</code> even using
28-
a brute force attack (without significant computational effort).
29-
</li>
30-
</ul>
3113
</p>
14+
<ul>
15+
<li>
16+
<b>Pre-image attacks</b>. If you know a hash value <code>h(x)</code>,
17+
you should not be able to easily find the input <code>x</code>.
18+
</li>
19+
<li>
20+
<b>Collision attacks</b>. If you know a hash value <code>h(x)</code>,
21+
you should not be able to easily find a different input
22+
<code>y</code>
23+
with the same hash value <code>h(x) = h(y)</code>.
24+
</li>
25+
<li>
26+
<b>Brute force</b>. For passwords and other data with limited
27+
input space, if you know a hash value <code>h(x)</code>
28+
you should not be able to find the input <code>x</code> even using
29+
a brute force attack (without significant computational effort).
30+
</li>
31+
</ul>
3232

3333
<p>
3434
As an example, both MD5 and SHA-1 are known to be vulnerable to collision attacks.
@@ -51,17 +51,18 @@
5151

5252
<p>
5353
Ensure that you use a strong, modern cryptographic hash function, such as:
54-
<ul>
55-
<li>
56-
Argon2, scrypt, bcrypt, or PBKDF2 for passwords and other data with limited input space where
57-
a dictionary-like attack is feasible.
58-
</li>
59-
<li>
60-
SHA-2, or SHA-3 in other cases.
61-
</li>
62-
</ul>
6354
</p>
6455

56+
<ul>
57+
<li>
58+
Argon2, scrypt, bcrypt, or PBKDF2 for passwords and other data with limited input space where
59+
a dictionary-like attack is feasible.
60+
</li>
61+
<li>
62+
SHA-2, or SHA-3 in other cases.
63+
</li>
64+
</ul>
65+
6566
<p>
6667
Note that special purpose algorithms, which are used to ensure that a message comes from a
6768
particular sender, exist for message authentication. These algorithms should be used when

0 commit comments

Comments
 (0)