From 3d5d563164d55fdc8fb1ebf8b011812855e71c8c Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Thu, 30 Jun 2022 08:30:30 -0400 Subject: [PATCH] Island: Add TODO about using secrets vs pycryptodome --- .../cc/server_utils/encryption/data_store_encryptor.py | 1 + 1 file changed, 1 insertion(+) diff --git a/monkey/monkey_island/cc/server_utils/encryption/data_store_encryptor.py b/monkey/monkey_island/cc/server_utils/encryption/data_store_encryptor.py index 9a33a7b1c..0af258d19 100644 --- a/monkey/monkey_island/cc/server_utils/encryption/data_store_encryptor.py +++ b/monkey/monkey_island/cc/server_utils/encryption/data_store_encryptor.py @@ -37,6 +37,7 @@ class DataStoreEncryptor(IEncryptor): return KeyBasedEncryptor(plaintext_key) def _create_key(self) -> KeyBasedEncryptor: + # TODO: Can we just use secrets.token_bytes(DataStoreEncryptor._KEY_LENGTH_BYTES)? plaintext_key = Random.new().read(DataStoreEncryptor._KEY_LENGTH_BYTES) encrypted_key = self._password_based_encryptor.encrypt(plaintext_key)