Hot answers tagged

28

Argon2 is the best of those to use. It has been well-vetted and is the subject of intense research. It was chosen as the winner in the Password Hashing Competition (PHC) to replace scrypt, which has some nasty time-memory tradeoff (TMTO) attacks, and which is not nearly as flexible in configuration. Argon2 won the PHC and is based on a thorough analysis of ...


19

The cryptographical hash function with output size n has √n collision with probability 50% due to the birthday paradox. You took 3 hexadecimal digits which means you get 12 bits. After 26=64 hash generations, you will see a collision with 50% probability. Collision in hash functions is inevitable due to the fixed-sized output space but the arbitrary length ...


15

Digital signatures are designed to do three things: Ensure the integrity of the data that has been signed Create some degree of non-repudiation by the signer The purpose you mentioned, which is to authenticate the origin of the message The biggest issue with hash functions that are susceptible to collisions is that you very quickly lose the first design ...


12

Xander's answer is fundamentally correct: the issue is getting someone else to sign a benign message and use the signature for the malicious one. It is worth noting that although when you make a collision you don't get to decide on the messages directly, you often do get to decide on part of the message. For example I couldn't persuade you to sign "My name ...


11

There are a couple of pretty serious problems with this approach which will increase the risk of collisions beyond what would ordinarily be expected for a random 4-digit value. Take the first 3 characters of the digest Convert them to an integer Three hexadecimal digits gives you a range of 0 – 4095 (0x000 - 0xfff). This will give you a lot more ...


10

Even though Argon2 is my personal favorite among them, all of them are solid choices and you will likely not get weird looks for choosing one over the other. What matters the most is that you properly benchmark your system, so that you choose sane parameters. With Argon2, you additionally have to select a mode-of-operation. There is Argon2i, Argon2d and ...


6

While the other responses debate the effectiveness of each algorithm from the list, I will attempt answer from the .NET Core perspective. Unless things have changed recently, the only algorithm from your list that is natively supported (ie authored by Microsoft) in .NET Core is PBKDF2. For some companies, this means that this is your only choice. If you have ...


5

Well, in theory you would be right. In some very specific cases those hashes would not be completely broken. However, you would need to be extra cautious, and supposedly some "self-generated" data could actually be insecure. Would you consider the check's written by the accountant to be self-generated by the accountant? Apparently yes, but it actually ...


4

Why is using the password as part of the salt a problem? Because you need to store the salt separately from the hash of the password. You can either do this by encoding them in a specific way, such as storing them as $Rfc2898$iterations$mysalt$myhash or by using dedicated database tables. If you would go with the scheme you proposed (crating a random salt, ...


4

Whirlpool itself is a cryptographically-secure hash function like SHA-512 and has no known weaknesses that would be relevant to hashing secrets. However, using it directly for password hashing is a bad idea because it is fast, allowing an attacker to guess many passwords per second. This is not unique to the Whirlpool hash. A memory-hard KDF like Argon2 ...


3

Use password-hash (https://www.php.net/manual/en/function.password-hash.php) which will continually use the most secure method as PHP continues to release new versions. Asking users to update passwords isn't a huge issue. Whirlpool doesn't have any known cryptographic flaws, but there are certainly better algorithms to use. Source: https://www.novatec-gmbh....


1

This could be due to a composition issue. You mentioned non-latin characters, but didn't specify any concrete examples, where you had problems. What is composition? Unicode aims to be able to represent any character used by humanity. However, many characters are similar, such as u, ü, û and ū. The original idea was to just assign a code point to every ...


1

uuid.getnode() in python returns the MAC address of one of the network interfaces installed - if there are none, it returns a random 48-bit number with the eight bit set to none as per RFC 4122. That's as likely as good as you'll get. The UUID of the computer doesn't exist but often certain pieces of hardware have unique identifiers such as the CPU and any ...


1

Yes. Scrypt can be used securely. There are two sources of potential security problems: weaknesses in the algorithm design and errors in the implementation. The design of scrypt is relatively simple, so implementation errors will be the only thing that could shock us at this point. (Issues like buffer overflows, parsing mistakes, or use-after-free bugs. ...


1

The algorithm you describe is normal fast hash. Such hashing algorithms should only be use to check integrity of files, but not for hashing password. Whirlpool and similar algorithms are designed to be fast and thus make brute force attacks easier. Use key stretching / password derivation. For instance, use PBKDF2, scrypt or Argon2. The are designed to make ...


Only top voted, non community-wiki answers of a minimum length are eligible