gosdk icon indicating copy to clipboard operation
gosdk copied to clipboard

feat(zcncore): added CryptoJsEncrypt and CryptoJsDecrypt

Open cnlangzi opened this issue 1 year ago • 1 comments

Changes

  • added zcncore.CryptoJsEcnrypt and CryptoJsDecrypt. they can work with crypto-js library

Fixes

  • added unit tests for zcncore/Encrypt and zcncore/Decrypt

Tests

Tasks to complete before merging PR:

  • [ ] Ensure system tests are passing. If not Run them manually to check for any regressions :clipboard:
  • [ ] Do any new system tests need added to test this change? do any existing system tests need updated? If so create a PR at 0chain/system_test
  • [ ] Merge your system tests PR to master AFTER merging this PR

Associated PRs (Link as appropriate):

cnlangzi avatar Dec 12 '22 10:12 cnlangzi

We need to use scrypt to do the wallet encryption to reduce the possibility for brute force attack. And we need to chose different difficult levels for different devices, mainly for mobile device and computers.

@peterlimg could you share an example or library? AES+ccb+pkcs5 is used on all web-apps to encrypt mnemonics. if it is not good, we need update all of them.

cnlangzi avatar Dec 13 '22 12:12 cnlangzi

Manual system tests [failure] with the following config

config value
tests skipped FALSE
system-tests 398-new-system-test-for-nft-allocation-features
gosdk staging
zboxcli 149-nft-changes
zwalletcli staging
0chain 828-nft-restrict-file-access-options
blobber 476-toggle-permission-to-uploaddelete-update-move-copy-and-rename
authorizer staging
0box staging
0block staging
0dns staging
explorer staging
0proxy staging
0search staging

service-0chain avatar Jan 01 '23 11:01 service-0chain

Manual system tests [failure] with the following config

config value
tests skipped FALSE
system-tests master
gosdk staging
zboxcli staging
zwalletcli staging
0chain staging
blobber staging
authorizer staging
0box staging
0block staging
0dns staging
explorer staging
0proxy staging
0search staging

service-0chain avatar Jan 02 '23 08:01 service-0chain