<?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: Burak</title>
    <description>The latest articles on DEV Community by Burak (@burak-dev).</description>
    <link>https://dev.to/burak-dev</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3890574%2F5f98bcf1-c294-48b8-ab4f-ef103e850630.jpg</url>
      <title>DEV Community: Burak</title>
      <link>https://dev.to/burak-dev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/burak-dev"/>
    <language>en</language>
    <item>
      <title>How we built zero-knowledge PDF sharing in the browser</title>
      <dc:creator>Burak</dc:creator>
      <pubDate>Tue, 21 Apr 2026 10:51:41 +0000</pubDate>
      <link>https://dev.to/burak-dev/how-we-built-zero-knowledge-pdf-sharing-in-the-browser-1gic</link>
      <guid>https://dev.to/burak-dev/how-we-built-zero-knowledge-pdf-sharing-in-the-browser-1gic</guid>
      <description>&lt;p&gt;Most “secure file sharing” tools still follow the same pattern:&lt;/p&gt;

&lt;p&gt;upload your file&lt;br&gt;
process it on a server&lt;br&gt;
generate a link&lt;/p&gt;

&lt;p&gt;Even if they mention encryption, the file usually exists on a server at some point.&lt;/p&gt;

&lt;p&gt;We wanted to explore a different model:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;👉 What if the server never sees the actual file?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;⚠️ The problem with traditional file sharing&lt;/strong&gt;&lt;br&gt;
In a typical setup:&lt;/p&gt;

&lt;p&gt;You upload a file&lt;br&gt;
The server stores it&lt;br&gt;
Encryption may happen server-side&lt;br&gt;
You share a link&lt;/p&gt;

&lt;p&gt;This creates a few issues:&lt;/p&gt;

&lt;p&gt;your file is stored somewhere you don’t control&lt;br&gt;
you rely on deletion policies&lt;br&gt;
you trust how encryption is implemented&lt;/p&gt;

&lt;p&gt;Even with “secure” tools, trust is still required.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🔐 A different approach: client-side encryption&lt;/strong&gt;&lt;br&gt;
Instead of sending raw files to a server, we flipped the flow:&lt;/p&gt;

&lt;p&gt;File is encrypted in the browser&lt;br&gt;
Only encrypted data (ciphertext) is sent&lt;br&gt;
Decryption happens on the recipient’s side&lt;br&gt;
The server never sees the original file&lt;/p&gt;

&lt;p&gt;This is often called a zero-knowledge model.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How it works (simplified)&lt;/strong&gt;&lt;br&gt;
At a high level:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;User selects file&lt;br&gt;
→ Browser generates encryption key&lt;br&gt;
→ File is encrypted locally (Web Crypto API)&lt;br&gt;
→ Encrypted blob is uploaded&lt;br&gt;
→ Shareable link contains access info&lt;br&gt;
→ Recipient decrypts in browser&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Key points:&lt;br&gt;
encryption happens before any network request&lt;br&gt;
keys are generated client-side&lt;br&gt;
server only handles encrypted data&lt;br&gt;
no plaintext file is ever stored&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🔑 Key management&lt;/strong&gt;&lt;br&gt;
This is where things get tricky.&lt;/p&gt;

&lt;p&gt;You have a few options:&lt;/p&gt;

&lt;p&gt;embed the key in the URL (simple, less strict security)&lt;br&gt;
share key separately (more secure, worse UX)&lt;br&gt;
derive key from password (balanced approach)&lt;/p&gt;

&lt;p&gt;Each choice affects:&lt;/p&gt;

&lt;p&gt;👉 usability vs security&lt;/p&gt;

&lt;p&gt;There’s no perfect answer — only tradeoffs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;⚖️ Tradeoffs we encountered&lt;/strong&gt;&lt;br&gt;
Building this model surfaced some real constraints:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. UX complexity&lt;/strong&gt;&lt;br&gt;
Users expect “upload → share → done”&lt;/p&gt;

&lt;p&gt;Adding encryption introduces:&lt;/p&gt;

&lt;p&gt;key handling&lt;br&gt;
potential confusion&lt;br&gt;
edge cases&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Performance&lt;/strong&gt;&lt;br&gt;
Encrypting large files in-browser:&lt;/p&gt;

&lt;p&gt;uses CPU&lt;br&gt;
can block UI if not handled properly&lt;/p&gt;

&lt;p&gt;Solution:&lt;/p&gt;

&lt;p&gt;streaming / chunking&lt;br&gt;
Web Workers (optional)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. No server-side processing&lt;/strong&gt;&lt;br&gt;
You lose:&lt;/p&gt;

&lt;p&gt;preview generation&lt;br&gt;
indexing&lt;br&gt;
content-based features&lt;/p&gt;

&lt;p&gt;Because:&lt;br&gt;
👉 the server literally cannot read the file&lt;/p&gt;

&lt;p&gt;💡 When this model makes sense&lt;/p&gt;

&lt;p&gt;Client-side encryption is ideal when:&lt;/p&gt;

&lt;p&gt;privacy matters more than convenience&lt;br&gt;
files are sensitive&lt;br&gt;
you want to minimize trust&lt;/p&gt;

&lt;p&gt;Less ideal when:&lt;/p&gt;

&lt;p&gt;you need heavy processing&lt;br&gt;
collaboration features are required&lt;br&gt;
speed is the top priority&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🚀 Final thoughts&lt;/strong&gt;&lt;br&gt;
Most tools optimize for:&lt;/p&gt;

&lt;p&gt;👉 speed&lt;br&gt;
👉 features&lt;br&gt;
👉 convenience&lt;/p&gt;

&lt;p&gt;Very few optimize for:&lt;/p&gt;

&lt;p&gt;👉 not having access to your data at &lt;strong&gt;all&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Building a zero-knowledge model is possible today — especially with modern browser APIs — but it forces you to rethink product design from the ground up.&lt;/p&gt;

&lt;p&gt;If you’re building anything around files, it’s worth asking:&lt;/p&gt;

&lt;p&gt;Does your server actually need to see the data?&lt;/p&gt;

&lt;p&gt;We’ve been experimenting with this approach for secure PDF sharing here:&lt;br&gt;
&lt;/p&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
        &lt;div class="c-embed__cover"&gt;
          &lt;a href="https://pdfpro.tools/secure-transfer" class="c-link align-middle" rel="noopener noreferrer"&gt;
            &lt;img alt="" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fpdfpro.tools%2Fog-image.png" height="400" class="m-0" width="800"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="c-embed__body"&gt;
        &lt;h2 class="fs-xl lh-tight"&gt;
          &lt;a href="https://pdfpro.tools/secure-transfer" rel="noopener noreferrer" class="c-link"&gt;
            Secure PDF Transfer — End-to-End Encrypted | PDF Pro
          &lt;/a&gt;
        &lt;/h2&gt;
          &lt;p class="truncate-at-3"&gt;
            Send PDFs securely with end-to-end encryption. Your files are encrypted in your browser — we never see your documents or your password.
          &lt;/p&gt;
        &lt;div class="color-secondary fs-s flex items-center"&gt;
            &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fpdfpro.tools%2Flogo-icon.svg" width="512" height="512"&gt;
          pdfpro.tools
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


</description>
      <category>privacy</category>
      <category>security</category>
      <category>showdev</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Hello world!</title>
      <dc:creator>Burak</dc:creator>
      <pubDate>Tue, 21 Apr 2026 10:44:25 +0000</pubDate>
      <link>https://dev.to/burak-dev/hello-world-2gpg</link>
      <guid>https://dev.to/burak-dev/hello-world-2gpg</guid>
      <description></description>
    </item>
  </channel>
</rss>
