Crates.io | otrr |
lib.rs | otrr |
version | 0.7.3 |
source | src |
created_at | 2024-03-18 14:54:28.369555 |
updated_at | 2024-08-23 18:48:30.83426 |
description | otrr — OTR protocol version 3 and 4 |
homepage | |
repository | https://github.com/cobratbq/otrr |
max_upload_size | |
id | 1177860 |
size | 1,697,731 |
OTR in rust.
status work-in-progress, OTRv4 functional, tested against otr4j, further fine-tuning likely when gaining adoption.
An (minimal) "example" client is available at echonetwork, which is used for interoperability testing with otr4j.
crypto
)0.7.3
tick
value on every fragment. Highest tick
value represents the (incomplete) message most recently updated with an incoming fragment.250 KiB
to prevent abuse. Fragments are refused when exceeding this limit.100 MiB
to prevent abuse. All fragments of a message are evicted when their combined size exceeds this limit.0.7.2
100
(incomplete) messages. After reaching this limit, the oldest message will be removed from the assembler.0.7.1
0.7.0
Initial release.
TODO write design considerations here
TODO document implementation considerations, such as periodically calling `expire` to facilitate session expiration. (Or find a good way to have it timed, thread-safe without causing interference.)
☐: feature, ☑: implemented, ✔: verified
Functionality:
REQUIRE_ENCRYPTION
take appropriate actions given that active policy requires encryption.WHITESPACE_START_AKE
automatically initiate AKE when whitespace tag is received.ERROR_START_AKE
initiate AKE upon receiving error message.REQUIRE_ENCRYPTION
policy, in-progress AKE, etc.)8
in OTR3, TLV type 7
in OTRv4)Operational:
100
250 kiB
100 MiB
Account
represents single account on a chat network: allows for specific identity (DSA keypair), chat network/transport.Developmental:
Account
to the corresponding chat account logic is sufficient, and additional management risks prescribing a certain structure to the host application (e.g. chat application).Host
as provided by the client.std::panic::catch_unwind
is not guaranteed to catch and handle all panics.(Will not be implemented) Message-queue for delayed sending: the idea is to queue messages under certain policies or when sending messages while the (D)AKE is in progress. However, as of OTR version 3, instance-tags were added to support distinguishing and identifying multiple clients operating under the same account when OTR sessions are active. Upon establishing an OTR session, sessions may be established simultaneously for each of the active clients - each having their own instance-tag. Stored messages would be sent to the (first) established session, which may not be the client you intended the messages to go to. In addition, the client that supports only lower protocol versions, will likely establish a session fastest.
How to deal with multiple instances, "default instance", "selected/active instance"? Especially when dealing with incidental reception of plaintext messages while encrypted session is established for some instance.
The OTR specification documents that any message payload is in UTF-8 and may contain HTML. However, this makes it ambiguous for how the content should be interpreted and results and risks may very per chat network.
There is no convention on how the Extra Symmetric Key should be used.