)]}'
{
  "commit": "5622da92e1e7bacb5d0785ff5650a5a23b143b84",
  "tree": "165e9941cdca842d450561bada27b109ba8771c5",
  "parents": [
    "47eae51458e3d1bc1fe7459389b23c829379b518"
  ],
  "author": {
    "name": "Adam Langley",
    "email": "agl@chromium.org",
    "time": "Thu May 01 05:58:15 2025 -0700"
  },
  "committer": {
    "name": "Boringssl LUCI CQ",
    "email": "boringssl-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Thu Jun 05 14:47:57 2025 -0700"
  },
  "message": "Pack SHA-512 and BLAKE2b a little more tightly.\n\nHonestly, we don\u0027t actually need to support hashing more than 2**64\nbytes on a single machine, so we certainly don\u0027t need to support 2**128\nbytes. Thus pack these structures a little better by supporting only\n2**96 bytes. This removes 8 bytes from these structures and thus 24\nbytes from an HMAC_CTX.\n\nIt\u0027s possible to pack SHA-512 even tighter: the final byte of the block\nbuffer isn\u0027t used between calls. It can be repurposed to store the\nbuffer length (in the lower seven bits) and an \"is SHA-384\" flag in the\nMSB. That saves another eight bytes.\n\nBut the same trick doesn\u0027t work for BLAKE2b because it hashes in a\n\"final block\" flag and thus needs to know whether there\u0027s more data\ncoming before hashing a block. Thus it uses all 128 bytes for storage.\n\nSo while we can pack SHA-512 tighter, BLAKE2b would still keep\nEVP_MAX_MD_DATA_SIZE the same.\n\nPleasingly, this seems net-positive on benchmarks. (Or, at least, not\nnegative.)\n\nBefore:\n\nDid 49145000 SHA-512 (16 bytes) operations in 5000055us (9828891.9 ops/sec): 157.3 MB/s\nDid 17905000 SHA-512 (256 bytes) operations in 5000134us (3580904.0 ops/sec): 916.7 MB/s\nDid 5091000 SHA-512 (1350 bytes) operations in 5000183us (1018162.7 ops/sec): 1374.5 MB/s\nDid 871000 SHA-512 (8192 bytes) operations in 5004110us (174056.9 ops/sec): 1425.9 MB/s\nDid 440000 SHA-512 (16384 bytes) operations in 5008994us (87842.0 ops/sec): 1439.2 MB/s\n\nAfter:\n\nDid 50435000 SHA-512 (16 bytes) operations in 5000060us (10086879.0 ops/sec): 161.4 MB/s\nDid 18218000 SHA-512 (256 bytes) operations in 5000068us (3643550.4 ops/sec): 932.7 MB/s\nDid 5126000 SHA-512 (1350 bytes) operations in 5000588us (1025079.5 ops/sec): 1383.9 MB/s\nDid 872000 SHA-512 (8192 bytes) operations in 5002028us (174329.3 ops/sec): 1428.1 MB/s\nDid 440000 SHA-512 (16384 bytes) operations in 5004069us (87928.4 ops/sec): 1440.6 MB/s\n\nChange-Id: Ib996d82cff3e959993a9e553a688766c2e9052fb\nReviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/79508\nReviewed-by: David Benjamin \u003cdavidben@google.com\u003e\nCommit-Queue: Adam Langley \u003cagl@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "82cc00a0a29f4f623966a1400db6779753a84e7a",
      "old_mode": 33188,
      "old_path": "crypto/fipsmodule/digest/digest.cc.inc",
      "new_id": "0b206be1fb1ab2a45f88dc750fcba0096e0a8f57",
      "new_mode": 33188,
      "new_path": "crypto/fipsmodule/digest/digest.cc.inc"
    },
    {
      "type": "modify",
      "old_id": "4254f23f0d0fc17a4ac062b91f9f319b17b29995",
      "old_mode": 33188,
      "old_path": "crypto/fipsmodule/sha/sha512.cc.inc",
      "new_id": "0c46df1bad3abf5eb9ceefcdc39d8931839ca76c",
      "new_mode": 33188,
      "new_path": "crypto/fipsmodule/sha/sha512.cc.inc"
    },
    {
      "type": "modify",
      "old_id": "c5326e20f85849aefa96825d9c31f03d935bf9ca",
      "old_mode": 33188,
      "old_path": "include/openssl/bcm_public.h",
      "new_id": "e2c0a93e458394115926cde5f83e2e092f9aa1db",
      "new_mode": 33188,
      "new_path": "include/openssl/bcm_public.h"
    },
    {
      "type": "modify",
      "old_id": "5378fc3c0f74a6cd066f49547e23e14e6172205d",
      "old_mode": 33188,
      "old_path": "include/openssl/blake2.h",
      "new_id": "163869e62a8ab1433ef089c26b6daf4fa4bd88a0",
      "new_mode": 33188,
      "new_path": "include/openssl/blake2.h"
    },
    {
      "type": "modify",
      "old_id": "2db31de31d8d148d0e260ad709bd6426894ad367",
      "old_mode": 33188,
      "old_path": "include/openssl/digest.h",
      "new_id": "710c6e6d110378d1db10d8c2ae57b2d844c603b9",
      "new_mode": 33188,
      "new_path": "include/openssl/digest.h"
    }
  ]
}
