Repository navigation
fix(crypto): harden crypto slots — OAEP padding, cancellation token, input validation - #482
Merged
Merged
Conversation
Replaces PKCS#1 v1.5 with OAEP(SHA-256), closing the Bleichenbacher/Manger chosen-ciphertext padding-oracle class. Legacy v1.5 ciphertexts are now refused with a clean HyperlambdaException. Wire-format breaking for externally stored v1.5 ciphertexts; no committed .hl code uses these slots.
Passes the execution token to ComputeHashAsync so a long file hash observes the deadline, matching the DB adapters.
Non-string key, signature, and password nodes previously coerced to null and surfaced as ungraceful crypto errors. They now throw a clean HyperlambdaException.
|
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.



Summary
Security hardening for the crypto slots, from the manual BouncyCastle usage audit.
Changes
HyperlambdaException, and a regression test proves legacy v1.5 ciphertexts are rejected. Note: wire-format breaking for externally stored v1.5 ciphertexts; no committed.hlcode uses these slots.crypto.hashfile mode now observes the execution token —ComputeHashAsyncreceives the signaler's cancellation token, so long file hashes respect deadlines like the DB adapters do.nulland surfaced as ungraceful crypto errors; they now throw aHyperlambdaException(3 new regression tests).Verification
magic.lambda.crypto.tests: 109/109 passing.