talk is cheap, show me the proof or code.
Hence, proof is here. 🫡
ForgeX provides two ways of private key storage: Cloud Storage and Local Storage
Below is a detailed explanation of the security and storage process for these two forms within the platform.
When users choose to create a wallet group with local storage, the private key is generated on the user's local frontend. The private key is not uploaded to the cloud; only the wallet address is uploaded to the backend database for wallet monitoring. This can be verified through the console by inspecting network requests.
The private keys of locally stored wallet groups are saved in IndexedDB -> redux -> keyvaluepairs
under local storage. Redux is a commonly used state management and storage library in the React framework. Through persistence technology, front-end data and states are stored locally. Once the persisted data is cleared, all locally stored wallet groups will be erased. Users must restore the wallet group using the previously saved local wallet group JSON file. If the file is lost, there is no way to recover it.This can be verified by clearing the data in keyvaluepairs
and then checking the status of the ForgeX wallet group.
Users can export their locally stored wallet group data as a JSON file at any time.
Unencrypted Export: The wallet group data will be stored in plaintext in the JSON file.
Encrypted Export: The wallet group data will be stored in ciphertext in the JSON file.
ForgeX adopts the AES (Advanced Encryption Standard) encryption algorithm, which is the most commonly used symmetric encryption algorithm and is widely used in the industry. Encryption and decryption both use the same key, which is the password entered by the user during encryption. Once encrypted, no one other than the user can decrypt the file.
Since the responsibility for managing local wallet groups lies with the user's frontend, ForgeX enforces a mandatory process to avoid users forgetting to update their local wallet group JSON file after making changes to the wallet group. Users must re-export the local wallet group JSON file after adding or removing wallets from the group. This ensures that, in extreme cases, the user's local wallet group data is still retained for recovery.
To restore a previously stored local wallet group, users must import the earlier JSON file. The front end will automatically parse the file. If the file is encrypted, users must enter the password for decryption. If the password is incorrect, the wallet group data in the file cannot be recovered.
When users choose to generate a wallet group with cloud storage, the private key is generated on the user's local frontend. After the private key is generated:
The wallet address is uploaded to the backend database for wallet monitoring. This can be verified through the console by inspecting network requests.
Users are required to encrypt the file before uploading it to the cloud for storage.
When users want to view a cloud-stored wallet group, the frontend will require them to enter the password previously set for the wallet group. If the password is incorrect, the user will not be able to access the wallet group.When users want to view the wallet group on a new frontend, since the local frontend does not have the wallet group data, the encrypted file will be downloaded from the cloud. Users will then be prompted to enter the password for decryption, after which the wallet group data will be parsed and displayed.
The private keys of cloud-stored wallet groups are saved in IndexedDB -> redux -> keyvaluepairs
under local storage. Redux is a commonly used state management and storage library in the React framework. Through persistence technology, front-end data and states are stored locally. If the persisted data is cleared, all locally stored wallet groups will be erased.
For cloud-stored wallets, when the frontend detects that the local data for the cloud-stored wallet is missing, it will automatically re-download the encrypted file from the cloud. Users will be prompted to enter the password for decryption, after which the wallet group data will be parsed and displayed. This can be verified by clearing the data in keyvaluepairs
and then checking the status of the ForgeX wallet group.