Crypto Agility of ORAS #898
Labels
enhancement
New feature or request
v2
Things belongs to version 2.x
v3
Things belongs to version 3.x
Milestone
Cryptography forms the foundation of security in the cloud-native world. Specifically, hash algorithms are essential in both
oras-go
andoras
for ensuring the integrity of artifacts.As
oras-go v2.5.0
and the upcomingv2.6.0
, the hash functionality is provided by the package github.com/opencontainers/go-digest v1.0.0. Precisely, it allows the following algorithms.It is worth noting that all above SHA-2 algorithms are FIPS 140-2 approved algorithms.
Furthermore, it is required to import those algorithms by
so that their implementations are loaded and are available to
oras-go
. If a given algorithm does not exist in the above list or its implementation is not available,oras-go
simply panics, which we should fix.Naturally,
oras-go
has the crypto agility as the same as thego-digest
package. In themaster
branch of thego-digest
package, it provides aRegisterAlgorithm()
method so that the package can take any algorithms. Thego-digest
package also includes theblake3
algorithm (see also opencontainers/image-spec#819).However, some utility methods of
oras-go
likeoras.PackManifest()
always use the default algorithm and does not provide an algorithm option there (we should have). Since there are more algorithms registered, we should only allow a small set of hash algorithms fororas-go
. For example,blake3
is not FIPS-approved and cannot be used in the FIPS environments although it may be registered in thego-digest
package. In the future,sha256
may also be deprecated, and at that time, we may restrict theoras-go
to usesha512
only.Related issues:
The text was updated successfully, but these errors were encountered: