Closed youngjoon-lee closed 4 years ago
After discussing with @cl9200 in Slack, we decided to use PBKDF2. I will change the panacea-core
: https://github.com/medibloc/panacea-core/issues/38.
About the cipher algorithm, the aes-256-ctr
has already being used in https://wallet.gopanacea.org/#/.
So, let's take the following strategy:
aes-128-ctr
according to the Web3 Secret Storage Definition.aes-256-ctr
and aes-128-ctr
for backward-compatibility.
There is already a TODO: https://github.com/medibloc/panacea-js/blob/960607d39b02ec10a928e644ff2e5f8d472c3a0e/src/crypto/index.js#L167
This code uses
However, Web3 Secret Storage Definition says the cipher algorithm should be
aes-128-ctr
, notaes-256-ctr
.On the contrary,
panacea-core
usesI would suggest that the cipher algorithm of
panacea-js
should be replaced withaes-128-ctr
. Also, for the compatibility withpanacea-core
, we need to decided the KDF (pbkdf2
vsscrypt
).If
panacea-js
has being used for many services, the backward-compatibility would be a critical issue.If it's the problem, I can modify
panacea-core
because the keystore is used only for DID inpanacea-core
. There's no backward-compatibility issue. But still, the cipher algorithm should beaes-128-ctr
.