Cryptographic operations shouldn't be the frontend/GUIs responsibility. Instead, they should be handled by the DeFi framework. To achieve this we should:
- Allow initialization of the framework without a seed, in this case, a seed must be generated, encrypted and saved for reuse in a secure manner. It would also be good to create encrypt/decrypt APIs that GUIs can use to send files/data to the defi framework to encrypt before they can save it on their side or to decrypt after loading it from storage.
- Seed generation should support BIP39 standard plus any other used/known standards.
- This can be part of the crypto crate which includes the crypto context for HD/HW/Metamask/etc.. or a new crate can be created specifically for this. The idea is to separate this critical code from other non-critical parts.
- We already use tiny-bip39 lib to create the HD wallet seed/secret from the Mnemonic phrase passed on initialization. This lib contains implementations for creating a new Mnemonic phrase from entropy. We need to check the library for any known issues before using it for this purpose.
ref: https://github.com/KomodoPlatform/komodo_encryption_tool/pull/1#issuecomment-1651230832, https://github.com/KomodoPlatform/komodo_encryption_tool/pull/1#issuecomment-1678687099
C.C. @ca333 @Alrighttt @yurii-khi
Cryptographic operations shouldn't be the frontend/GUIs responsibility. Instead, they should be handled by the DeFi framework. To achieve this we should:
ref: https://github.com/KomodoPlatform/komodo_encryption_tool/pull/1#issuecomment-1651230832, https://github.com/KomodoPlatform/komodo_encryption_tool/pull/1#issuecomment-1678687099
C.C. @ca333 @Alrighttt @yurii-khi