Skip to content

Commit

Permalink
Add some missing curve types (#920)
Browse files Browse the repository at this point in the history
The weak_cryptographic_key plugin is missing some various
elliptical curve types.

Signed-off-by: Eric Brown <eric_wade_brown@yahoo.com>
  • Loading branch information
ericwb committed Jul 3, 2022
1 parent 0b56c57 commit 5aae21e
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions bandit/plugins/weak_cryptographic_key.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,22 @@ def _weak_crypto_key_size_cryptography_io(context, config):
return _classify_key_size(config, key_type, key_size)
elif key_type == "EC":
curve_key_sizes = {
"SECT571K1": 571,
"SECT571R1": 570,
"SECP521R1": 521,
"BrainpoolP512R1": 512,
"SECT409K1": 409,
"SECT409R1": 409,
"BrainpoolP384R1": 384,
"SECP384R1": 384,
"SECT283K1": 283,
"SECT283R1": 283,
"BrainpoolP256R1": 256,
"SECP256K1": 256,
"SECP256R1": 256,
"SECT233K1": 233,
"SECT233R1": 233,
"SECP224R1": 224,
"SECP192R1": 192,
"SECT163K1": 163,
"SECT163R2": 163,
Expand Down

0 comments on commit 5aae21e

Please sign in to comment.