Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ specific to hash.

## Cautions

- Every C library is unchanged upstream code. A moved pin is a change of its own
(CODING-GUIDELINES.md chapter 5, rule 12).
- Every C library is upstream code, unchanged except where CODING-GUIDELINES.md chapter 5 rule 1
allows a security fix on the mirror's `webcpp` branch (BearSSL: 32381d6, ECDSA's nonce
decoding); a moved pin carries that commit. A moved pin is a change of its own (rule 12).
- A test is declared through `hash-run` in `test/Jamfile`, which runs it with exceptions and
without.
- `include/webcpp/hash/detail/canary.h` is a C header: it is in neither the headers-alone list nor
Expand Down
10 changes: 5 additions & 5 deletions doc/backends.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ states about its constant time. The backends:
| every function of its cells

| bearssl
| BearSSL at 7bea48e (v0.6-39)
| BearSSL at 32381d6 (webcpporg/bearssl's webcpp branch: upstream 7bea48e (v0.6-39) plus one ECDSA fix that does not touch hashing)
| MIT
| `/third_party//bearssl`
| native, wasip2, wasip3, emscripten
Expand Down Expand Up @@ -2061,10 +2061,10 @@ What each backend's upstream states, and where:
* blake3: not stated. BLAKE3 1.8.7: README.md and c/README.md state no constant-time property.
* sodium: not stated. libsodium 1.0.22: its headers state constant time for comparisons (sodium/utils.h) alone, not for its hashing, MAC, key derivation and password hashing functions (crypto_hash_*, crypto_xof_*, crypto_generichash_*, crypto_shorthash_*, crypto_auth_*, crypto_kdf_*, crypto_pwhash_*).
* bearssl: not stated.
** BearSSL at 7bea48e (v0.6-39): bearssl_hash.h states constant time for its GHASH implementations alone, not for br_md5_*, br_sha1_*, br_sha224_* to br_sha512_* or br_md5sha1_*.
** BearSSL at 7bea48e (v0.6-39): bearssl_kdf.h states no constant-time property for br_shake_*.
** BearSSL at 7bea48e (v0.6-39): bearssl_hmac.h states constant time for br_hmac_outCT alone; mac calls br_hmac_out.
** BearSSL at 7bea48e (v0.6-39): bearssl_hmac.h states constant time for br_hmac_outCT alone; br_hkdf_* (src/kdf/hkdf.c) calls br_hmac_out.
** BearSSL upstream 7bea48e (v0.6-39), unchanged in webcpp's pin 32381d6: bearssl_hash.h states constant time for its GHASH implementations alone, not for br_md5_*, br_sha1_*, br_sha224_* to br_sha512_* or br_md5sha1_*.
** BearSSL upstream 7bea48e (v0.6-39), unchanged in webcpp's pin 32381d6: bearssl_kdf.h states no constant-time property for br_shake_*.
** BearSSL upstream 7bea48e (v0.6-39), unchanged in webcpp's pin 32381d6: bearssl_hmac.h states constant time for br_hmac_outCT alone; mac calls br_hmac_out.
** BearSSL upstream 7bea48e (v0.6-39), unchanged in webcpp's pin 32381d6: bearssl_hmac.h states constant time for br_hmac_outCT alone; br_hkdf_* (src/kdf/hkdf.c) calls br_hmac_out.
* openssl: not stated.
** OpenSSL 3.5.9: doc/man7/EVP_MD-*.pod, doc/man3/EVP_DigestInit.pod and providers/implementations/digests/ state no constant-time property.
** OpenSSL 3.5.9: doc/man3/EVP_MAC.pod, doc/man7/EVP_MAC-HMAC.pod, EVP_MAC-KMAC.pod, EVP_MAC-BLAKE2.pod, EVP_MAC-Siphash.pod and providers/implementations/macs/ state no constant-time property.
Expand Down
34 changes: 17 additions & 17 deletions doc/capabilities.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"name": "bearssl",
"tag": "backends::bearssl",
"macro": "BEARSSL",
"library": "BearSSL at 7bea48e (v0.6-39)",
"library": "BearSSL at 32381d6 (webcpporg/bearssl's webcpp branch: upstream 7bea48e (v0.6-39) plus one ECDSA fix that does not touch hashing)",
"licence": "MIT",
"jamfile": "/third_party//bearssl",
"targets": [
Expand Down Expand Up @@ -390,7 +390,7 @@
"hmacs": null,
"constant_time": {
"value": "not stated",
"source": "BearSSL at 7bea48e (v0.6-39): bearssl_hash.h states constant time for its GHASH implementations alone, not for br_md5_*, br_sha1_*, br_sha224_* to br_sha512_* or br_md5sha1_*."
"source": "BearSSL upstream 7bea48e (v0.6-39), unchanged in webcpp's pin 32381d6: bearssl_hash.h states constant time for its GHASH implementations alone, not for br_md5_*, br_sha1_*, br_sha224_* to br_sha512_* or br_md5sha1_*."
}
},
"openssl": {
Expand Down Expand Up @@ -430,7 +430,7 @@
"hmacs": null,
"constant_time": {
"value": "not stated",
"source": "BearSSL at 7bea48e (v0.6-39): bearssl_hash.h states constant time for its GHASH implementations alone, not for br_md5_*, br_sha1_*, br_sha224_* to br_sha512_* or br_md5sha1_*."
"source": "BearSSL upstream 7bea48e (v0.6-39), unchanged in webcpp's pin 32381d6: bearssl_hash.h states constant time for its GHASH implementations alone, not for br_md5_*, br_sha1_*, br_sha224_* to br_sha512_* or br_md5sha1_*."
}
},
"openssl": {
Expand Down Expand Up @@ -478,7 +478,7 @@
"hmacs": null,
"constant_time": {
"value": "not stated",
"source": "BearSSL at 7bea48e (v0.6-39): bearssl_hash.h states constant time for its GHASH implementations alone, not for br_md5_*, br_sha1_*, br_sha224_* to br_sha512_* or br_md5sha1_*."
"source": "BearSSL upstream 7bea48e (v0.6-39), unchanged in webcpp's pin 32381d6: bearssl_hash.h states constant time for its GHASH implementations alone, not for br_md5_*, br_sha1_*, br_sha224_* to br_sha512_* or br_md5sha1_*."
}
},
"openssl": {
Expand Down Expand Up @@ -526,7 +526,7 @@
"hmacs": null,
"constant_time": {
"value": "not stated",
"source": "BearSSL at 7bea48e (v0.6-39): bearssl_hash.h states constant time for its GHASH implementations alone, not for br_md5_*, br_sha1_*, br_sha224_* to br_sha512_* or br_md5sha1_*."
"source": "BearSSL upstream 7bea48e (v0.6-39), unchanged in webcpp's pin 32381d6: bearssl_hash.h states constant time for its GHASH implementations alone, not for br_md5_*, br_sha1_*, br_sha224_* to br_sha512_* or br_md5sha1_*."
}
},
"openssl": {
Expand Down Expand Up @@ -574,7 +574,7 @@
"hmacs": null,
"constant_time": {
"value": "not stated",
"source": "BearSSL at 7bea48e (v0.6-39): bearssl_hash.h states constant time for its GHASH implementations alone, not for br_md5_*, br_sha1_*, br_sha224_* to br_sha512_* or br_md5sha1_*."
"source": "BearSSL upstream 7bea48e (v0.6-39), unchanged in webcpp's pin 32381d6: bearssl_hash.h states constant time for its GHASH implementations alone, not for br_md5_*, br_sha1_*, br_sha224_* to br_sha512_* or br_md5sha1_*."
}
},
"openssl": {
Expand Down Expand Up @@ -630,7 +630,7 @@
"hmacs": null,
"constant_time": {
"value": "not stated",
"source": "BearSSL at 7bea48e (v0.6-39): bearssl_hash.h states constant time for its GHASH implementations alone, not for br_md5_*, br_sha1_*, br_sha224_* to br_sha512_* or br_md5sha1_*."
"source": "BearSSL upstream 7bea48e (v0.6-39), unchanged in webcpp's pin 32381d6: bearssl_hash.h states constant time for its GHASH implementations alone, not for br_md5_*, br_sha1_*, br_sha224_* to br_sha512_* or br_md5sha1_*."
}
},
"openssl": {
Expand Down Expand Up @@ -726,7 +726,7 @@
"hmacs": null,
"constant_time": {
"value": "not stated",
"source": "BearSSL at 7bea48e (v0.6-39): bearssl_hash.h states constant time for its GHASH implementations alone, not for br_md5_*, br_sha1_*, br_sha224_* to br_sha512_* or br_md5sha1_*."
"source": "BearSSL upstream 7bea48e (v0.6-39), unchanged in webcpp's pin 32381d6: bearssl_hash.h states constant time for its GHASH implementations alone, not for br_md5_*, br_sha1_*, br_sha224_* to br_sha512_* or br_md5sha1_*."
}
},
"openssl": {
Expand Down Expand Up @@ -1055,7 +1055,7 @@
"hmacs": null,
"constant_time": {
"value": "not stated",
"source": "BearSSL at 7bea48e (v0.6-39): bearssl_kdf.h states no constant-time property for br_shake_*."
"source": "BearSSL upstream 7bea48e (v0.6-39), unchanged in webcpp's pin 32381d6: bearssl_kdf.h states no constant-time property for br_shake_*."
}
},
"openssl": {
Expand Down Expand Up @@ -1111,7 +1111,7 @@
"hmacs": null,
"constant_time": {
"value": "not stated",
"source": "BearSSL at 7bea48e (v0.6-39): bearssl_kdf.h states no constant-time property for br_shake_*."
"source": "BearSSL upstream 7bea48e (v0.6-39), unchanged in webcpp's pin 32381d6: bearssl_kdf.h states no constant-time property for br_shake_*."
}
},
"openssl": {
Expand Down Expand Up @@ -2392,7 +2392,7 @@
"hmacs": null,
"constant_time": {
"value": "not stated",
"source": "BearSSL at 7bea48e (v0.6-39): bearssl_hmac.h states constant time for br_hmac_outCT alone; mac calls br_hmac_out."
"source": "BearSSL upstream 7bea48e (v0.6-39), unchanged in webcpp's pin 32381d6: bearssl_hmac.h states constant time for br_hmac_outCT alone; mac calls br_hmac_out."
}
},
"openssl": {
Expand Down Expand Up @@ -2433,7 +2433,7 @@
"hmacs": null,
"constant_time": {
"value": "not stated",
"source": "BearSSL at 7bea48e (v0.6-39): bearssl_hmac.h states constant time for br_hmac_outCT alone; mac calls br_hmac_out."
"source": "BearSSL upstream 7bea48e (v0.6-39), unchanged in webcpp's pin 32381d6: bearssl_hmac.h states constant time for br_hmac_outCT alone; mac calls br_hmac_out."
}
},
"openssl": {
Expand Down Expand Up @@ -2482,7 +2482,7 @@
"hmacs": null,
"constant_time": {
"value": "not stated",
"source": "BearSSL at 7bea48e (v0.6-39): bearssl_hmac.h states constant time for br_hmac_outCT alone; mac calls br_hmac_out."
"source": "BearSSL upstream 7bea48e (v0.6-39), unchanged in webcpp's pin 32381d6: bearssl_hmac.h states constant time for br_hmac_outCT alone; mac calls br_hmac_out."
}
},
"openssl": {
Expand Down Expand Up @@ -2531,7 +2531,7 @@
"hmacs": null,
"constant_time": {
"value": "not stated",
"source": "BearSSL at 7bea48e (v0.6-39): bearssl_hmac.h states constant time for br_hmac_outCT alone; mac calls br_hmac_out."
"source": "BearSSL upstream 7bea48e (v0.6-39), unchanged in webcpp's pin 32381d6: bearssl_hmac.h states constant time for br_hmac_outCT alone; mac calls br_hmac_out."
}
},
"openssl": {
Expand Down Expand Up @@ -2580,7 +2580,7 @@
"hmacs": null,
"constant_time": {
"value": "not stated",
"source": "BearSSL at 7bea48e (v0.6-39): bearssl_hmac.h states constant time for br_hmac_outCT alone; mac calls br_hmac_out."
"source": "BearSSL upstream 7bea48e (v0.6-39), unchanged in webcpp's pin 32381d6: bearssl_hmac.h states constant time for br_hmac_outCT alone; mac calls br_hmac_out."
}
},
"openssl": {
Expand Down Expand Up @@ -2637,7 +2637,7 @@
"hmacs": null,
"constant_time": {
"value": "not stated",
"source": "BearSSL at 7bea48e (v0.6-39): bearssl_hmac.h states constant time for br_hmac_outCT alone; mac calls br_hmac_out."
"source": "BearSSL upstream 7bea48e (v0.6-39), unchanged in webcpp's pin 32381d6: bearssl_hmac.h states constant time for br_hmac_outCT alone; mac calls br_hmac_out."
}
},
"openssl": {
Expand Down Expand Up @@ -3533,7 +3533,7 @@
],
"constant_time": {
"value": "not stated",
"source": "BearSSL at 7bea48e (v0.6-39): bearssl_hmac.h states constant time for br_hmac_outCT alone; br_hkdf_* (src/kdf/hkdf.c) calls br_hmac_out."
"source": "BearSSL upstream 7bea48e (v0.6-39), unchanged in webcpp's pin 32381d6: bearssl_hmac.h states constant time for br_hmac_outCT alone; br_hkdf_* (src/kdf/hkdf.c) calls br_hmac_out."
}
},
"openssl": {
Expand Down
2 changes: 1 addition & 1 deletion doc/generated/backends-hkdf.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@

What each backend states on constant time, as the capability table read it:

* `bearssl`: BearSSL at 7bea48e (v0.6-39): bearssl_hmac.h states constant time for br_hmac_outCT alone; br_hkdf_* (src/kdf/hkdf.c) calls br_hmac_out.
* `bearssl`: BearSSL upstream 7bea48e (v0.6-39), unchanged in webcpp's pin 32381d6: bearssl_hmac.h states constant time for br_hmac_outCT alone; br_hkdf_* (src/kdf/hkdf.c) calls br_hmac_out.
* `botan`: Botan 3.14.1: doc/api_ref/kdf.rst states no constant-time property of its KDFs, and their source (src/lib/kdf/) none.
* `hash2`: Boost.Hash2 1.92: its headers (boost/hash2/) state no constant-time property.
* `openssl`: OpenSSL 3.5.9: doc/man7/EVP_KDF-HKDF.pod and EVP_KDF-PBKDF2.pod state no constant-time property.
Expand Down
2 changes: 1 addition & 1 deletion doc/generated/backends-hmac.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@

What each backend states on constant time, as the capability table read it:

* `bearssl`: BearSSL at 7bea48e (v0.6-39): bearssl_hmac.h states constant time for br_hmac_outCT alone; mac calls br_hmac_out.
* `bearssl`: BearSSL upstream 7bea48e (v0.6-39), unchanged in webcpp's pin 32381d6: bearssl_hmac.h states constant time for br_hmac_outCT alone; mac calls br_hmac_out.
* `botan`:
** Botan 3.14.1: doc/api_ref/hash.rst warns that Streebog's baseline implementation uses table lookups indexed by the data and is likely vulnerable to cache-based side channels; its constant-time code needs AVX-512 and GFNI, an instruction-set module that /third_party//botan's minimized build does not load.
** Botan 3.14.1: doc/api_ref/hash.rst warns that Whirlpool's baseline implementation uses table lookups indexed by the data and is likely vulnerable to cache-based side channels; its constant-time code needs AVX2 or AVX-512, instruction-set modules that /third_party//botan's minimized build does not load.
Expand Down
2 changes: 1 addition & 1 deletion doc/generated/backends-md5-sha1-sha2.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@

What each backend states on constant time, as the capability table read it:

* `bearssl`: BearSSL at 7bea48e (v0.6-39): bearssl_hash.h states constant time for its GHASH implementations alone, not for br_md5_*, br_sha1_*, br_sha224_* to br_sha512_* or br_md5sha1_*.
* `bearssl`: BearSSL upstream 7bea48e (v0.6-39), unchanged in webcpp's pin 32381d6: bearssl_hash.h states constant time for its GHASH implementations alone, not for br_md5_*, br_sha1_*, br_sha224_* to br_sha512_* or br_md5sha1_*.
* `botan`: Botan 3.14.1: doc/api_ref/hash.rst states no constant-time property of this hash, and its source (src/lib/hash/) none.
* `hash2`: Boost.Hash2 1.92: its headers (boost/hash2/) state no constant-time property.
* `openssl`: OpenSSL 3.5.9: doc/man7/EVP_MD-*.pod, doc/man3/EVP_DigestInit.pod and providers/implementations/digests/ state no constant-time property.
Expand Down
2 changes: 1 addition & 1 deletion doc/generated/backends-sha3-shake.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@

What each backend states on constant time, as the capability table read it:

* `bearssl`: BearSSL at 7bea48e (v0.6-39): bearssl_kdf.h states no constant-time property for br_shake_*.
* `bearssl`: BearSSL upstream 7bea48e (v0.6-39), unchanged in webcpp's pin 32381d6: bearssl_kdf.h states no constant-time property for br_shake_*.
* `botan`:
** Botan 3.14.1: doc/api_ref/hash.rst states no constant-time property of SHAKE or of its XOF interface, and its source (src/lib/xof/shake_xof/) none.
** Botan 3.14.1: doc/api_ref/hash.rst states no constant-time property of this hash, and its source (src/lib/hash/) none.
Expand Down
2 changes: 1 addition & 1 deletion include/webcpp/hash/detail/canary.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#ifdef WEBCPP_HASH_BEARSSL_CANARY_COMMIT
#define WEBCPP_HASH_BEARSSL_COMMIT WEBCPP_HASH_BEARSSL_CANARY_COMMIT
#else
#define WEBCPP_HASH_BEARSSL_COMMIT 7bea48e
#define WEBCPP_HASH_BEARSSL_COMMIT 32381d6
#endif

#ifdef WEBCPP_HASH_BOTAN_CANARY_COMMIT
Expand Down
2 changes: 1 addition & 1 deletion test/link/bearssl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// its link, or with another commit's canary (WEBCPP_HASH_BEARSSL_CANARY_COMMIT), it does not link:
// the canary its header reads,
//
// webcpp_hash_bearssl_7bea48e_<configuration>__add_third_party_bearssl_to_your_link,
// webcpp_hash_bearssl_32381d6_<configuration>__add_third_party_bearssl_to_your_link,
//
// whose configuration is noseeder on Windows and getentropy elsewhere, is undefined (spec
// section 5.4). It names nothing of the test support, which a link-fail program is built without.
Expand Down
Loading