Update call names; update & improve docs on library usage - #336
Merged
PropzSaladaz merged 3 commits intoSep 25, 2026
Merged
PropzSaladaz merged 3 commits into
PropzSaladaz merged 3 commits into
Conversation
Base automatically changed from
enhancement/331-move-to-256-bit-entropy-aes
to
enhancement/security-hardening
September 23, 2026 16:36
PropzSaladaz
marked this pull request as ready for review
September 24, 2026 17:53
…-decryption-api-cleanup
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Remaining deleted-API calls break test compilation, and documentation inconsistencies should be corrected.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (3)
What changed in this PR
This PR renames threshold-encryption APIs, limits reconstruction shares to the threshold, and expands usage and thread-safety documentation.
Changes:
- Renamed share-management and combination APIs.
- Updated callers, tests, samples, and benchmarks.
- Expanded TE/DKG, serialization, batch API, and AES thread-safety guidance.
| File | Summary |
|---|---|
tools/decryptMessage.cpp |
Updated decryption API usage. |
threshold_encryption/ThresholdEncryption.h |
Renamed combination APIs; brief still incorrectly refers to all shares. |
threshold_encryption/ThresholdEncryption.cpp |
Implemented renamed combination methods. |
threshold_encryption/threshold_encryption.cpp |
Updated helper documentation; contains an “auxiliar” typo. |
threshold_encryption/TEDecryptSet.h |
Renamed share-management and raw-share APIs. |
threshold_encryption/TEDecryptSet.cpp |
Implemented validated insertion and threshold-limited export. |
threshold_encryption/AesGcmCipher.h |
Documented thread-safety requirements. |
test/test_TE_wrappers.cpp |
Updated tests, but remaining calls to deleted addDecryptShare prevent compilation. |
test/test_encrypt_message.cpp |
Updated combination API usage. |
test/te_sample_sgx.cpp |
Updated validated share workflow. |
docs/usage/using-threshold-encryption.md |
Expanded guidance; examples have an aes_key scope issue and overly broad indexing statement. |
docs/usage/using-distributed-key-generation.md |
Updated DKG usage guidance. |
benchmarks/bench_te.cpp |
Updated benchmark API usage. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
badrogger
approved these changes
Sep 25, 2026
PropzSaladaz
merged commit Sep 25, 2026
fac1022
into
enhancement/security-hardening
16 checks passed
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.


Description
This PR is mostly about improving call readability & improving documentation on library usage:
API Rename ($\to$
getSharesRawgetThresholdSharesRaw):TEDecryptSetto accurately reflect that it returns a threshold-bounded subset (Docs Improvements (using-threshold-encryption.md):
1 <= index <= n; 0 is rejected).EncryptMetaDatafor TE and AES AAD.decrypt_set.canMerge()check prior to share combination.validateAndDecrypt(...)to eliminate double-decryption overhead.toBytes/fromBytes,toString) and batch/parallel API references.Thread-Safety Documentation (AesGcmCipher.h):
AesGcmCipheris not thread-safe and requires single-threaded use or external synchronization.Fixes Clarify threshold decryption share handling and update usage docs #335