Skip to content

Commit b077fc5

Browse files
add more details in qhelp about the use of hardcoded/constant IVs
1 parent 2a22c69 commit b077fc5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

swift/ql/src/queries/Security/CWE-1204/StaticInitializationVector.qhelp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
<overview>
55
<p>When a cipher is used in certain modes (such as CBC or GCM), it requires an initialization vector (IV). Under the same secret key, IVs should be unique and ideally unpredictable. If the same IV is used with the same secret key, then the same plaintext results in the same ciphertext. This behavior may enable an attacker to learn if the same data pieces are transferred or stored, or help the attacker run a dictionary attack.</p>
6+
<p>In particular, if the IV is hardcoded or constant, an attacker may just lookup potential keys in a dictionary, then concatenate those with the hardcoded or constant IV rather than trying to discover the entire encryption key.</p>
67
</overview>
78

89
<recommendation>

0 commit comments

Comments
 (0)