Protect passwords with hashing and salting

Поділитися
Вставка
  • Опубліковано 8 січ 2025

КОМЕНТАРІ • 31

  • @bipinsingh-zx3sx
    @bipinsingh-zx3sx 3 роки тому +1

    I m big fan of your teaching,

  • @rameshnapa7273
    @rameshnapa7273 3 роки тому +3

    I have followed this course from the beginning its very much impressive.
    Can you please create a video for Role based authorization which will allow specific controllers/components are for specific roles/users. Either in Angular or in Webapi. please

  • @ritamghosh3550
    @ritamghosh3550 Рік тому +1

    very helpful, thanks 🙏

  • @harrylyod3402
    @harrylyod3402 3 роки тому +1

    Thank you for the content

  • @VishalRaj-xf8bx
    @VishalRaj-xf8bx 3 роки тому +1

    sir why did u not add extra fields for registration in web api...if added please provide the link for that video

  • @cory99998
    @cory99998 Рік тому

    If the source code is leaked and they have the db, does this mean they can easily decrypt all of the passwords?

  • @re.tangle
    @re.tangle 3 роки тому

    great tutorial, thx for that

  • @abinkrajan2329
    @abinkrajan2329 3 роки тому +1

    Thank you so much sir, this series is really helpful.

    • @StudyMash
      @StudyMash  3 роки тому

      Glad to hear it is helpful, don't forget to subscribe and press bell icon to get instant alerts when I upload new video

  • @raman.thatikunta
    @raman.thatikunta 3 роки тому

    Hey Sandeep, If a hacker gets hold of the database, he can still do a brute-force attack, right? He can take the most common passwords and hash them using an algorithm and the salt (passwordkey) stored in the database. Then he can compare the resulting hash with the value in the database. If a match is found, then the hacker knows the password to use. granted, the hacker's job is a difficult because he doesn't know which algorithm we used and there are millions of commonly used passwords.

    • @StudyMash
      @StudyMash  3 роки тому

      Yes, hacker can do that but if he is able to get the hash of one password then also he is not able to identify if any other user has same password in hacked database, because every hash have different salt key.
      One more thing we can do is, we can store one more key at a safer place and use that as well in salt for hashing. In that way even if database is hacked than also hacker will need other key to get the correct hash.
      The SHA-* family less safe for bruteforce attacks hash passwords, one can calculate about 3Giga SHA-512 values per second with common hardware now a days, that makes brute forcing way too easy for SHA-*
      Now a days more secure options available, one can use a dedicated password hash function like Argon2, BCrypt, or PDKDF2. All of these functions offer a cost factor to control the necessary time to calculate a simple password, the higher the cost factor, the more hashing rounds are done, that will make it more safe. I thin BCrypt is good choice for a .net application as it is available inbuilt, but I have not tried it yet.
      Let me know if you find something..

  • @SirBenJamin_
    @SirBenJamin_ 3 роки тому +1

    Thanks for the video! .. one thing I am not sure about though is that you're still passing the username/password in plain text when calling login/register? shouldn't they be encrypted so people can't listen on the connection?

    • @SirBenJamin_
      @SirBenJamin_ 3 роки тому

      Or is the plan to make it HTTPS intead of HTTP? in which case, I believe it is ok to send plain text as HTTPS will encrypt eveything anyway?

    • @StudyMash
      @StudyMash  3 роки тому +1

      Yes, in upcoming videos I have shown how to enable https on this project when I deployed it on azure and IIS

  • @bipinsingh-zx3sx
    @bipinsingh-zx3sx 3 роки тому

    i have a question -how to use store procedure in your Web Api code.please advice

    • @StudyMash
      @StudyMash  3 роки тому +1

      Good question, I had no plan to use stored procedure in this tutorial, but now I will make a video on that as well.

  • @sauravkarmakar1811
    @sauravkarmakar1811 3 роки тому

    How to make salt in client side before entering in the server ?

  • @abinkrajan2329
    @abinkrajan2329 3 роки тому

    Sir, I was doing back-end on visual studio and it works but when I run using dotnet run, there seems to be an issue.

    • @StudyMash
      @StudyMash  3 роки тому

      What issue you are getting, can you provide more details.

    • @abinkrajan2329
      @abinkrajan2329 3 роки тому

      @@StudyMash Actually, I figured it out. I used https instead of http. But in visual studio it works with https

    • @StudyMash
      @StudyMash  3 роки тому

      Ok great

  • @rutabanavalikar8077
    @rutabanavalikar8077 3 роки тому

    Can you please show how to containerize the whole application?

    • @StudyMash
      @StudyMash  3 роки тому

      Yes, I have plan to containerize it

  • @mujahidali7874
    @mujahidali7874 3 роки тому

    I am getting this error "Unable to create an object of type 'DataContext'. For the different patterns supported at design time, see go.microsoft.com/fwlink/?linkid=851728" on adding migrations while running this command dotnet ef migrations add UpdateUserForPasswordEncryption. The buils was succeded but migration is not bein.g added to the migration folder.

  • @Fetretim
    @Fetretim Рік тому

    After this changes, register works but when i try login, it returns '500 internal server error (object referance not set to an instance of object). How do i fix it?

    • @StudyMash
      @StudyMash  Рік тому

      If you can share github link to your code, I can suggest where the issue is.

    • @Fetretim
      @Fetretim Рік тому +1

      @@StudyMash i registered another user and tried to login with new userName and password, then issue solved and another token generated. Why i got this error still i don't know, maybe cause of token's lifetimes or something like that. Thank you for fast answer sir

  • @bipinsingh-zx3sx
    @bipinsingh-zx3sx 3 роки тому

    How to decrypt password with hashing and salting ?

    • @StudyMash
      @StudyMash  3 роки тому

      Hashing is one way encryption, you can decrypt the same