feat: add decrypt_with_signature()#59
Merged
basfroman merged 4 commits intoopentensor:stagingfrom Nov 14, 2025
Merged
Conversation
Contributor
|
@ShubhamChndrvnshi please update this PR with staging. I merged you previous PR. |
…-with-signature merge upstream staging
Contributor
Author
Awesome. Have taken a pull from staging to my pr. Again thanks for the review. |
basfroman
reviewed
Nov 14, 2025
basfroman
approved these changes
Nov 14, 2025
Contributor
Everything is great. You described the docstrings well and added tests. That's fine. Thank you! |
This was referenced Nov 17, 2025
Merged
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.
tl;dr
decrypt_with_signature()andget_signature_for_round()to fetch Drand signatures once and reuse for multiple decryptions (1 API call instead of 10k for 10k messages)changes
decrypt_with_signature(encrypted_data, signature_hex)inpython_bindings.rs
get_signature_for_round(reveal_round)in python_bindings.rstest_get_signature_for_round,test_decrypt_with_signature,test_batch_decryption_optimizationwhy
decrypt()fetches Drand signature from API on every calltesting
pytest tests/test_all_functions.pypasses (8/8 tests)ruff check .passes