Skip to content

Commit 53831a6

Browse files
author
Stephen Day
authored
Merge pull request opencontainers#587 from wking/sha256-algo
descriptor: Define the 'sha256' algo identifier
2 parents 9819eae + ed89aca commit 53831a6

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

descriptor.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ hex := /[a-f0-9]+/
7676

7777
Some example digest strings include the following:
7878

79-
digest | description |
80-
----------------------------------------------------------------------------------|------------------------------------------------
81-
sha256:6c3c624b58dbbcd3c0dd82b4c53f04194d1247c6eebdaab7c610cf7d66709b3b | Common sha256 based digest |
79+
digest | algorithm |
80+
------------------------------------------------------------------------|---------------------|
81+
sha256:6c3c624b58dbbcd3c0dd82b4c53f04194d1247c6eebdaab7c610cf7d66709b3b | [SHA-256](#sha-256) |
8282

8383
Before consuming content targeted by a descriptor from untrusted sources, the byte content SHOULD be verified against the digest.
8484
Before calculating the digest, the size of the content SHOULD be verified to reduce hash collision space.
@@ -109,6 +109,16 @@ D == ID(C) == '<alg>:' + EncodeHex(H(C))
109109

110110
The _digest_ is confirmed as the content identifier by independently calculating the _digest_.
111111

112+
#### Registered identifiers
113+
114+
The following algorithm identifiers are defined by this specification:
115+
116+
| identifier | algorithm |
117+
|------------|---------------------|
118+
| `sha256` | [SHA-256](#sha-256) |
119+
120+
If a useful algorithm is not included in the above table, it SHOULD be submitted to this specification for standardization.
121+
112122
#### SHA-256
113123

114124
[SHA-256](https://tools.ietf.org/html/rfc4634#page-7) is a collision-resistant hash function, chosen for ubiquity, reasonable size and secure characteristics.

0 commit comments

Comments
 (0)