feat: seal stored records with HMAC-SHA256 instead of CRC-16 - #62
Merged
Conversation
|
Note Reviews pausedUse the following commands to manage reviews:
Use the checkboxes below for quick actions:
Comment |
DavidCozens
force-pushed
the
stage-13-tls
branch
from
August 16, 2026 17:57
55d7a7f to
4313c9f
Compare
Contributor
Author
|
@coderabbitai pause |
SolidSyslogMbedTlsHmacSha256Policy replaces SolidSyslogCrc16Policy on the store. Records at rest are tamper-evident rather than checksummed: an edit without the key fails verification. Flash +13,416 B (+332 on the previous stage) RAM +37,472 B (+20) Log stack +680 B (unchanged) Service +3,768 B (unchanged) Twenty bytes, and it is the policy's pool entry. The mechanism for holding a named symmetric key and handing it out is the device's own, so the key slot, the loader and the accessor all sit below the line. SHA-256 was already linked, and the policy hashes into a caller-owned buffer, so there is no stack movement and no heap. The key is fetched per seal and per verify rather than held, so it never sits on the policy instance. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
DavidCozens
force-pushed
the
stage-14-hmac
branch
from
August 16, 2026 17:57
f041384 to
cee3ffe
Compare
✅ Action performedReviews paused. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace the CRC-16 with a keyed HMAC. The checksum established that a record came back the way it
went in; the HMAC establishes that nobody has changed it since. An edit made without the key fails
verification, so stored records become tamper-evident rather than merely intact.
The key is fetched per seal and per verify rather than held, so it never sits on the policy instance.
Key custody, rotation and provisioning are yours; the library consumes a key you supply and never
stores one.
Holding a named symmetric key and handing it out is the device's own mechanism — a device already
doing mTLS has provisioned secrets and somewhere to keep them, so the key slot, the loader and the
accessor all sit below the line. What SolidSyslog is charged for is the policy and the callback that
reaches for the key.