feat: migrate remaining sync decrypt/encrypt calls#8908
Draft
bdesoky wants to merge 1 commit into
Draft
Conversation
8ddd2ea to
dc430f9
Compare
dc430f9 to
9e1eb22
Compare
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.
Ticket: WCN-284
This pull request introduces significant improvements to the BitGo SDK's cryptographic operations by adding asynchronous versions of key decryption, encryption, and verification functions. These changes modernize the codebase, improve support for v2 encryption, and ensure that cryptographic operations do not block the event loop. The updates affect multiple modules, including UTXO, Cosmos, Lightning, and Express, and also update related tests.
Key improvements include:
Asynchronous Cryptographic Operations
decrypt,encrypt, and related keychain methods with their asynchronous counterparts (decryptAsync,encryptAsync) across Lightning, Cosmos, UTXO, and Express modules, ensuring non-blocking cryptographic operations throughout the codebase. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19]Asynchronous Key Verification
verifyUserPublicKeyAsynctoabstract-utxoand updated all relevant code paths to use the async version, while retaining the synchronous method for backward compatibility. This ensures compatibility with v2 encryption and improves security practices. [1] [2] [3] [4] [5] [6] [7]Refactoring and Internal API Updates
getBip32KeysAsyncandverifyUserPublicKeyWithPrv, and updated their usages throughout the codebase. [1] [2] [3] [4] [5]Express API and Test Updates
Deprecation and Backward Compatibility
These changes collectively modernize the SDK's cryptographic operations, improve compatibility with newer encryption standards, and lay the groundwork for future enhancements.