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

Is support for SHA-256 and Blake-3 right? #1

Closed
darobin opened this issue Nov 25, 2024 · 6 comments
Closed

Is support for SHA-256 and Blake-3 right? #1

darobin opened this issue Nov 25, 2024 · 6 comments

Comments

@darobin
Copy link
Owner

darobin commented Nov 25, 2024

Blake-3 is very useful for streaming verification of large files, but at the same time it's not supported in the browser, which makes it heavy to include.

@bnewbold
Copy link

FWIW, for atproto we are a bit split on it. on the one hand we'd like to use it for larger media files (videos) at some point. on the other hand, it tends to have performance-sensitive implementation and ends up pulling in deps and longer builds, even in non-Javascript languages. so being able to not use it until we actually need it would be nice.

(this is my informal take, not an official/formal bsky team consensus)

@darobin
Copy link
Owner Author

darobin commented Nov 26, 2024

That's good to hear because I think it reflects conversations happening elsewhere. I'm sort of landing on "we support B3 but implementations should default to SHA and people shouldn't use it unless they have a good reason." It's ungainly, but then again this_is_standards.gif.

@bumblefudge
Copy link
Collaborator

bumblefudge commented Nov 26, 2024

SHA2-256 or SHA3-256? something something length-extension attacks (in the case of the former). but the latter is much less common, so I assume you mean SHA2-256. is it worth writing it out as SHA2-256 in the spec?

see also:

w3c/webcrypto#319 (comment)

@mishmosh
Copy link
Contributor

we support B3 but implementations should default to SHA

I think it's worth being very explicit about this for tooling, e.g.:

  • MUST default to SHA
  • MUST support B3 by flag (if B3 ends up blessed in DASL, given size/ browser concerns)

@mishmosh mishmosh mentioned this issue Dec 5, 2024
@achingbrain
Copy link

This is worth following along with - w3c/webcrypto#73 - it seems that things are moving towards supporting streams in Web Crypto so we'll be able to use SHA-256 to hash arbitrary streams of data without needing any extra dependencies.

The addition of Blake-3 seems unlikely without people like us pushing for it and even then getting all the relevant parties on board will be difficult and the timescales are likely to be glacial, given the years it's taken to move Ed25519 along.

@darobin
Copy link
Owner Author

darobin commented Dec 10, 2024

Ok — I've created a BDASL spec and removed BLAKE3 support.

@darobin darobin closed this as completed Dec 10, 2024
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

5 participants