Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Remove functions which use passphrase as input #7291

Closed
Tracked by #7210
shuse2 opened this issue Jul 11, 2022 · 0 comments · Fixed by #7364
Closed
Tracked by #7210

Remove functions which use passphrase as input #7291

shuse2 opened this issue Jul 11, 2022 · 0 comments · Fixed by #7364

Comments

@shuse2
Copy link
Collaborator

shuse2 commented Jul 11, 2022

Description

With new key derivation algorithm, the ed public/private key are not recommended to be generated as it is now.

Remove all the functions below and add the support to generate the key pair with the current derivation as legacy.

To be removed

ed: {
  signDataWithPassphrase,
  getPrivateAndPublicKeyFromPassphrase,
  getKeys,
},
address: {
  getAddressAndPublicKeyFromPassphrase,
  getAddressFromPassphrase,
  getLisk32AddressFromPassphrase,
},
encrypt: {
  encryptMessageWithPassphrase,
  decryptMessageWithPassphrase,
  encryptPassphraseWithPassword,
  decryptPassphraseWithPassword,
},
utils: {
  bufferToHex
  stringToBuffer
}

To be added

{
  legacy: {
    getKeys: (passphrase) => keys,
    getPrivateAndPublicKeyFromPassphrase,
  },
}

To be updated

ed: {
  signMessageWithPassphrase, (rename/update to use PrivateKey)
  signAndPrintMessage, (update to use private key)
  signData, (alias to signDataWithPrivateKey)
},
bls: {
  signData, (update from signBls)
  verifyData, (update from verifyBls)
}

Acceptance Criteria

  • Remove all the functions mentioned above
  • Replace all the usages with functions which uses private key

Additional Information

Description assumes #6710 is already implemented

@milenagojkovic milenagojkovic added this to the Sprint 74 milestone Jul 18, 2022
@shuse2 shuse2 self-assigned this Jul 20, 2022
@shuse2 shuse2 removed this from the Sprint 74 milestone Jul 25, 2022
@milenagojkovic milenagojkovic added this to the Sprint 75 milestone Aug 1, 2022
shuse2 added a commit that referenced this issue Aug 5, 2022
Remove passphrase handling from cryptography - Closes #7291, #6864,#7332
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants