{% extends "base.html" %} {% load community_utils %} {% load django_bootstrap5 %} {% load bootstrap_helpers %} {% load e2ee %} {% load sekizai_tags %} {% block head_meta %} {% with meta_title="E2EE Status" meta_description="Status of your end-to-end encryption" %} {{ block.super }} {% endwith %} {% endblock head_meta %} {% block breadcrumbs %} {% breadcrumbs "E2EE Status"|combine:request.path %} {% endblock %} {% block headline %} End-to-end-encryption {% endblock %} {% block subtitle %} Status {% endblock %} {% block content %}

End-to-end encryption (E2EE) is a method to store content encrypted on the server. Website administrators only see the encrypted messages and do not have the possibility to decrypt and read the content.

The content is encrypted in your browser before it is sent to the server.

Find out more about the framework at https://gitlab.hzdr.de/hcdc/django/django-e2ee-framework .

Status of your encryption

{% if not user.master_key %} {% if not perms.e2ee.add_masterkey %}

End-to-end encryption is disabled for your account. Please contact the community managers if you need support.

{% else %}

You do not have setup a password for end-to-end encryption. Please do so

{% bootstrap_form e2ee_login_form %}
{% addtoblock "js" %} {{ e2ee_login_form.media.js }} {% endaddtoblock %} {% endif %} {% elif not request.session|has_session_key %}

You do have setup a password for end-to-end encryption but did not yet enable it in this session. If you want to enable E2EE for this session, please

{% elif request.session|e2ee_ignored %}

You decided to ignore end to end encrypted messages in this session.

Please logout and login again if you want to read encrypted messages.

{% elif not request.session|e2ee_enabled %}

End-to-end encryption is awaiting approval through other session.

Please login at another device and enter the verification number that you received previously. If you forgot your verification number, please logout and login again .

{% else %}
{% card %}

You have end-to-end encryption enabled and can use it to encrypt and decrypt messages.

{% with secrets=user.master_key.masterkeysecret_set.all %} We have {{ secrets.count }} password{{ secrets|pluralize }} stored encrypted in our database with the following identifier{{ secrets|pluralize }}:

{% endwith %}

If you like, you can add another E2EE password, e.g. for backup

{% endcard %} {% card header="Add another password for end-to-end encryption" %}
{% get_password_create_form as password_create_form %} {% bootstrap_form password_create_form %}
{% addtoblock "js" %} {{ password_create_form.media.js }} {% endaddtoblock %} {% endcard %}
{% endif %}

Your active sessions

{% get_session_keys as session_keys %} {% if not session_keys %}

We do not have any records for session with end-to-end encryption.

{% else %}
{% for session_key in session_keys %}
{% card card_class="h-100" header=session_key %} {% if session_key.ignore %} E2EE ignored {% elif not session_key.secret %}

End-to-end encryption is not enabled for this session and you will not be able to receive or send encrypted messages. Enter the verification number to enable it.

{% get_session_key_form session_key as session_key_form %} {% bootstrap_form session_key_form %}
{% addtoblock "js" %} {{ session_key_form.media.js }} {% endaddtoblock %} {% else %} E2EE enabled! {% endif %} {% endcard %}
{% endfor %}
{% endif %} {% addtoblock "js" %} {% endaddtoblock %} {% endblock %}