<?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: Pascal Kuhn</title>
    <description>The latest articles on DEV Community by Pascal Kuhn (@carl0oo).</description>
    <link>https://dev.to/carl0oo</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%2F4008225%2F8ced0eec-ba9d-45d4-af5e-aedeed185280.png</url>
      <title>DEV Community: Pascal Kuhn</title>
      <link>https://dev.to/carl0oo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/carl0oo"/>
    <language>en</language>
    <item>
      <title>I Built a B2B Password Manager in Rust</title>
      <dc:creator>Pascal Kuhn</dc:creator>
      <pubDate>Mon, 29 Jun 2026 14:16:16 +0000</pubDate>
      <link>https://dev.to/carl0oo/i-built-a-b2b-password-manager-in-rust-2oij</link>
      <guid>https://dev.to/carl0oo/i-built-a-b2b-password-manager-in-rust-2oij</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;💡 &lt;strong&gt;TL;DR:&lt;/strong&gt;  I built a file-based B2B password manager in Rust with multi-user encryption (DEK wrapping, no server required).&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  A practical look at building secure multi-user encryption without a server.
&lt;/h2&gt;

&lt;p&gt;At our office, passwords lived in a shared Excel file.&lt;/p&gt;

&lt;p&gt;Yeah..., I know.&lt;/p&gt;

&lt;p&gt;But if we're being realistic, most people have seen worse.&lt;/p&gt;

&lt;p&gt;I started looking at alternatives.&lt;/p&gt;

&lt;p&gt;Bitwarden is great, but it wants a server.&lt;br&gt;
KeePass works well, but multi-user support never really felt like a first-class use case.&lt;br&gt;
LastPass had… its moment.&lt;br&gt;
And 1Password means subscriptions and trusting the cloud.&lt;/p&gt;

&lt;p&gt;What I wanted felt surprisingly simple:&lt;/p&gt;

&lt;p&gt;An encrypted file sitting on a file server.&lt;br&gt;
No Docker. No VPS. No subscription.&lt;/p&gt;

&lt;p&gt;Just a vault multiple people could access — each with their own password.&lt;/p&gt;

&lt;p&gt;So I built it.&lt;/p&gt;


&lt;h2&gt;
  
  
  Why Rust Ended Up Being the Right Choice
&lt;/h2&gt;

&lt;p&gt;I could have built this faster in Python or Go.&lt;/p&gt;

&lt;p&gt;But a password manager that leaves secrets hanging around in memory isn't a password manager — it's a liability.&lt;/p&gt;

&lt;p&gt;That’s where Rust made sense.&lt;/p&gt;

&lt;p&gt;Its ownership model removes an entire class of memory-related mistakes from the equation.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;zeroize&lt;/code&gt; crate quickly became essential. Every sensitive buffer gets explicitly wiped when it leaves scope:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;master_key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Zeroizing&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nb"&gt;Vec&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nb"&gt;u8&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;derive_key&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;password&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c1"&gt;// Automatically wiped when dropped&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  The Multi-User Problem Is Harder Than It Looks
&lt;/h2&gt;

&lt;p&gt;Single-user encryption is relatively straightforward.&lt;/p&gt;

&lt;p&gt;Multi-user encryption without a server gets interesting fast.&lt;/p&gt;

&lt;p&gt;The obvious approach is one shared master password.&lt;/p&gt;

&lt;p&gt;Which sounds convenient — until someone leaves the company.&lt;/p&gt;

&lt;p&gt;Now you're rotating passwords, re-encrypting data, distributing credentials, and inevitably doing it at the worst possible time.&lt;/p&gt;

&lt;p&gt;So I ended up with DEK wrapping.&lt;/p&gt;

&lt;h3&gt;
  
  
  Vault structure
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Vault payload
└── Encrypted using DEK (random, never changes)

Each user:
└── KEK derived from user password (Argon2id)

└── DEK wrapped with that KEK
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each person has their own password.&lt;/p&gt;

&lt;p&gt;Removing a user means deleting their wrapped DEK entry.&lt;/p&gt;

&lt;p&gt;The vault itself never needs to be re-encrypted.&lt;/p&gt;

&lt;p&gt;Getting there took three format versions.&lt;/p&gt;

&lt;p&gt;Not ideal — but at least the migration code survived.&lt;/p&gt;




&lt;h2&gt;
  
  
  Tauri Was the Right Choice — Mostly
&lt;/h2&gt;

&lt;p&gt;One thing I didn't expect:&lt;/p&gt;

&lt;p&gt;The security boundary became incredibly clean.&lt;/p&gt;

&lt;p&gt;The React frontend never touches key material directly.&lt;/p&gt;

&lt;p&gt;Secrets move through a single command with rate limiting in place:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="nd"&gt;#[tauri::command]&lt;/span&gt;
&lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;reveal_secret&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;State&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nv"&gt;'_&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;AppState&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;entry_id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;Result&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;rate_limit_check&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// 5 requests per 60 seconds&lt;/span&gt;
    &lt;span class="nf"&gt;ensure_vault_unlocked&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The browser extension via Native Messaging turned out to be harder.&lt;/p&gt;

&lt;p&gt;Keeping the connection alive without creating focus loops while the app was minimized to the system tray took three complete rewrites.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Unexpected PDF Detour
&lt;/h2&gt;

&lt;p&gt;I needed PDF exports for GDPR compliance reports.&lt;/p&gt;

&lt;p&gt;First attempt: &lt;code&gt;printpdf&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Two days later: a high-severity vulnerability in &lt;code&gt;lopdf&lt;/code&gt;, no upstream fix.&lt;/p&gt;

&lt;p&gt;Second attempt: jsPDF in the frontend.&lt;/p&gt;

&lt;p&gt;Client-side. Offline. UTF-8 behaved properly. Output looked professional.&lt;/p&gt;

&lt;p&gt;In hindsight, I should have started there.&lt;/p&gt;

&lt;p&gt;Lesson learned:&lt;/p&gt;

&lt;p&gt;Use the simplest solution first — especially for things that aren't your core product.&lt;/p&gt;




&lt;h2&gt;
  
  
  What I Got Wrong
&lt;/h2&gt;

&lt;h3&gt;
  
  
  I wrote everything in German first
&lt;/h3&gt;

&lt;p&gt;My target market was DACH, so it felt reasonable.&lt;/p&gt;

&lt;p&gt;The first comment on r/rust:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"readme.de.md — very few people here speak German."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So this week I translated everything.&lt;/p&gt;




&lt;h3&gt;
  
  
  I built too many features before talking to users
&lt;/h3&gt;

&lt;p&gt;SSH Quick Connect.&lt;br&gt;
Git sync.&lt;br&gt;
GPO policy management.&lt;/p&gt;

&lt;p&gt;All before having a single real customer.&lt;/p&gt;

&lt;p&gt;Some of it was genuinely fun to build.&lt;/p&gt;

&lt;p&gt;Whether anyone actually needs it is still an open question.&lt;/p&gt;




&lt;h3&gt;
  
  
  I underestimated the system tray
&lt;/h3&gt;

&lt;p&gt;It seemed trivial.&lt;/p&gt;

&lt;p&gt;It wasn't.&lt;/p&gt;

&lt;p&gt;The interaction between minimize-to-tray, auto-lock policies, browser extension behavior, and focus management created bugs I'm still untangling.&lt;/p&gt;




&lt;h2&gt;
  
  
  Where OxidVault Stands Today
&lt;/h2&gt;

&lt;p&gt;OxidVault v2.2.0 currently runs on Windows and includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Multi-user vaults (per-user password + TOTP)&lt;/li&gt;
&lt;li&gt;ISO 27001 audit logs with SHA-256 hash chaining&lt;/li&gt;
&lt;li&gt;GDPR compliance PDF export&lt;/li&gt;
&lt;li&gt;SSH Quick Connect with host key verification&lt;/li&gt;
&lt;li&gt;Browser extension via Native Messaging&lt;/li&gt;
&lt;li&gt;Configurable auto-lock timer in the UI&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Community Edition is free for up to 5 users (AGPLv3).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GitHub&lt;/strong&gt;&lt;br&gt;
👉 &lt;a href="https://github.com/caRl0oo/oxidvault" rel="noopener noreferrer"&gt;https://github.com/caRl0oo/oxidvault&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Website&lt;/strong&gt;&lt;br&gt;
👉 &lt;a href="https://oxidvault.com" rel="noopener noreferrer"&gt;https://oxidvault.com&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;p&gt;Windows toast notifications for expiring passwords — the underlying logic already exists.&lt;/p&gt;

&lt;p&gt;And more importantly:&lt;/p&gt;

&lt;p&gt;Actually talking to users.&lt;/p&gt;

&lt;p&gt;That’s something I should have done much earlier.&lt;/p&gt;

&lt;p&gt;If you have thoughts on the crypto architecture or the DEK-wrapping approach, I'd genuinely love to hear them.&lt;/p&gt;

</description>
      <category>security</category>
      <category>opensource</category>
      <category>webdev</category>
      <category>rust</category>
    </item>
  </channel>
</rss>
