Skip to content
This repository has been archived by the owner on Nov 24, 2022. It is now read-only.

feat: encryption and decryption #313

Merged
merged 5 commits into from
Jan 14, 2021
Merged

feat: encryption and decryption #313

merged 5 commits into from
Jan 14, 2021

Conversation

Dudleyneedham
Copy link
Member

fixes https://github.com/KILTprotocol/ticket/issues/891

Adding functionality to encryption and decryption of the keys and credentials.

Changing to the redux store.
Changing to the services.

How to test:

Create a credential and keys to store.

Checklist:

  • I have verified that the code works
  • I have verified that the code is easy to understand
    • If not, I have left a well-balanced amount of inline comments
  • I have left the code in a better state
  • I have documented the changes (where applicable)

@Dudleyneedham Dudleyneedham self-assigned this Jan 11, 2021
@Dudleyneedham Dudleyneedham marked this pull request as ready for review January 12, 2021 13:45
src/state/PersistentStore.ts Outdated Show resolved Hide resolved
src/utils/Encryption/Encryption.ts Show resolved Hide resolved
@Dudleyneedham
Copy link
Member Author

Need to add - https://github.com/dchest/scrypt-async-js/ - in order to produce a key to access the local storage.

This is done with a plain text password and salt.

Storing the salt also in the local storage separate from the encrypted data.

First we check if the salt is in the local storage, if not generate a salt and store. Using the salt and password to create the key needed to encrypt and decrypt the local storage.

Copy link
Contributor

@tjwelde tjwelde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Dudleyneedham Dudleyneedham merged commit 33de94d into develop Jan 14, 2021
@Dudleyneedham Dudleyneedham deleted the dn-encrypt-decrypt branch January 14, 2021 12:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants