DEV Community

Akhouri Anmol Kumar
Akhouri Anmol Kumar

Posted on

I Trusted My Own Encryption Until GitHub Copilot Called It "Weak"

I Trusted My Own Encryption... Until I Realized It Wasn't Good Enough.

A few weeks ago, I thought the password vault inside my Windows security project was "secure."

It worked.

It stored passwords.

It encrypted data.

Everything looked fine.

Then I stepped back and asked myself a simple question:

"If I were reviewing this as a security engineer instead of its developer, would I actually trust it?"

The answer was no.

So I deleted it.

🧠 The Biggest Mistake Developers Make

Many beginner security projects confuse encoding, hashing, and encryption.

If your application simply transforms text and stores it, that doesn't automatically make it secure.

Real security is about key management, attack resistance, and well-tested cryptographic primitivesβ€”not just making data unreadable at first glance.

❌ My Old Mental Model

Password
β”‚
β–Ό
"Encrypt"
β”‚
β–Ό
Store

βœ… What I Wanted Instead

Master Password
β”‚
β–Ό
PBKDF2-HMAC-SHA256
(200,000 iterations)
β”‚
β–Ό
Derived Key
β”‚
β–Ό
Fernet Encryption
β”‚
β–Ό
Encrypted Vault
πŸ”„ Sometimes the Best Upgrade Is Deleting Your Own Code

The hardest part wasn't writing new code.

The hardest part was accepting that my previous implementation wasn't good enough.

As developers, we naturally become attached to code we've spent hours building.

Security doesn't care how long something took to write.

If there's a better approach, rewrite it.

πŸ”’ While Building ATLOCK v4...

I redesigned the password vault around a few principles:

PBKDF2-HMAC-SHA256 for key derivation
200,000 iterations to increase resistance against brute-force attacks
Fernet authenticated encryption for encrypted vault data
Local-only storage
No plaintext password storage

ATLOCK still isn't "perfect"β€”and I don't think any security software should claim to be.

But it's significantly stronger than where it started.

Version 1

"Works."

    β”‚

    β–Ό
Enter fullscreen mode Exit fullscreen mode

Version 2

"Looks Secure."

    β”‚

    β–Ό
Enter fullscreen mode Exit fullscreen mode

Version 3

"Actually Follows Better Security Practices."
πŸ’­ One Lesson I'll Keep With Me

Building security software taught me something I didn't expect.

Writing secure code isn't about proving your first design was correct.

It's about having the humility to delete it when you discover a better one.

Sometimes the biggest security improvement isn't a new algorithm.

It's admitting your previous implementation wasn't good enough.

I'd love feedback from other developers.

If you've ever rewritten an entire feature because you realized the original design was flawed, what was it?
Try ATLOCK v4-https://github.com/Akhouri-Anmol-Kumar/ATLOCK
ATLOCK is made under Akhouri systems.

"We Build What Others Forgot To Fix"

Top comments (0)