UWPX / UWPX-Client

A WIP secure XMPP client for UWP (Windows 10) devices.
https://uwpx.org
Mozilla Public License 2.0
115 stars 17 forks source link

SCRAM-SHA-1(-PLUS) + SCRAM-SHA-256(-PLUS) + SCRAM-SHA-512(-PLUS) supports #51

Open Neustradamus opened 5 years ago

Neustradamus commented 5 years ago

"When using the SASL SCRAM mechanism, the SCRAM-SHA-256-PLUS variant SHOULD be preferred over the SCRAM-SHA-256 variant, and SHA-256 variants [RFC7677] SHOULD be preferred over SHA-1 variants [RFC5802]".

There is only SCRAM-SHA-1, can you add support for?

https://xmpp.org/extensions/inbox/hash-recommendations.html

-PLUS variants:

LDAP:

HTTP:

2FA:

IANA:

Linked to:

COM8 commented 5 years ago

SCRAM-SHA-256 support should be easy to add. But the PLUS versions take a little bit more work to be done.

Thanks for the RFC links!

Neustradamus commented 5 years ago

@COM8 Thanks for all commits that you have done about SCRAM-SHA-256! I can not wait for -PLUS variant ^^

Neustradamus commented 5 years ago

It is possible to add for 512 too?

COM8 commented 5 years ago

Hmmm, well it would be really easy to add support for the 512 variants too, but I don't think it's that useful since everything using SHA-1 is basically deprecated at this point (Reference). It also is not proven, that it provides more security in any way (If the mechanism is broken why should increasing the iterations count improve security?).

An other point is: You can use SCRAM-SHA-1 as auth method and send an iteration count >= 4096 to your clients because the "number" only handles the min iterations count that is required. So I see this as a responsibility of the server software you are using, setting the "iterations count" to an appropriate value.

Do you know any server that actually supports the 256 and 512 versions?

Let me think about it for a couple of days and I will come back to it then.

Thanks for your suggestion!

Neustradamus commented 5 years ago

List here: https://github.com/scram-xmpp/info/issues/1

COM8 commented 5 years ago

OK I will add support for it, since it's quiet easy to do. Do you have any RFC for it? Can't find any.

Neustradamus commented 5 years ago

Only RFCs cited before. But a lot of softwares (cited previously and others) use other possibilities too...

Neustradamus commented 5 years ago

From RFC8600: "When using the SASL SCRAM mechanism, the SCRAM-SHA-256-PLUS variant SHOULD be preferred over the SCRAM-SHA-256 variant, and SHA-256 variants [RFC7677] SHOULD be preferred over SHA-1 variants [RFC5802]".

COM8 commented 5 years ago

If this is the TLDR out of the paper - sure yes, that's true 😄 .

Neustradamus commented 4 years ago

XMPP servers remove the old history unsecured MD5 support, any news on it?

COM8 commented 4 years ago

Nope. I've never actually implemented MD5 since it's not save since ages. Currently the following mechanisms are supported:

Neustradamus commented 4 years ago

Can you add other SCRAM possibilities? To have 1/224/256/384/512? And for -PLUS variants, complicated? Some clients already supported it, look the link in main publication :)

COM8 commented 4 years ago

The non PLUS variants are easy to add, but for the PLUS variants I need to pass the server certificate to the mechanism which is not possible right not. It requires quiet a bit of work since I have to reengineer the way the connection gets handled. Perhaps add a connection context of some sorts, where I store information like the cert.

COM8 commented 4 years ago

@Neustradamus, Thanks.

Neustradamus commented 3 years ago

@COM8: Can you add 512 like others?

COM8 commented 3 years ago

512 as I can see it, yes. But the PLUS variants are not.

Neustradamus commented 3 years ago

SCRAM-SHA-512, and maybe SCRAM-SHA3-512 too?

Yes I know, PLUS variants is different...

COM8 commented 3 years ago

Don't know right now. I have to have a look into it.

COM8 commented 3 years ago

Just a small update from my side on this. I fixed the SCRAM-SHA-256 implementation #153 . SCRAM-SHA-512 is currently not possible for me, since c# on UWP currently does not support SHA3 hashing with Rfc2898DeriveBytes. For this I have to implement my own PBKDF2 password-based key derivation function which is currenly out of my scope.

Neustradamus commented 2 years ago

@COM8: Are you sure that SCRAM-SHA-512 can not be added?

And SCRAM-SHA3-512 too?

Linked to: