Új hozzászólás Aktív témák

  • Jim-Y

    veterán

    válasz Flashback #15234 üzenetére

    Szia.

    Nem tudom, hogy multkor irtam-e, vagy csak akartam, de az nagyon rossz irany, hogy a jelszot leakeled a felhasznalonak. A jelszonak egy olyan erteknek kell lennie ami csakis kizarolag szellemi "tulajdon". Ertem ezalatt, hogy a jelszo egy, a felhasznalo elmejeben letezo kodsor amivel valamilyen szinten biztonsagosan azonositani tudja magat. A vedelem egyik alappillere, hogy ezt te titkositott csatornan kuldod el a szervernek, ott rogton tikositod ugy, hogy azt visszafejteni nagyon nagyon nehez, vagy nagyon sok ido legyen, es hat elmeletileg veded a szervert, hogy ne jusson ki a jelszo egy esetleges harmadik felhez. Na mar most ha te elhasheled a jelszavat es kikuldod neki a bongeszojebe akkor mar egybol leakelted is az informaciot. Ez bad pattern. Helyette...

    En ez alapjan csinaltam hasonlot: [link]

    Zanzasitva:

    Ad1: "Would you believe that there are still web programmers that use fast cryptographic hash functions such as MD5 and SHA1 for password storage in 2015? It has been clear to security experts for a long time that this is a bad idea"

    Ajanlottak:

    Argon2 (winner of the Password Hashing Competition)
    bcrypt
    scrypt
    PBKDF2 (Password-Based Key Derivation Function #2)

    Ad2: maga a remmeber-me

    The automatic login algorithm looks something like:

    1 Separate selector from validator.
    2 Grab the row in auth_tokens for the given selector. If none is found, abort.
    3 Hash the validator provided by the user's cookie with SHA-256.
    4 Compare the SHA-256 hash we generated with the hash stored in the database, using hash_equals().
    5 If step 4 passes, associate the current session with the appropriate user ID.

    En meg megfejelnem ezt azzal, hogy mondjuk fakultativan tudna a user kapcsolni, hogy o egy secure-account 2FA-al es igy Minden belepesnel kuldene egy auth-tokent SMS-ben. Nem lenne ez kivetel a remember-me-nel sem.

Új hozzászólás Aktív témák