Permalink
Browse files

Stop automagically select default encryption

Selecting a default encryption (in our case OMEMO) has several down sides.
First of all users might have perfectly valid reasons not to use encryption
at all such as using the same private server. Second of all the way it was
implemented Conversations would automatically fall back to plain text as soon
as the conditions changed (recipient switches to device with no encryption)
which lead to unexpected situations.
Thirdly having a default encryptions speaks against the 'mission
statement' of Conversations of not forcing its security and privacey
aspects upon the user.
And last but not least the goal of implementing this feature in the
first place: Be encrypted by default didn't work at all. I don't think
there was a single user that we succesfully 'tricked' into using OMEMO
who otherwise wouldn't have used it.
  • Loading branch information...
iNPUTmice committed Nov 13, 2016
1 parent bec0484 commit 035d0c79572d5981c53d1bff7f30b484c6542f17
Showing with 1 addition and 30 deletions.
  1. +1 −30 src/main/java/eu/siacs/conversations/entities/Conversation.java
@@ -697,36 +697,7 @@ private int getMostRecentlyUsedIncomingEncryption() {
}
public int getNextEncryption() {
final AxolotlService axolotlService = getAccount().getAxolotlService();
int next = this.getIntAttribute(ATTRIBUTE_NEXT_ENCRYPTION, -1);
if (next == -1) {
if (Config.supportOmemo()
&& axolotlService != null
&& mode == MODE_SINGLE
&& axolotlService.isConversationAxolotlCapable(this)
&& getAccount().getSelfContact().getPresences().allOrNonSupport(AxolotlService.PEP_DEVICE_LIST_NOTIFY)
&& getContact().getPresences().allOrNonSupport(AxolotlService.PEP_DEVICE_LIST_NOTIFY)) {
return Message.ENCRYPTION_AXOLOTL;
} else {
next = this.getMostRecentlyUsedIncomingEncryption();
}
}
if (!Config.supportUnencrypted() && next <= 0) {
if (Config.supportOmemo()
&& ((axolotlService != null && axolotlService.isConversationAxolotlCapable(this)) || !Config.multipleEncryptionChoices())) {
return Message.ENCRYPTION_AXOLOTL;
} else if (Config.supportOtr() && mode == MODE_SINGLE) {
return Message.ENCRYPTION_OTR;
} else if (Config.supportOpenPgp()
&& (mode == MODE_SINGLE) || !Config.multipleEncryptionChoices()) {
return Message.ENCRYPTION_PGP;
}
} else if (next == Message.ENCRYPTION_AXOLOTL
&& (!Config.supportOmemo() || axolotlService == null || !axolotlService.isConversationAxolotlCapable(this))) {
next = Message.ENCRYPTION_NONE;
}
return next;
return this.getIntAttribute(ATTRIBUTE_NEXT_ENCRYPTION, Message.ENCRYPTION_NONE);
}
public void setNextEncryption(int encryption) {

4 comments on commit 035d0c7

@kaepora

This comment has been minimized.

Show comment
Hide comment
@kaepora

kaepora Mar 12, 2017

👏 👏 👏 👏 👏 👏 👏 👏 👏 👏 👏 👏 👏 👏 👏 👏 👏

kaepora replied Mar 12, 2017

👏 👏 👏 👏 👏 👏 👏 👏 👏 👏 👏 👏 👏 👏 👏 👏 👏

@alyssarowan

This comment has been minimized.

Show comment
Hide comment
@alyssarowan

alyssarowan Mar 12, 2017

Don't do this. This is a huge mistake.

alyssarowan replied Mar 12, 2017

Don't do this. This is a huge mistake.

@licaon-kter

This comment has been minimized.

Show comment
Hide comment
@licaon-kter

licaon-kter Mar 12, 2017

Contributor

Explain?!

Contributor

licaon-kter replied Mar 12, 2017

Explain?!

@Crapula-Alligator

This comment has been minimized.

Show comment
Hide comment
@Crapula-Alligator

Crapula-Alligator Mar 12, 2017

And so it was that governments and blackhats alike rejoiced on that day.

Crapula-Alligator replied Mar 12, 2017

And so it was that governments and blackhats alike rejoiced on that day.

Please sign in to comment.