<?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: Cosmin Gheorghita</title>
    <description>The latest articles on DEV Community by Cosmin Gheorghita (@degecko).</description>
    <link>https://dev.to/degecko</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%2F3579506%2F276117d9-9679-4a9c-9776-3c032ad6d025.png</url>
      <title>DEV Community: Cosmin Gheorghita</title>
      <link>https://dev.to/degecko</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/degecko"/>
    <language>en</language>
    <item>
      <title>Building a zero-knowledge secrets manager with zero crypto knowledge</title>
      <dc:creator>Cosmin Gheorghita</dc:creator>
      <pubDate>Fri, 24 Oct 2025 09:47:15 +0000</pubDate>
      <link>https://dev.to/degecko/building-a-zero-knowledge-secrets-manager-with-zero-crypto-knowledge-3kne</link>
      <guid>https://dev.to/degecko/building-a-zero-knowledge-secrets-manager-with-zero-crypto-knowledge-3kne</guid>
      <description>&lt;p&gt;&lt;em&gt;Way the way back&lt;/em&gt; on 5 Sep 2025, less than two months ago, I decided that I wanted to work on a side project. So I've started looking for ideas of things I could build.&lt;/p&gt;

&lt;p&gt;Three days later, after navigating an ocean of new AI apps to see if I could get inspired, and getting frustrated with not finding anything, I was beginning to lose hope a little. I'm about to be a father for the first time in a few months, (writing it down just gave me chills,) I keep imagining in my head a scenario in which my daughter asks me something I can't explain and then turns to ChatGPT and &lt;em&gt;it&lt;/em&gt; can explain it perfectly, and what she'll think of me when that happens repeatedly. I wonder what I would say to her if she'd ask me why I didn't know that.&lt;/p&gt;

&lt;p&gt;Somehow that actually inspired me to use ChatGPT myself even more, maybe on some level I hope to make it make me learn how to beat it. So I've started feeding ChatGPT my skillset and spamming it with '&lt;strong&gt;another list&lt;/strong&gt; [of stuff I could build].' And then, I've reached an idea that would both solve my own need and, at the same time, be good enough to not loose interest while building it: a passwords/secrets manager that allows sharing between team members.&lt;/p&gt;

&lt;p&gt;I've actually looked through my teams' discussions across multiple chat apps and the amount of times I've asked people for password and SSH access keys is nothing to ignore. I've actually remembered thinking multiple times 'we need a better way for this.'&lt;/p&gt;

&lt;p&gt;ChatGPT informed me that most people have a spreadsheet of passwords that they share with the team. That sounds extremely insecure and brittle. To share some of the passwords you have to create separate files and copy/paste stuff around. That quickly turns into sharing stuff with people that don't need that kind of access. Not to mention that it's a pain to create those files in the first place, so people turn to asking every time for them, which is what we are also doing in my team.&lt;/p&gt;

&lt;p&gt;I've been a full stack web developer and designer for over 15 years, but cryptography, which was a skill I needed for this idea, was not part of my skillset. I do enjoy a challenge though, so I decided that I would make ChatGPT teach me the bare bones of it and see if I can grasp it quick enough to build something.&lt;/p&gt;

&lt;p&gt;Turns out ChatGPT is a great teacher, even to students that want to learn something they know almost nothing about. A great tip I've discovered is that you can ask it to re-explain something using your own understanding. For example, I've asked it at first to explain how such an app would work, and it quickly filled the screen with cryptography jargon which made me feel inadequate for such a challenge.&lt;/p&gt;

&lt;p&gt;A stroke of luck made me remind it that I'm just a web developer, I don't really understand all that, and... it worked. The very next answer was the same stuff re-explained using my own terms. That is to say, it actually applied my knowledge of PHP and JavaScript and rewrote every bit of jargon using PHP and JS key words. Might seem weird to some, but it worked like a charm for me.&lt;/p&gt;

&lt;p&gt;I had a pretty basic idea before of how passwords managers derive access keys from one's password at login and encrypt/decrypt everything on device, forming a 'no knowledge' system. By no knowledge I mean that the service itself would not be able to decrypt the stored secrets even if they wanted to. I've quickly found out there's actually a term for that: a zero-knowledge system.&lt;/p&gt;

&lt;p&gt;Fast forward to when I'm writing this post, it's 23 Oct (yes, still 2025, future reader interested in a future billionaire's success story,) and I'm ready to talk about &lt;a href="https://www.assetspan.com" rel="noopener noreferrer"&gt;Assetspan.com&lt;/a&gt;. Look, do I hope to become rich from this? Yes. But that's not to say that this is not useful.&lt;/p&gt;

&lt;p&gt;I known that adding a link to this post turns it instantly into an advertorial, but how else do I demonstrate what I'm saying if I don't give  you the opportunity to mess with it. You're not forced to sign up, that's why I've stuck the asset creation form right there on the home page. Take a look and criticise it. That's all I hope for.&lt;/p&gt;

&lt;p&gt;Actually, I'll even give you a pro tip to abuse the business plan which relies on creating multiple assets. You can create a single asset and use as many credential fields as possible. So why not add as many user/pass combos as possible onto a single asset?!&lt;/p&gt;

&lt;p&gt;Kidding aside, there are probably other apps for storing and sharing secrets which I couldn't find during my research, and, as it always happens, I find out about only after I decide to build one myself and spend a bunch of time on.&lt;/p&gt;

&lt;p&gt;Anyway, if this is something you are or were interested in, then I hope my attention to detail, the design, the ease of use, the fast loading times, or maybe the fact that it features both light and dark themes, could win you over to at least trying the app before dismissing it.&lt;/p&gt;

&lt;p&gt;Nonetheless, here's one final tip for making ChatGPT work better; tell it a lot about yourself as a professional person. I mean about your skillset, your likes and dislikes in terms of coding/working/writing/thinking. Oh, and make sure you correct it when it's wrong, don't just assume it can't do better. You'd be surprised how quickly it corrects itself and starts to actually perform better for you.&lt;/p&gt;

&lt;p&gt;And, I guess, my reply to my daughter would be that I'm just a fool — not a tool — and that's why I don't know most stuff, unlike ChatGPT.&lt;/p&gt;

</description>
      <category>motivation</category>
      <category>security</category>
      <category>sideprojects</category>
    </item>
    <item>
      <title>Learning Cryptography with ChatGPT: Building Assetspan, a Zero-Knowledge Secrets Manager</title>
      <dc:creator>Cosmin Gheorghita</dc:creator>
      <pubDate>Thu, 23 Oct 2025 14:38:49 +0000</pubDate>
      <link>https://dev.to/degecko/learning-cryptography-with-chatgpt-building-assetspan-a-zero-knowledge-secrets-manager-23gn</link>
      <guid>https://dev.to/degecko/learning-cryptography-with-chatgpt-building-assetspan-a-zero-knowledge-secrets-manager-23gn</guid>
      <description>&lt;p&gt;On September 5th, 2025, I decided to build a side project.&lt;/p&gt;

&lt;p&gt;Three days later, I was surrounded by dozens of AI startup ideas, none of them good enough to make me want to open my editor. At the same time, I kept thinking about becoming a father soon — and the thought hit me:&lt;/p&gt;

&lt;p&gt;What if one day my daughter asks me something I can’t explain, then asks ChatGPT — and it answers better than me?&lt;/p&gt;

&lt;p&gt;Instead of sulking about it, I did the only reasonable thing: I made ChatGPT teach me things I didn’t know — starting with cryptography.&lt;/p&gt;

&lt;p&gt;That’s how Assetspan was born: a zero-knowledge secret manager for teams — built by someone who knew very little about cryptography two months ago.&lt;/p&gt;

&lt;h2&gt;
  
  
  Teaching ChatGPT to Teach Me
&lt;/h2&gt;

&lt;p&gt;At first, I did what everyone does:&lt;br&gt;
“Explain how a zero-knowledge password manager works.”&lt;/p&gt;

&lt;p&gt;It threw every crypto term it could find: KDFs, salting, nonce generation, symmetric key wrapping, HMAC authentication…&lt;/p&gt;

&lt;p&gt;I was about to give up — until I told it this:&lt;/p&gt;

&lt;p&gt;“Explain it like I’m a full-stack PHP + JS developer who knows nothing about cryptography.”&lt;/p&gt;

&lt;p&gt;That changed everything. It started using analogies with Laravel’s Hash::make(), everything was suddenly a PHP variable, etc.&lt;/p&gt;

&lt;p&gt;Lesson learned:&lt;br&gt;
If you want ChatGPT to be useful, first teach it who you are.&lt;/p&gt;

&lt;h2&gt;
  
  
  Zero-Knowledge in Developer Terms
&lt;/h2&gt;

&lt;p&gt;A zero-knowledge secrets manager means:&lt;br&gt;
    • The server stores encrypted data only.&lt;br&gt;
    • The encryption key is never sent to the server.&lt;br&gt;
    • Even if someone steals the database — they get nothing useful.&lt;br&gt;
    • Even I, as the creator, can’t decrypt your data.&lt;/p&gt;

&lt;p&gt;To do this, I needed 3 core ideas:&lt;br&gt;
    1.  Master Password → Master Key&lt;br&gt;
    2.  Every asset (password entry, SSH key, license, etc.) gets its own encryption key&lt;br&gt;
    3.  Shared secrets don’t leak keys to the server or other users&lt;/p&gt;

&lt;p&gt;Key Hierarchy (The Heart of The System)&lt;/p&gt;

&lt;p&gt;User Password (not stored anywhere)&lt;br&gt;
       ↓&lt;br&gt;
Argon2id → Master Key (UserKey)&lt;br&gt;
       ↓&lt;br&gt;
Encrypts → KEK (Key Encryption Key)&lt;br&gt;
       ↓&lt;br&gt;
KEK encrypts → AEAKs (per-asset keys)&lt;br&gt;
       ↓&lt;br&gt;
AEAK encrypts → Secrets (passwords, SSH keys, API tokens)&lt;/p&gt;

&lt;h2&gt;
  
  
  Deriving the Master Key (JS example)
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt; &lt;span class="nf"&gt;deriveMasterKey&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;password&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;params&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;UserKeys&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;salt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;b64dec&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;params&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;salt&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;nonce&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;b64dec&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;params&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;private_blob&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;nonce&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;ciphertext&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;b64dec&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;params&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;private_blob&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;cipher&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="c1"&gt;// Derive KEK with Argon2id&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;KEK&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;sodium&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;crypto_pwhash&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="nx"&gt;params&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;key_size&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nx"&gt;sodium&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;from_string&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;password&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="nx"&gt;salt&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nx"&gt;params&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ops&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nx"&gt;params&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;mem&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;1024&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nx"&gt;sodium&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;crypto_pwhash_ALG_ARGON2ID13&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="c1"&gt;// Decrypt private key&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;privKey&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;sodium&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;crypto_secretbox_open_easy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="nx"&gt;ciphertext&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;nonce&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;KEK&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="nx"&gt;sodium&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;memzero&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;KEK&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;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;• The salt is generated at user registration and stored in the DB.
• The password is never stored in plain text.
• This master key never leaves the browser.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
  
  
  Encrypting a Secret (Client-side, before sending to server)
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;encryptSecret&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;secret&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;assetKey&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;sodium&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ready&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;nonce&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;sodium&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;randombytes_buf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;sodium&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;crypto_secretbox_NONCEBYTES&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;ciphertext&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;sodium&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;crypto_secretbox_easy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="nx"&gt;secret&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;nonce&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;assetKey&lt;/span&gt;
  &lt;span class="p"&gt;)&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;ciphertext&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;sodium&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;to_base64&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;ciphertext&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="na"&gt;nonce&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;sodium&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;to_base64&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;nonce&lt;/span&gt;&lt;span class="p"&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 server only sees { ciphertext, nonce }. No key. No plaintext.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sharing a Secret Securely
&lt;/h2&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1.  User A encrypts the asset key (AEAK) with User B’s public key.
2.  User A sends the encrypted AEAK to the server.
3.  User B decrypts it locally using their master key.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;No plaintext secret or key is ever shared with the server.&lt;/p&gt;

&lt;h2&gt;
  
  
  So… What Is Assetspan?
&lt;/h2&gt;

&lt;p&gt;It’s now live at &lt;a href="https://www.assetspan.com/" rel="noopener noreferrer"&gt;Assetspan.com&lt;/a&gt; — a zero-knowledge secret &amp;amp; credential manager designed for teams.&lt;/p&gt;

&lt;p&gt;You don’t even need to register to try it — the “Create Asset” form is right on the homepage. No email wall.&lt;/p&gt;

&lt;h3&gt;
  
  
  Final Thought — For My Daughter
&lt;/h3&gt;

&lt;p&gt;If someday she asks me something I don’t know, and ChatGPT replies perfectly instead of me, I think I’ll tell her this:&lt;/p&gt;

&lt;p&gt;“I don’t know everything. I’m just a fool — not a tool. But I built one so we can both learn.”&lt;/p&gt;

</description>
      <category>sideprojects</category>
      <category>learning</category>
      <category>security</category>
      <category>chatgpt</category>
    </item>
  </channel>
</rss>
