Skip to content

crypto: HKDF, PBKDF2-SHA256, AES-CCM, portable P-256, SPAKE2+ - #276

Draft
TurkeyMan wants to merge 5 commits into
masterfrom
ow/matter-crypto
Draft

TurkeyMan wants to merge 5 commits into
masterfrom
ow/matter-crypto

Conversation

@TurkeyMan

Copy link
Copy Markdown
Member

Crypto primitives needed by the Matter work in open-watt/openwatt#673. All pure D on the existing HMAC/SHA-256/AES-ECB so they run on every target. Each module carries RFC test vectors or a round-trip test. P-256 is affine and not constant-time (documented); Jacobian coordinates are a follow-up once the SPAKE2+ flow is proven end to end.

Draft: opened for CI.

🤖 Generated with Claude Code

TurkeyMan and others added 5 commits September 11, 2026 01:04
Generalises PBKDF2 over the digest context like HMAC, keeping the SHA-1 aliases
WPA2 uses. HKDF and AES-CCM are pure D on the existing HMAC and AES-ECB
primitives so they work on every target. All three carry their RFC vectors.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Affine point add/double/multiply and 256-bit modular helpers in pure D, for
protocols such as SPAKE2+ that need raw point operations the mbedTLS shim and
BCrypt do not expose. Not constant-time; documented as such.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Removes the per-step field inversion from scalar multiplication; the affine
add and double stay for callers that need them.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant