go-digest
go-digest copied to clipboard
blake3 is a variable output algorithm, so is this blake3-256?
https://github.com/opencontainers/go-digest/blob/22b78e47854adc56477927aba5f4c930b56af8c9/algorithm.go#L98
https://github.com/zeebo/blake3/blob/master/api.go#L17 ^ does appear to default to 256-bit output, but would still make this mnemonic explicit
A shorter mnemonic such as "b3-256" would be nicer, but runs the risk of name collision with a "barfoo3-256" hash func.
...but runs the risk of name collision...
Everyone stepping in to use their own digest algorithm slug without registering it to claim the name. Which is why image-spec says:
If a useful algorithm is not included in the above table, it SHOULD be submitted to this specification for registration.
But sure, if you pick something fairly weird like pet+name+and+favorite+rock as your algorithm slug, and opt not to register, at least you'll have something fun to talk about with the other devs who picked that same slug with different semantics if/when you bump into them ;)
But opencontainers/image-spec#1240 is in flight to register blake3 as an optional (MAY implement) digest algorithm, and it is trying to clarify the hash length (The hash output length MUST be 256 bits).
@rchincha With the merging of https://github.com/opencontainers/image-spec/pull/1240, is this good to be closed?