Fix initial version of cardano-crypto-wallet#667
Draft
lehins wants to merge 33 commits into
Draft
Conversation
…crypto_ to ccw_" This reverts commit cc5f867.
Also deprecate `byteStringToByteArray` in its favor
This properly fixes scoping and async exception handling for decrypting `KeyMaterial` Also rename `encryptedChangePass` -> `encryptedChangePassphrase` for consistency with `encryptedValidatePassphrase`
Also introduce a more descriptive `mkEncryptedKey` function that deprecates `encryptedKey`
Extracting `SecretKey` construction outside, makes resource allocation in `bracket` much cheaper, which is absolutely what we want for proper async exception handling
* `ekey` -> `skey` * `ENCRYPTED_KEY_SIZE` -> `UNENCRYPTED_KEY_SIZE` It was incorrectly named, since secret key in that structure is not encrypted
There was a totally unnecessary allocation of key material legacy struct
Also rename `encrypted_key` -> `key_material` f
There was need to make a copy of the full `KeyMaterial` into MLocked memory, which is scarce, just to validate public key against a secret key
We also need to make sure that tag is fully set to zero, since it doesn't llook like the full overwrite is guaranteed.
10741b8 to
610e241
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.
Description
This is a PR that fixes initial version that was added in #653 and reverts #666
This PR is mostly ready. I just need to tidy up git history, self-review the PR and provide a better description for this PR with important changes that are applied to the initial version. Other than that it is ready for review
Checklist
CHANGELOG.mdfor the affected packages.New section is never added with the code changes. (See RELEASING.md)
.cabalandCHANGELOG.mdfiles according to theversioning process.
.cabalfiles for all affected packages are updated.If you change the bounds in a cabal file, that package itself must have a version increase. (See RELEASING.md)