From edc49e9042cb5f105b0775a848d1004a25cd9595 Mon Sep 17 00:00:00 2001 From: YanNaingWinn Date: Wed, 17 Jun 2026 19:58:50 +0700 Subject: [PATCH] Fix nosemgrep suppression for AES-CBC crypto findings --- cryptnox_sdk_py/crypto_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cryptnox_sdk_py/crypto_utils.py b/cryptnox_sdk_py/crypto_utils.py index 33db862..7220950 100644 --- a/cryptnox_sdk_py/crypto_utils.py +++ b/cryptnox_sdk_py/crypto_utils.py @@ -18,8 +18,8 @@ def aes_encrypt(key: bytes, initialization_vector: bytes, data: bytes) -> bytes: :return: Encrypted data :rtype: bytes """ - # nosemgrep: python.cryptography.security.mode-without-authentication.crypto-mode-without-authentication # AES-CBC is required by the SCP03 smartcard protocol; authentication is handled via separate MAC + # nosemgrep: python.cryptography.security.mode-without-authentication.crypto-mode-without-authentication cipher = Cipher(algorithms.AES(key), modes.CBC(initialization_vector), backend=default_backend()) encryptor = cipher.encryptor() @@ -39,8 +39,8 @@ def aes_decrypt(key: bytes, initialization_vector: bytes, data: bytes) -> bytes: :return: Decrypted data :rtype: bytes """ - # nosemgrep: python.cryptography.security.mode-without-authentication.crypto-mode-without-authentication # AES-CBC is required by the SCP03 smartcard protocol; authentication is handled via separate MAC + # nosemgrep: python.cryptography.security.mode-without-authentication.crypto-mode-without-authentication cipher = Cipher(algorithms.AES(key), modes.CBC(initialization_vector), backend=default_backend()) decryptor = cipher.decryptor()