Skip to content

Commit 0a99213

Browse files
committed
Crypto: Changing fixed key size for the key gen operation for EC key gen to be none, and rely implicitly on the connected algorithm length. (+1 squashed commits)
1 parent b7cd7ba commit 0a99213

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

cpp/ql/lib/experimental/quantum/OpenSSL/Operations/ECKeyGenOperation.qll

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,15 @@ class ECKeyGenOperation extends OpenSSLOperation, Crypto::KeyGenerationOperation
5151
}
5252

5353
override int getKeySizeFixed() {
54-
// TODO: should this be done automatically for all elliptic curves?
55-
// TODO: we should consider tying these properties to specific algorithm sources
56-
// e.g., getFixedKeySize(Source), to avoid cross products
57-
result =
58-
this.getAnAlgorithmValueConsumer()
59-
.getAKnownAlgorithmSource()
60-
.(Crypto::EllipticCurveInstance)
61-
.getKeySize()
54+
none()
55+
// TODO: marked as none as the operation itself has no key size, it
56+
// comes from the algorithm source, but note we could grab the
57+
// algorithm source and get the key size (see below).
58+
// We may need to reconsider what is the best approach here.
59+
// result =
60+
// this.getAnAlgorithmValueConsumer()
61+
// .getAKnownAlgorithmSource()
62+
// .(Crypto::EllipticCurveInstance)
63+
// .getKeySize()
6264
}
6365
}

0 commit comments

Comments
 (0)