1,537 reputation
1613
bio website martinstoeckli.ch
location Switzerland
age 41
visits member for 2 years, 7 months
seen 3 hours 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 now mostly with CSharp and use PHP for my spare time project, an internet lost-and-found office.

// Don't tell people that they do wrong, explain the reasons and let them think for themselves.


Jun
12
comment is it illegal to share customer credit card data
As far as i know storing credit card information requires to comply with the PCI standard. I'm pretty sure that after reading the requirements, your customer will reconsider implementing this feature.
May
30
awarded  Nice Answer
May
27
comment Who can carry out Man-in-the-Middle (MITM) attacks?
If you have the time, then have a look at Moxie Marlinspikes video about SSL-strip. He talks about setting up a public WLAN hotspot for demonstration.
May
26
answered Authenticated sessions and Man in the middle
May
1
comment Password Hashing Without a Unique Salt
Whether your hashing scheme is sufficient you will find out as soon as your hashes where stolen, then you will have to contact your customers, and tell them that unfortunately their passwords are not well protected. I cannot imagine a modification so huge, that it is worth the risk. Every hashing scheme must be able to change to more secure standards from time to time, this is not only a one time job.
Apr
26
comment How to apply a pepper correctly to bcrypt?
@Powerman - It is surely a good idea to ask the users for strong passwords, but unfortunately it's not under your control. The password "Password-2014" will pass most checks, but is not very strong. As for SQLi, SQL-injection can be prevented easily with parametrized queries, only third party libraries are a problem. Reading files from the server with SQL is even much more difficult and works only with certain database configurations, so in my opinion encrypting with a server-side key should be done in any case.
Apr
25
comment How to apply a pepper correctly to bcrypt?
@Powerman - The purpose of the key is, that the attacker needs to gain additional privileges on the server (he needs the key, the database alone won't do), not to make the hash more safe (this is the job of BCrypt). Of course if the encryption is done wrong you may get the hashes, that's what Thomas mentioned, but this is a question of using a good library. The advantage is, that you can exchange the key whenever you have need to, even periodically. Another discussed point is, that you do not interfere in any way with the hash algorithm.
Apr
25
comment How to apply a pepper correctly to bcrypt?
@Powerman - The pseudo code is based on the PHP implementation of the hash_hmac() function.
Apr
25
awarded  Necromancer
Apr
25
comment How to apply a pepper correctly to bcrypt?
@Powerman - There is a better way to add a server side key to the hash, i updated my answer to point it out. Doing it this way you cannot decrease security, because in the worst case an attacker just gets the original hashes. I wrote a tutorial about safely storing passwords, where i tried to describe it more indepth.
Apr
25
revised How to apply a pepper correctly to bcrypt?
Added note about using encryption instead of a pepper.
Mar
30
answered HTTP/HTTPS on the same site
Mar
26
comment When and where do I hash a password?
The answer of this question Why is it not standard practice to run password-based KDF's client-side also explains pros and cons of client side hashing.
Mar
23
revised Why is it not standard practice to run password-based KDF's client-side?
Explained reason why a non-iterated hash can be used.
Mar
22
comment Why use PBKDF2 over multiple iterations of a another cryptographic hash function?
Could you explain why you think that PBKDF2 is superior to BCrypt?
Mar
21
comment Why is it not standard practice to run password-based KDF's client-side?
@xkcd - What Levi tried to explain is, that it is absolutely safe to store an unsalted non interated hash, if the "password" is strong enough. Salting and key-stretching is necessary, because people choose relatively weak passwords, which they can remenber. The output of a PBKDF2 on the other side is a very strong "password", and can be hashed with a hash algorithm like SHA512 even without a salt.
Mar
21
revised Why is it not standard practice to run password-based KDF's client-side?
deleted 43 characters in body
Mar
21
revised Why is it not standard practice to run password-based KDF's client-side?
added 19 characters in body
Mar
21
comment Why is it not standard practice to run password-based KDF's client-side?
@xkcd - If you had calculated a server side hash, then even with the hash-values (from SQL-injection for example) you could not login. If you store the client side hash directly, you can login as soon as you know the stored hash-values.
Mar
21
answered Why is it not standard practice to run password-based KDF's client-side?