News for hackers. Stuff that matters.
Re:Is this password-generator sufficient? by aneelkkhatri on Friday August 18, 2023 @07:44PM (#37183652)
Wanted to create a very simple password generator. Is it sufficient, or there're some indispensable features missing?
Re:Is this password-generator sufficient? by aneelkkhatri on Friday August 18, 2023 @07:47PM (#37183691)
Also, need feedback around the UI. Is it too simple?
Re:Is this password-generator sufficient? by cratermoon on Friday August 18, 2023 @07:53PM (#37183748)
From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

Math.random() does not provide cryptographically secure random numbers. Do not use them for anything related to security. Use the Web Crypto API instead, and more precisely the window.crypto.getRandomValues() method

Re:Is this password-generator sufficient? by aneelkkhatri on Saturday August 19, 2023 @06:10AM (#37187221)
Interesting!
Re:Is this password-generator sufficient? by cratermoon on Saturday August 19, 2023 @12:23PM (#37190361)
Please, please, if you're going to go into anything related to security, read up on the subject. It's ok to do things like to learn, but putting them into production is unwise. See, for example, https://www.schneier.com/crypto-gram/archives/1998/1015.html... and read up, with books like Applied Cryptography. Read a few DefCon papers or videos.
Re:Is this password-generator sufficient? by aneelkkhatri on Saturday August 19, 2023 @12:37PM (#37190527)
Wow! Thanks for the feedback.
Re:Is this password-generator sufficient? by aneelkkhatri on Saturday August 19, 2023 @07:39AM (#37187751)
I have updated the logic to use window.crypto.getRandomValues(); also made some UI adjustments.