diff --git a/electrum/plugins/labels/labels.py b/electrum/plugins/labels/labels.py index a6dd40f2b..9d9d63233 100644 --- a/electrum/plugins/labels/labels.py +++ b/electrum/plugins/labels/labels.py @@ -39,6 +39,7 @@ class LabelsPlugin(BasePlugin): def encode(self, wallet: 'Abstract_Wallet', msg: str) -> str: password, iv, wallet_id = self.wallets[wallet] encrypted = aes_encrypt_with_iv(password, iv, msg.encode('utf8')) + # FIXME: ^ we are reusing the IV between all labels in the wallet, in CBC mode... return base64.b64encode(encrypted).decode() def decode(self, wallet: 'Abstract_Wallet', message: str) -> str: @@ -66,7 +67,9 @@ class LabelsPlugin(BasePlugin): if not item: return if label is None: - # note: the server does not know whether a label is empty + # note: the server should not know whether a label is empty + # FIXME but it does! we are reusing the IV with AES-CBC: there is no randomness between labels, + # all empty labels in given wallet look the same. label = '' nonce = self.get_nonce(wallet) wallet_id = self.wallets[wallet][2]