Hi, [email protected]. I’m curious about zero-knowledge encryption, and I would like to use it in my CS50x final project. My goal is to authenticate users and store their encrypted data on the server so that only the users can decrypt it.

I understand the general concepts of public and private keys, as well as symmetric keys, and how to use them to protect data. However, I don’t understand how to authenticate users. I have searched online for information on implementing the zero proof knowledge authentication flow, but I found either vague high-level descriptions or research papers that require a strong background in mathematics and cryptography to understand and implement.

Could you maybe suggest some resources on this topic? When your search for “how to implement jwt authentication”, you can find many articles that describe the flow with code examples. I’m looking for something similar.

Or should I choose a simpler project?

  • tauren@lemm.eeOP
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 day ago

    Thanks for your reply. The idea of zero-knowledge authentication is that the password never touches the server. Instead, the user can prove that they know the password when logging in by solving a challenge. This enables the user to log in from any new device without the need to transfer keys between them. I’ll take a closer look at your suggestions though. Thanks again!

    • refalo@programming.dev
      link
      fedilink
      arrow-up
      3
      arrow-down
      2
      ·
      24 hours ago

      All you need in order to do this is for the client to encrypt their password before sending it to the server. Often services that advertise “zero knowledge” platforms that use end-to-end encryption will authenticate their users in this way. If this were a website for example, there could be a javascript/wasm library used within the client page that encrypts their password before a login request is sent to the server.