<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Francesco Dell'Orto</title>
    <description>The latest articles on DEV Community by Francesco Dell'Orto (@dello09).</description>
    <link>https://dev.to/dello09</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4254149%2F911fb529-b820-41bc-8b53-0deb9d23b6a5.png</url>
      <title>DEV Community: Francesco Dell'Orto</title>
      <link>https://dev.to/dello09</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dello09"/>
    <language>en</language>
    <item>
      <title>Ratchet-USB: encrypted messages over any chat, without a server</title>
      <dc:creator>Francesco Dell'Orto</dc:creator>
      <pubDate>Thu, 19 Nov 2026 17:28:42 +0000</pubDate>
      <link>https://dev.to/dello09/ratchet-usb-encrypted-messages-over-any-chat-without-a-server-43pe</link>
      <guid>https://dev.to/dello09/ratchet-usb-encrypted-messages-over-any-chat-without-a-server-43pe</guid>
      <description>&lt;p&gt;I decided to create &lt;strong&gt;Ratchet-USB&lt;/strong&gt; because I kept running into the same problem: sometimes you need to send a password, an IBAN, a recovery phrase, or a small document, and the only practical option is to paste it into a chat.&lt;/p&gt;

&lt;p&gt;And then it stays there, potentially for years.&lt;/p&gt;

&lt;p&gt;It stayss on both phones. It ends up in backups. It ends up in an email inbox. And months later, nobody remembers where it is.&lt;/p&gt;

&lt;p&gt;I wanted something I could use only when I needed it.&lt;/p&gt;

&lt;p&gt;Ratchet-USB tries to solve this problem.&lt;/p&gt;

&lt;p&gt;You write the message locally, the program encrypts it, and you copy the encrypted block. Then you send that block through WhatsApp, email, Telegram, a forum, or whatever you were already using. The other person pastes it into their copy of Ratchet-USB and reads thye original message.&lt;/p&gt;

&lt;p&gt;The chat can see that a block was sent, and when. It cannot read what is inside.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it is not
&lt;/h2&gt;

&lt;p&gt;Of course it is not yet another ordinary messaging app, and of course it does not replace Signal. Signal is obviously better for talking to people all day: normal chats, calls, groups, notifications, and everything else that makes a classic messaging app useful.&lt;/p&gt;

&lt;p&gt;Ratchet-USB is built both for the occasional message that carries something more sensitive than the conversation around it, and above all for all the people who work and live in contexts where they need a private communication channel with others, but the country they are in heavily restricts the use of encrypted messaging apps. Ratchet-USB tries to solve this problem because, by using over-the-top (OTT) encryption, you can send the encrypted block through traditional channels (like SMS, email, etc.).&lt;/p&gt;

&lt;h2&gt;
  
  
  How it works
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fv5z76exgkp09yfjlpsyo.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fv5z76exgkp09yfjlpsyo.jpg" alt=" " width="800" height="427"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You create an encrypted vault on a USB drive or in a local folder.&lt;/p&gt;

&lt;p&gt;That vault holds your identity, contacts, and session state. The USB drive is not the key. The vault is protected by a passphrase that Ratchet-USB generates when you create it.&lt;/p&gt;

&lt;p&gt;When you create a vault, the program shows you two things, once:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A 12-word recovery phrase&lt;/li&gt;
&lt;li&gt;A separate vault passphrase&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The recovery phrase can rebuild your identity, but not your contacts, prekeys, or conversations. The passphrase unlocks the vault file. They are two different things, and you should keep them separate. To talk to someone, you exchange contact cards. Before trusting them, you compare their fingerprint over a phone call, in person, or through another channel you both control.&lt;/p&gt;

&lt;p&gt;After that, you can send messages.&lt;/p&gt;

&lt;p&gt;A normal exchange looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ratchet-usb init
ratchet-usb card &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; my-card.txt
ratchet-usb add alice --card alice-card.txt
ratchet-usb trust alice
ratchet-usb send alice
ratchet-usb recv
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;send&lt;/code&gt; produces an encrypted block. You copy it and paste it anywhere. The other person runs &lt;code&gt;recv&lt;/code&gt;, pastes the block, and gets the message. The app also comes with a graphical version (GUI) that makes it even easier to use for people who are not comfortable with technology.&lt;/p&gt;

&lt;h2&gt;
  
  
  What actually happens during this operation
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4hizmiilca1u0zvdyjda.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4hizmiilca1u0zvdyjda.jpg" alt=" " width="800" height="467"&gt;&lt;/a&gt;&lt;br&gt;
So, each identity has an Ed25519 key and an ML-DSA-65 key. A contact card contains the public identity keys, X25519 and ML-KEM-768 prekeys, and signatures over the card.&lt;/p&gt;

&lt;p&gt;The first message uses a hybrid X25519 and ML-KEM-768 handshake. Both people then derive state for a classical Double Ratchet and for Signal's Sparse Post Quantum Ratchet, or SPQR. For every later message, each ratchet produces a key. Ratchet-USB combines those keys to encrypt the text. The SPQR message, classical header, and handshake fields are authenticated together with the ciphertext. The session advances only after that succeeds.&lt;/p&gt;

&lt;p&gt;New contact cards use suite 4, which uses the X-Wing handshake combiner. Older suite 2 cards keep their original message format. An already-established session does not change protocol while it is active.&lt;/p&gt;
&lt;h2&gt;
  
  
  Sharing small files and having a multi-user chat
&lt;/h2&gt;

&lt;p&gt;You can also send a file with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ratchet-usb send alice --file contract.pdf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The file is encrypted through the same ratchet and becomes part of the block. No upload, no link, no external storage. The block gets bigger, roughly a third larger once armored, and a single file can be up to 4 MiB.&lt;/p&gt;

&lt;p&gt;When the recipient runs &lt;code&gt;recv&lt;/code&gt;, Ratchet-USB recognizes the file and offers to open it from a temporary folder. That folder is removed when the program closes.&lt;/p&gt;

&lt;p&gt;For more than one person:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ratchet-usb group-send --to alice --to bob
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The message is encrypted once under a random content key. That key is then wrapped separately for each recipient through the existing one-to-one session with them. Everyone receives the same outer block. &lt;code&gt;recv&lt;/code&gt; finds the wrapper addressed to the local vault and decrypts the shared content. The block shows how many recipients there are, but not who they are.&lt;/p&gt;

&lt;h2&gt;
  
  
  Ephemeral messages
&lt;/h2&gt;

&lt;p&gt;You can also mark a message as ephemeral with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ratchet-usb send alice --ttl 24h
ratchet-usb send alice --burn
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The mark is inside the encrypted text, so it is authenticated and never appears in cleartext.&lt;/p&gt;

&lt;p&gt;But let's be honest: of course this is a best-effort mechanism, not a revocation.&lt;/p&gt;

&lt;p&gt;The desktop GUI starts a timer when you open the receive dialog and wipes what it showed when the timer fires. The terminal interface prints the plaintext to stdout, so scrollback or redirected output can still keep a copy. &lt;code&gt;--burn&lt;/code&gt; asks for a single reading; it does not stop screenshots, copies, or a modified client.&lt;/p&gt;

&lt;p&gt;The vault does not keep message history, so there is nothing to delete later. There is only something that has to stop being displayed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I chose not to use central servers
&lt;/h2&gt;

&lt;p&gt;You will have noticed that throughout this article I have never mentioned a Ratchet-USB account, a phone number to verify, or servers that let you exchange messages.&lt;/p&gt;

&lt;p&gt;Your identity is a file protected by a passphrase. The encrypted message travels through the channel you already use.&lt;/p&gt;

&lt;p&gt;That means there is no service in the middle that can be breached, subpoenaed, shut down, or change its terms in a way that affects your messages.&lt;/p&gt;

&lt;p&gt;But be careful: this does not make the transport invisible. In fact, WhatsApp, Telegram, or your email provider can still see who you talk to, when, and roughly how large the block is.&lt;/p&gt;

&lt;h2&gt;
  
  
  Security limits
&lt;/h2&gt;

&lt;p&gt;I care about this paragraph in particular. This is version 0.5.0-dev. The post-quantum migration is implemented, but it has not had an independent security review.&lt;/p&gt;

&lt;p&gt;A signed contact card proves that its fields belong to one identity. It does not prove that the identity belongs to the person you meant to contact. That is why fingerprint verification is important, if not essential.&lt;/p&gt;

&lt;p&gt;A compromised computer can read passphrases and messages while the program is open. Opening a received file writes its decrypted bytes to a private folder on the host, and removes that folder when the program closes, but the file is plaintext on the host until then.&lt;/p&gt;

&lt;p&gt;The Rust SPQR bridge wipes and best-effort locks the secret buffers it hands back to C++, but the vendored crate still uses ordinary heap allocations while it runs. On top of that, immediate erasure of every copy in memory is not guaranteed.&lt;/p&gt;

&lt;p&gt;Older copies of the vault may also remain on the physical storage of a USB drive after a save.&lt;/p&gt;

&lt;p&gt;Do not use this development version as the only protection for high-risk communications.&lt;/p&gt;

&lt;h2&gt;
  
  
  Installing it
&lt;/h2&gt;

&lt;p&gt;The easiest way to try it on Linux is to download the signed AppImage from the GitHub Releases page:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/Francy2009/Ratchet-USB/releases" rel="noopener noreferrer"&gt;https://github.com/Francy2009/Ratchet-USB/releases&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;chmod +x Ratchet-USB-x86_64.AppImage
./Ratchet-USB-x86_64.AppImage
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The AppImage includes the CLI and the optional Qt GUI.&lt;/p&gt;

&lt;p&gt;If you want to build it from source, you need a C++20 compiler, CMake, libsodium, OpenSSL 3.5+, Rust 1.88+, and Cargo.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/Francy2009/Ratchet-USB.git
&lt;span class="nb"&gt;cd&lt;/span&gt; Ratchet-USB
./setup.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The script builds the project, runs the tests, and installs the executable in &lt;code&gt;~/.local/bin&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I would like feedback on
&lt;/h2&gt;

&lt;p&gt;I would really appreciate feedback above all on the code: if you find any vulnerabilities, please report them following the rules of responsible disclosure; whether the setup process is clear; or whether anything feels confusing, fragile, or unnecessarily complicated.&lt;/p&gt;

&lt;p&gt;The repository is here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/Francy2009/Ratchet-USB" rel="noopener noreferrer"&gt;https://github.com/Francy2009/Ratchet-USB&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks for reading. If you try it, I would be happy to hear what worked, what did not, and what you would change.&lt;/p&gt;

&lt;p&gt;P.S.: I used AI to review the text after I wrote it in English.&lt;/p&gt;

</description>
      <category>rust</category>
      <category>cybersecurity</category>
      <category>cryptography</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
