Commit 052354a1 authored by Philipp Hörist's avatar Philipp Hörist
Browse files

[omemo] Switch to 12 byte IV

parent 11c1c5f9
......@@ -65,7 +65,7 @@ except Exception:
def encrypt_file(data):
key = os.urandom(32)
iv = os.urandom(16)
iv = os.urandom(12)
payload, tag = aes_encrypt(key, iv, data)
encrypted_data = payload + tag
......
......@@ -221,7 +221,7 @@ class OmemoState:
def create_msg(self, from_jid, jid, plaintext):
key = os.urandom(16)
iv = os.urandom(16)
iv = os.urandom(12)
encrypted_keys = {}
devices_list = self.device_list_for(jid)
......@@ -277,7 +277,7 @@ class OmemoState:
def create_gc_msg(self, from_jid, jid, plaintext):
key = os.urandom(16)
iv = os.urandom(16)
iv = os.urandom(12)
encrypted_keys = {}
room = jid
encrypted_jids = []
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment