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

[omemo] Switch to 12 byte IV

parent 11c1c5f9
...@@ -65,7 +65,7 @@ except Exception: ...@@ -65,7 +65,7 @@ except Exception:
def encrypt_file(data): def encrypt_file(data):
key = os.urandom(32) key = os.urandom(32)
iv = os.urandom(16) iv = os.urandom(12)
payload, tag = aes_encrypt(key, iv, data) payload, tag = aes_encrypt(key, iv, data)
encrypted_data = payload + tag encrypted_data = payload + tag
......
...@@ -221,7 +221,7 @@ class OmemoState: ...@@ -221,7 +221,7 @@ class OmemoState:
def create_msg(self, from_jid, jid, plaintext): def create_msg(self, from_jid, jid, plaintext):
key = os.urandom(16) key = os.urandom(16)
iv = os.urandom(16) iv = os.urandom(12)
encrypted_keys = {} encrypted_keys = {}
devices_list = self.device_list_for(jid) devices_list = self.device_list_for(jid)
...@@ -277,7 +277,7 @@ class OmemoState: ...@@ -277,7 +277,7 @@ class OmemoState:
def create_gc_msg(self, from_jid, jid, plaintext): def create_gc_msg(self, from_jid, jid, plaintext):
key = os.urandom(16) key = os.urandom(16)
iv = os.urandom(16) iv = os.urandom(12)
encrypted_keys = {} encrypted_keys = {}
room = jid room = jid
encrypted_jids = [] 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