Open ikeycode opened 10 months ago
The hash algorithm used should be specified in any manifests, allowing for usage of multiple hash types (even if Serpent only ever uses Blake3). It should be possible to have a system composed of packages using mixed hash types. Such a feature would facilitate a migration if (somehow) Blake3 is ever considered broken and we must migrate away. Supporting alternate hash types would also make the tooling more interesting to projects like composefs which may wish to share a content addressable store between the container images and the host fs.
Would it make sense then to deprecate PackageHash
and add TypedPackageHash
which was prefaced with the hash algo? i. 3$string0
- with PackageHash
being SHA256Hash
- permalocked
Note that internally v1 storage hashes are locked to XXH3_128 - but we can obviously refine this in V2 with a type field
I also feel like there is a tooling opportunity here to interact with the roots + caches and export relevant hash types (probably for #19 ?)
We've relied heavily on SHA-256 in the past, but would like to move
PackageHash
to be based on BLAKE3 going forwards. We also need this for verification routines