Skip to content

Commit bd7e7b1

Browse files
Better qldoc for timing attacks
1 parent 44e5251 commit bd7e7b1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

java/ql/src/experimental/Security/CWE/CWE-208/NonConstantTimeCheckOnSignatureQuery.qll

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ import semmle.code.java.dataflow.FlowSources
1212
abstract private class ProduceCryptoCall extends MethodAccess {
1313
Expr output;
1414

15-
/** Return the result of cryptographic operation. */
15+
/** Gets the result of cryptographic operation. */
1616
Expr output() { result = output }
1717

18-
/** Return a type of the result of cryptographic operation such as MAC, signature or ciphertext. */
18+
/** Gets a type of cryptographic operation such as MAC, signature or ciphertext. */
1919
abstract string getResultType();
2020
}
2121

@@ -186,6 +186,7 @@ class CryptoOperationSource extends DataFlow::Node {
186186
)
187187
}
188188

189+
/** Gets a method call that produces cryptographic result. */
189190
ProduceCryptoCall getCall() { result = call }
190191
}
191192

@@ -198,7 +199,7 @@ private class NonConstantTimeEqualsCall extends MethodAccess {
198199
}
199200
}
200201

201-
/** Static methods that use a non-constant-time algorithm for comparing inputs. */
202+
/** A static method that uses a non-constant-time algorithm for comparing inputs. */
202203
private class NonConstantTimeComparisonCall extends StaticMethodAccess {
203204
NonConstantTimeComparisonCall() {
204205
getMethod().hasQualifiedName("java.util", "Arrays", ["equals", "deepEquals"]) or

0 commit comments

Comments
 (0)