Community Page
- www.codespatter.com Jump to website »
-
Subscribe -
Community
-
Top Commenters
-
Popular Threads
-
Recent Comments
- You can do this. from somewhere import SoftDeleteManager class NewManager(SoftDeleteManager): '''new stuff''' and in the model objects = NewManager()
- Great writeup, thanks for that! I'll have question though. Say I import SoftDeleteManager from an external file and use it with objects = SoftDeleteManager() But now, I loose ability to define...
- thanks, man!
- Yes! Finally I know where that annoying example.com lives! Thank you!
- Thanks very much! I think you just saved me a lot of stuffing around with settings.py
Jump to original thread »
Maybe I’m not the first to think of this, but it just came to me. Instead of using a single string to season a whole site or saving each new salt with the salted hash, try using this method for simplicity. Take the string and concatenate itself after it. This way, both the value be
... Continue reading »
11 months ago
While I don't have an example of a specific weakness to MD5 to hand one of the basic rules of exploiting algorithms is knowing some of the source material or knowing about patterns within it.
The point of using a salt is to use a piece of unknown material which is unique in each string. It's common to generate random junk to use rather than anything meaningful.
11 months ago
11 months ago
As sh1mmer said, introducing patterns or predictability into a crypto system compromises the system's security.
There are many easy ways to easily generate a "secure" salt. Eg:
-Use a seeded PRNG in your language.
-Read from /dev/random .
-Use the ID of an object in your program/script.
Cheers,
Nick
11 months ago
11 months ago
However, there is certainly some value to generating a unique nonce for each hashed password, and storing it alongside the password. It doesn't have to be truly *random* though; since it's sitting right there in the record, it's not of the class of value like a private key where both entropy and secrecy matter. You can use the username, or the timestamp for when the password was reset, or any other easily-retrievable datum.
11 months ago
11 months ago
So, a salt should: Have non-printable and characters, characters with ord() > 128 and be unique per user. That way, every password is drawn (potentially) from the full space of available byte values, making lots of attacks harder.
11 months ago