Doubly Salted passwords proposal

Ideas for ADC may be presented here for others to review and point out flaws or further improve the idea.
Forum rules
If you have an account on the wiki, remember to update the ADC Proposals page for new ideas.

http://dcbase.org/wiki/ADC_Proposals_list
Locked
klondike
Member
Posts: 73
Joined: 14 Nov 2010, 13:06

Doubly Salted passwords proposal

Post by klondike » 14 Nov 2010, 15:21

This is a proposal to fix a small drawback on the current Salted password system.

With the current system, either passwords have to be stored unencrypted on the database, or the same SALT has to be sent always. This new system uses an approach similar to the http digest algorithm in order to provide a way to ensure the password is SALT encrypted on both sides.

For this feature, the proposed identity flag is SALT2.

What this extension proposes is the modification of the GPA and PAS actions to support a two hash SALT system. The proposal is as follows.

When both, client and server support the SALT2 feature, then the GPA and PAS actions will instead be as follow:

GPA data1 data2 data3
Here data1 keeps its meaning being at least 24 random bytes encoded in base32.
data2 is a continuously increasing number which must be different at least between each correct authentication for the user. This number must be stored by the server. The value is also encoded in base32.
data3 is a string of data, no minimal length required, encoded in base 32. This string must be stored and be the same between sessions for the same user.

PAS data1 data2 data3
Here data1 is at least 24 random bytes encoded in base32.
data2 is a continuously increasing number which must be different between each authentication for the client. This number must be stored by the client. The value is also encoded in base32.
data3 is the result of applying the following operation: H(H(password+data3')+data1+data2+data1'+data2'). Where data3' data1' and data2' come from the previous GPA issued by the hub and data1 and data2 are the ones sent with the PAS command. The operation H() means apply the session hash function and + means concatenation of binary data. This data is encoded in base32.

This proposal allows both client and server to store the H(password+data3') instead of the plain text passwords, making it harder for an attacker to use the obtained data after an attack.

Also gives the client a saying when sending the salted password which may be useful to avoid certain attacks made by a rogue server like sending a weak data in the GPA allowing a precomputed dictionary attack.

darkKlor
Senior Member
Posts: 100
Joined: 30 Dec 2008, 14:59

Re: Doubly Salted passwords proposal

Post by darkKlor » 14 Nov 2010, 16:43

Quick thoughts, before sleep.

Positives:
- Storing passwords on the server is naughty, anything that reduces that is good.

Negatives:
- If a server wants your password in plain-text it won't support SALT2... a client would need to fail or risk the server capturing the password.
- Using client certificates for authentication in ADCS would be better than passwords.

Pretorian
Site Admin
Posts: 214
Joined: 21 Jul 2009, 10:21

Re: Doubly Salted passwords proposal

Post by Pretorian » 21 Nov 2010, 17:28

Without discussing whether this proposal is more secure or not, some things that should be noted;

A four character code is.. Four characters, not five...
It is probably most wise to either create a new command (3 characters) or to use named parameters, instead of  using positional parameters, since that could break previous implementations.

cologic
Junior Member
Posts: 41
Joined: 21 Jul 2009, 19:34

Re: Doubly Salted passwords proposal

Post by cologic » 06 Dec 2010, 13:49

If the slightly insecure password protocol is updated again, better to just switch to and/or add support for something standard such as SRP.

klondike
Member
Posts: 73
Joined: 14 Nov 2010, 13:06

Re: Doubly Salted passwords proposal

Post by klondike » 17 Feb 2011, 16:26

darkKlor wrote:Quick thoughts, before sleep.

Positives:
- Storing passwords on the server is naughty, anything that reduces that is good.

Negatives:
- If a server wants your password in plain-text it won't support SALT2... a client would need to fail or risk the server capturing the password.
- Using client certificates for authentication in ADCS would be better than passwords.
A client can detect that and warn the user. On certificates I agree public keys are the best approach.
Pretorian wrote:Without discussing whether this proposal is more secure or not, some things that should be noted;

A four character code is.. Four characters, not five...
It is probably most wise to either create a new command (3 characters) or to use named parameters, instead of using positional parameters, since that could break previous implementations.
Not sure but can we use PAS2 and GPA2?
cologic wrote:If the slightly insecure password protocol is updated again, better to just switch to and/or add support for something standard such as SRP.
SRP has the problem of using exponentiation which can make things a bit slow but anyway I agree, it could be a good approach. What I'm not very sure is if it will work well if the salt is always the same.

Pretorian
Site Admin
Posts: 214
Joined: 21 Jul 2009, 10:21

Re: Doubly Salted passwords proposal

Post by Pretorian » 20 Feb 2011, 21:04

klondike: What you signal in the SUP or in the INF's SU field must be 4 characters ("BASE", "TIGR"). Command names ("INF", "STA", "GPA", "PAS") must be 3 characters.

klondike
Member
Posts: 73
Joined: 14 Nov 2010, 13:06

Re: Doubly Salted passwords proposal

Post by klondike » 22 Feb 2011, 04:54

Pretorian wrote:klondike: What you signal in the SUP or in the INF's SU field must be 4 characters ("BASE", "TIGR"). Command names ("INF", "STA", "GPA", "PAS") must be 3 characters.
Ok, before rolling out the proposal, can you tell me if there is a way specified in the protocol to set the password for the user? (not to assert it during auth but to store it in the hub database). The SRP protocol involves the client choosing the SALT used to store the password for additional security.

I will try to get around that problem though, but I doubt it is possible.

Locked