MCPcopy Index your code
hub / github.com/amnesica/KryptEY

github.com/amnesica/KryptEY @v0.1.5

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.1.5 ↗ · + Follow
1,982 symbols 5,709 edges 156 files 285 documented · 14% updated 2y agov0.1.5 · 2023-05-24★ 86721 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

KryptEY - Secure E2EE communication

GitHub version Chatkontrolle stoppen Stop scanning me

Keyboard for secure end-to-end-encrypted messages through the signal protocol in any messenger. Communicate securely and independent, regardless of the legal situation or whether messengers use E2EE. No server needed.

KryptEY was created by mellitopia and amnesica.

Motivation

Breaking of end-to-end encryption (E2EE) by laws such as the planned EU chat control is an ongoing issue. Content in messengers that use E2EE, such as Whatsapp or Signal, could thus be monitored by third parties. E2EE is often, but not always, standard in messengers. There are proven methods for E2EE such as PGP. However, these methods are sometimes cumbersomely integrated and require a lot of effort to use.

KryptEY is an Android keyboard that implements the Signal protocol. The keyboard works messenger-independently and both the X3DH Key Agreement Protocol and the Double Ratchet Algorithm work without a server, thus it enables a highly independent use of the protocol.

Screenshots

App image App image App image App image App image App image App image App image App image

Features

Based upon the Simple Keyboard KryptEY adds a view above the Keyboard for the E2EE functionality.

  • use E2EE through Signal Protocol in any messenger
  • encryption/decryption of messages
  • enter message through separate text field in keyboard
  • use clipboard to read messages
  • manage contacts in own contact list in keyboard
  • message log to view sent/received messages
  • send messages as plain JSON (raw mode) or hidden in a decoy text (fairytale mode)
  • verification of E2EE functionality via fingerprint
  • Q&A View helps with questions
  • Dark & light theme

See this document for further information on how KryptEY is working.

Demo

Conversation between Alice (left) and Bob (right) in the Signal Messenger using KryptEY.

App image

Download

Get it on IzzyOnDroid Get it on Github

If you need instructions on how to use the app, see our help here

Privacy

Read our privacy statement here

Permissions

  • VIBRATE: Required for vibrations on key press

Security

The existing security properties for the Signal Protocol are also valid for the keyboard.

The elliptic curve X25519 with SHA-512 is used in the X3DH Key Agreement Protocol from the applied Signal library. The hash function SHA-256 is used for the various chains and AES-256 with CBC ( Pkcs#7) is used for the encryption of the messages. SHA-512 is also used to generate the fingerprint, the representation of the public key used for encryption.

Limitations

The keyboard was designed as a POC and only allows 1-to-1 conversations. However, the application can also be used in a group chat to a limited extent. Here, a message can be directed to a specific chat partner and not to all people. Other participants of the group chat cannot decrypt the message.

Text messages in Telegram are getting copied as HTML and not as plain text. When decoding the message with the fairytale mode the copied message is compromised and can't be read properly. Therefore, it can't be decoded at all. However, the raw mode works properly. When using KryptEY with Telegram we recommend the raw mode.

Some messengers like Threema only allows up to 3500 bytes per message. Therefore, different character input limitations apply. To stay under the 3500 bytes limit, only 500 characters are allowed for raw and fairytale mode. For convenience these limitation applies for all messengers.

Used libraries

Credits

Extension points exported contracts — how you extend this code

KeyboardActionListener (Interface)
(no doc) [4 implementers]
app/src/main/java/com/amnesica/kryptey/inputmethod/keyboard/KeyboardActionListener.java
InsetsUpdater (Interface)
(no doc) [3 implementers]
app/src/main/java/com/amnesica/kryptey/inputmethod/compat/ViewOutlineProviderCompatUtils.java
SubtypeChangedListener (Interface)
Interface used to allow some code to run when the virtual subtype changes. [1 implementers]
app/src/main/java/com/amnesica/kryptey/inputmethod/latin/RichInputMethodManager.java
Listener (Interface)
(no doc) [3 implementers]
app/src/main/java/com/amnesica/kryptey/inputmethod/latin/e2ee/E2EEStripView.java
ValueProxy (Interface)
(no doc) [2 implementers]
app/src/main/java/com/amnesica/kryptey/inputmethod/latin/settings/ColorDialogPreference.java

Core symbols most depended-on inside this repo

add
called by 65
app/src/main/java/com/amnesica/kryptey/inputmethod/keyboard/internal/PointerTrackerQueue.java
equals
called by 59
app/src/main/java/com/amnesica/kryptey/inputmethod/latin/Subtype.java
getName
called by 45
app/src/main/java/com/amnesica/kryptey/inputmethod/latin/Subtype.java
getSignalProtocolStore
called by 44
app/src/main/java/com/amnesica/kryptey/inputmethod/signalprotocol/Account.java
addLayout
called by 40
app/src/main/java/com/amnesica/kryptey/inputmethod/latin/utils/SubtypeLocaleUtils.java
size
called by 34
app/src/main/java/com/amnesica/kryptey/inputmethod/keyboard/internal/PointerTrackerQueue.java
getString
called by 33
app/src/main/java/com/amnesica/kryptey/inputmethod/keyboard/internal/KeyStyle.java
getSignalProtocolAddress
called by 32
app/src/main/java/com/amnesica/kryptey/inputmethod/signalprotocol/Session.java

Shape

Method 1,759
Class 202
Interface 15
Enum 6

Languages

Java100%

Modules by API surface

app/src/main/java/com/amnesica/kryptey/inputmethod/latin/LatinIME.java76 symbols
app/src/main/java/com/amnesica/kryptey/inputmethod/keyboard/Key.java76 symbols
app/src/main/java/com/amnesica/kryptey/inputmethod/latin/e2ee/E2EEStripView.java74 symbols
app/src/main/java/com/amnesica/kryptey/inputmethod/keyboard/PointerTracker.java59 symbols
app/src/main/java/com/amnesica/kryptey/inputmethod/signalprotocol/SignalProtocolMain.java44 symbols
app/src/main/java/com/amnesica/kryptey/inputmethod/latin/RichInputMethodManager.java44 symbols
app/src/main/java/com/amnesica/kryptey/inputmethod/keyboard/internal/KeyboardState.java43 symbols
app/src/main/java/com/amnesica/kryptey/inputmethod/keyboard/internal/KeyboardBuilder.java42 symbols
app/src/main/java/com/amnesica/kryptey/inputmethod/keyboard/MainKeyboardView.java39 symbols
app/src/main/java/com/amnesica/kryptey/inputmethod/keyboard/KeyboardSwitcher.java38 symbols
app/src/test/java/com/amnesica/kryptey/inputmethod/signalprotocol/SignalProtocolTest.java34 symbols
app/src/main/java/com/amnesica/kryptey/inputmethod/signalprotocol/util/Base64.java33 symbols

For agents

$ claude mcp add KryptEY \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact