Cryptography is scary. In this tutorial, we get hands-on with Node.js to learn how common crypto concepts work, like hashing, encryption, signing, and more https://fireship.io/lessons/node-crypto-examples/

    🔗 Resources

    Full Tutorial https://fireship.io/lessons/node-crypto-examples/
    Source Code https://github.com/fireship-io/node-crypto-examples
    Node Crypto https://nodejs.org/api/crypto.html

    📚 Chapters

    00:00 What is Cryptography
    00:52 Brief History of Cryptography
    01:41 1. Hash
    04:07 2. Salt
    05:47 3. HMAC
    06:35 4. Symmetric Encryption.
    08:19 5. Keypairs
    09:29 6. Asymmetric Encryption
    10:22 7. Signing
    11:31 Hacking Challenge

    🔥 Get More Content – Upgrade to PRO

    Upgrade to Fireship PRO at https://fireship.io/pro
    Use code lORhwXd2 for 25% off your first payment.

    🎨 My Editor Settings

    – Atom One Dark
    – vscode-icons
    – Fira Code Font

    🔖 Topics Covered

    – Cryptography for Developers Basics
    – Crypto algorithms: SHA, MD5, argon2, scrypt
    – How password salt works
    – Encryption vs Signing
    – Difference between Asymmetric vs Symmetric Encryption
    – How hacking works and hacks are prevented

    21 Comments

    1. actually a disservice that this video doesn't cover MITM attack at all because all of these encryption schemes fail to it. being able to securely give someone your pubkey is impossible to do online with any assurance, even with diffie hellman

    2. I am sorry for the amateur in me but it seems like the hacker will know the algorithm used if they just use inspect to see how your JavaScript file encrypts it.

    3. I don't really understand the point of salt. Since the value of both salt and hashed password is stored in the database, the hacker can just apply your salt to a list of commonly known passwords until he gets a match. I don't see an improvement over using password without salt.

    4. it is so hard to understand why I do createCipher and createDecipher in the same function and they work fine together. But if I separate them away to different functions, I can not decipher it.

    5. While I like this video, missing the concept of deriving a shared secret over a public channel without sending the secret (Diffie-Hellman) is a big miss on basic cryptographic concepts.

    6. 3:30 thanks for mentioning argon2 – didn't know about this
      5:30 timingSafeEqual to prevent timing attack – wow, i had thoughts about that (timing attack) but didn't know it was a real thing

    Leave A Reply
    Share via