-
Notifications
You must be signed in to change notification settings - Fork 2k
Expand file tree
/
Copy pathInsufficientKeySize.qhelp
More file actions
50 lines (40 loc) · 1.8 KB
/
InsufficientKeySize.qhelp
File metadata and controls
50 lines (40 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<!DOCTYPE qhelp PUBLIC
"-//Semmle//qhelp//EN"
"qhelp.dtd">
<qhelp>
<overview>
<p>
Incorrect uses of encryption algorithms may result in sensitive data exposure,
key leakage, broken authentication, insecure session, and spoofing attacks.
</p>
</overview>
<recommendation>
<p>
Ensure that you use a strong key with a recommended bit size.
For RSA encryption the minimum size is 2048 bits.
</p>
</recommendation>
<example>
<p>
The following code uses RSA encryption with insufficient key size.
</p>
<sample src="InsufficientKeySizeBad.go" />
<p>
In the example below, the key size is set to 2048 bits.
</p>
<sample src="InsufficientKeySizeGood.go" />
</example>
<references>
<li>OWASP: <a
href="https://cheatsheetseries.owasp.org/cheatsheets/Cryptographic_Storage_Cheat_Sheet.html">Cryptographic Storage Cheat Sheet</a>.
</li>
<li>Wikipedia: <a
href="https://en.wikipedia.org/wiki/Strong_cryptography#Cryptographically_strong_algorithms">Cryptographically Strong Algorithms</a>.
</li>
<li>Wikipedia: <a
href="https://en.wikipedia.org/wiki/Strong_cryptography#Examples">Strong Cryptography Examples</a>.
</li>
<li>NIST, FIPS 140 Annex a: <a href="http://csrc.nist.gov/publications/fips/fips140-2/fips1402annexa.pdf"> Approved Security Functions</a>.</li>
<li>NIST, SP 800-131A: <a href="http://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-131Ar1.pdf"> Transitions: Recommendation for Transitioning the Use of Cryptographic Algorithms and Key Lengths</a>.</li>
</references>
</qhelp>