Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SCRAM-SHA-256 + SCRAM-SHA-512 supports #314

Closed
Neustradamus opened this issue Jan 6, 2019 · 23 comments
Closed

SCRAM-SHA-256 + SCRAM-SHA-512 supports #314

Neustradamus opened this issue Jan 6, 2019 · 23 comments

Comments

@Neustradamus
Copy link

Neustradamus commented Jan 6, 2019

After:

Can you add supports of:

  • SCRAM-SHA3-512

Can you add the -PLUS variants (with TLS Channel Binding):

  • SCRAM-SHA-1-PLUS
  • SCRAM-SHA-256-PLUS
  • SCRAM-SHA-512-PLUS
  • SCRAM-SHA3-512-PLUS

You can add too:

  • SCRAM-SHA-224
  • SCRAM-SHA-224-PLUS
  • SCRAM-SHA-384-PLUS

"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]".

SCRAM-SHA-1(-PLUS):

SCRAM-SHA-256(-PLUS):

SCRAM-SHA-512(-PLUS):

SCRAM-SHA3-512(-PLUS):

SCRAM BIS: Salted Challenge Response Authentication Mechanism (SCRAM) SASL and GSS-API Mechanisms:

-PLUS variants:

IMAP:

LDAP:

  • RFC5803: Lightweight Directory Access Protocol (LDAP) Schema for Storing Salted: Challenge Response Authentication Mechanism (SCRAM) Secrets: https://tools.ietf.org/html/rfc5803

HTTP:

JMAP:

2FA:

IANA:

Linked to:

@Neustradamus Neustradamus changed the title SCRAM-SHA-1-PLUS + SCRAM-SHA-256 and SCRAM-SHA-256-PLUS SCRAM-SHA-1-PLUS + SCRAM-SHA-256(-PLUS) supports Mar 20, 2019
@Neustradamus

This comment was marked as spam.

@Neustradamus

This comment was marked as spam.

@Neustradamus Neustradamus changed the title SCRAM-SHA-1-PLUS + SCRAM-SHA-256(-PLUS) supports SCRAM-SHA-1-PLUS + SCRAM-SHA-256(-PLUS) + SCRAM-SHA-512(-PLUS) supports Nov 1, 2020
@Neustradamus

This comment was marked as spam.

@Neustradamus

This comment was marked as spam.

@Neustradamus

This comment was marked as spam.

@based-a-tron
Copy link

It is my understanding that the SCRAM-.*-PLUS mechanisms are not possible to implement in the browser, at least at the moment. I believe they would require access to the currently used certificate, which the browser does not expose.
Regardless, I have implemented #465 which should provide interfaces for SCRAM-SHA256 and the like.
If I am wrong about the channel binding abilities of modern web browsers, please let me know and I would be happy to implement the PLUS variants as well.

@Neustradamus

This comment was marked as spam.

@based-a-tron
Copy link

based-a-tron commented Jun 27, 2022

@Neustradamus It would be very easy to add support for SHA-384 as well. I would just need to know what priority to put it in. I don't know what the current opinion on it is. Currently SHA-512 > SHA256 > SHA1 > PLAIN. My instinct would tell me SHA256 should be preferred to SHA384, but I don't know if this is the best way to do it.
For SHA3-512, the answer is a bit more complicated. We have two options, implement it as a standalone sasl mechanism (as in, distribute some kind of sha3.js file that contains a SHA3 implementation in javascript), or wait for the usptream Web Crypto API to write SHA3 into the standard. I encourage you to open an issue at https://github.com/w3c/webcrypto (or maybe more accurately, https://github.com/WICG/proposals) to request SHA3 support.

@Neustradamus

This comment was marked as spam.

@sjaeckel
Copy link
Member

My instinct would tell me SHA256 should be preferred to SHA384, but I don't know if this is the best way to do it.

It might seem unintuitive, but SHA384 should be preferred over SHA256. AFAIK the order should be:

SHA3 (512 -> 384 -> 256 -> 224)
SHA (512 -> 384 -> 512-256 -> 512-224 -> 256 -> 224 -> 1)

Speed doesn't really matter for SCRAM as the amount of data to hash is minimal (SHA256/224 would be faster on 32bit CPUs)

For SHA3

IMO requesting the feature in the WICG and adding a sha3.js (until it's included in webcrypto) sounds sensible.

@Neustradamus

This comment was marked as spam.

@based-a-tron
Copy link

@Neustradamus, would you happen to have test vectors for sha3-512 (or sha3-256)? They are excluded from https://datatracker.ietf.org/doc/html/draft-melnikov-scram-sha3-512, likely by accident.
The SHA-512 RFC also did not include test vectors, but the code change from sha-256 to sha-512 was so trivial that they weren't needed. Since we must use a different approach for sha3, I would like something to test against. Thank you.

@Neustradamus

This comment was marked as spam.

@Neustradamus

This comment was marked as spam.

@sjaeckel
Copy link
Member

Have you looked for SHA-3?

@Neustradamus: as already mentioned in another thread: please stop pushing for non-standardized Algorithms!

SCRAM-SHA3 is not standardized and maintaining X different versions because the final standard differs from the draft -- which has already happened in other cases -- is no fun. Handling this is a burden and you (@Neustradamus) won't be the maintainer of this mess then, but instead you will be complaining reminding that only some draft version is supported.

@Neustradamus

This comment was marked as spam.

@jcbrand jcbrand closed this as completed Aug 9, 2022
@Neustradamus

This comment was marked as spam.

@jcbrand
Copy link
Contributor

jcbrand commented Aug 10, 2022

@Neustradamus: Yes, but if SCRAM-SHA-3 is not yet standardized, then I don't see much use in asking for support for it now.

@Neustradamus

This comment was marked as spam.

@jcbrand
Copy link
Contributor

jcbrand commented Aug 11, 2022

Not yet.

@Neustradamus

This comment was marked as spam.

@Neustradamus Neustradamus changed the title SCRAM-SHA-1-PLUS + SCRAM-SHA-256(-PLUS) + SCRAM-SHA-512(-PLUS) supports SCRAM-SHA-1-PLUS + SCRAM-SHA-256-PLUS + SCRAM-SHA-512-PLUS + SCRAM-SHA3-512(-PLUS) supports Aug 25, 2023
@Neustradamus

This comment was marked as spam.

@Neustradamus Neustradamus changed the title SCRAM-SHA-1-PLUS + SCRAM-SHA-256-PLUS + SCRAM-SHA-512-PLUS + SCRAM-SHA3-512(-PLUS) supports SCRAM-SHA-256 + SCRAM-SHA-512 supports Dec 18, 2023
@Neustradamus

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants