1,307 reputation
1412
bio website martinstoeckli.ch
location Switzerland
age 41
visits member for 2 years, 1 month
seen 4 mins ago

I belong to the lucky people, who can combine job and hobby, in my case writing software. Coming from the Delphi world, i'm working more and more with CSharp and use PHP for my spare time project, an internet lost-and-found office.

// Don't tell people not do something, explain the reasons and let them think for themselves.


Nov
12
revised Is it useful to protect hashed password with encryption?
added 117 characters in body
Nov
12
answered Is it useful to protect hashed password with encryption?
Nov
8
revised How secure is redirecting user from http://normal.bank.com to https://secure.bank.com?
added 20 characters in body
Nov
8
answered How secure is redirecting user from http://normal.bank.com to https://secure.bank.com?
Oct
25
comment Is this site vulnerable to sql injection?
Sure, error messages can give hints about the system in use, that's why they should never reach the page viewed by the user, instead a general message should be displayed. But this doesn't mean your page is vulnerable to SQL-injection.
Oct
25
comment Is this site vulnerable to sql injection?
Such an error message should not be displayed on a productive website, but why do you think it has something to do with SQL-injection?
Oct
18
answered Altering passwords before storing
Oct
15
comment comparing password hashing algorithms - PoC ideas?
The number of hashes calculated by oclHashcat with common hardware are very convincing. For plain SHA-256 this is more than 1 Giga hashes per second, compared with an english dictionary containing about 150000 words... well that makes a fraction of a millisecond.
Oct
11
comment Does using Bcrypt to encrypt credit card numbers satisfy PCI compliance?
@jpkrohling - You should think of the salt as a known value, it is not a secret. It will not make it harder to brute-force a single value, but can prevent an attacker to build a rainbow-table to get all numbers at once.
Oct
10
comment Does using Bcrypt to encrypt credit card numbers satisfy PCI compliance?
Usually if you have need to store a credit card number, you want to be able to decrypt it later, so you can use it again for payment. What reason do you have to store only a hash of the number, which is a one-way function and cannot be decrypted?
Sep
27
revised Secure authentication: partial client-side key stretching… please review/criticize my idea
deleted 5 characters in body
Sep
27
answered Secure authentication: partial client-side key stretching… please review/criticize my idea
Sep
4
comment Do salts have to be random, or just unique and unknown?
@MisterMelancholy - You use a slow hash like BCrypt and a pepper, exactly for the case a hacker gets access to your database or server. If the hash function is slow, an attacker can calculate e.g. only 1 hash instead of 8 Giga hashes. The pepper requires the attacker to have privileges on the server, what is more difficult than just having read access to the database.
Sep
4
comment Do salts have to be random, or just unique and unknown?
@MisterMelancholy - I updated my answer accordingly.
Sep
4
revised Do salts have to be random, or just unique and unknown?
To answer the updated question.
Sep
1
comment Do salts have to be random, or just unique and unknown?
@demize - Well that's the actual question, does it really introduce a new attack vector and how? The userid would make the salt unique, the domainname would make it globally unique, and the password would make it unpredictable. It is possible to regenerate it, and when the password changes, it would result in a different salt.
Sep
1
comment Do salts have to be random, or just unique and unknown?
@Griffin - There would be no need to store the plain text password, because when you verify the password all necessary information is available, the userid, the constant text and the just entered password.
Sep
1
comment Do salts have to be random, or just unique and unknown?
@Griffin - I think the OP's question actually is: "Can storing a salt be avoided completely, derriving the salt from userid, constant text, and the password itself".
Sep
1
comment Do salts have to be random, or just unique and unknown?
@MisterMelancholy - You cannot rehash the password when updating the email address. To create the new password-hash you need the email and the original password, but at this moment you know only the email and the hash of the original password.
Sep
1
comment Do salts have to be random, or just unique and unknown?
@MisterMelancholy - Ok i understand now, you don't want to store the salt at all, and therefore want to derrive the salt completely from other parameters. There is one problem though, it will make it impossible to change the parameters afterwards. When the user wants to update the email and you used it as salt, you cannot recalculate the password-hash with the new email, because you do not know the original password then. You would have to store the old email as well, what makes it no better than storing a salt.