diff --git a/libsignal/src/main/java/org/session/libsignal/crypto/CipherUtil.java b/libsignal/src/main/java/org/session/libsignal/crypto/CipherUtil.java index d3423a0bd4..a6a3808bb4 100644 --- a/libsignal/src/main/java/org/session/libsignal/crypto/CipherUtil.java +++ b/libsignal/src/main/java/org/session/libsignal/crypto/CipherUtil.java @@ -1,5 +1,8 @@ package org.session.libsignal.crypto; public class CipherUtil { + // Cipher operations are not thread-safe so we synchronize over them through doFinal to + // prevent crashes with quickly repeated encrypt/decrypt operations + // https://github.com/mozilla-mobile/android-components/issues/5342 public static final Object CIPHER_LOCK = new Object(); }