Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit marks a significant enhancement in the wallet client's security framework by introducing a comprehensive wallet deletion process. This process is triggered under specific circumstances, such as exceeding the number password attempts for encrypted wallets, or overwriting an existing wallet. This 'Wallet Annihilation' feature, is a comprehensive response to potential security breaches, aiming to ensure that sensitive data is thoroughly and effectively overwritten, maximizing the complexity and improbability of successful data recovery. However, it's important to note that, while the data wiping process is is designed to be very thorough and extensive (somewhat overkill to a degree), it is not 100% foolproof (See 'Assumption of Irreversible Deletion' section). This feature integrates a combination of encryption, random data, and advanced data wiping techniques (DoD 5220.22-M, Schneier, and Gutmann methods) to ensure the complete overwrite and erasure of wallet data. The process involves encrypting the wallet data before executing the aformentioned data wiping techniques. This process effectively overwrites the original data multiple times, impeding the feasibility of data recovery. Afterwhich, the file which once held the wallet data is subsequently deleted from the system. Additions: 1. wallet_delete Function: - Added a wallet_delete function, serving as the central orchestrator which oversees file locking, executes the wallet_annihilation function for a specified number of passes, and proceeds with final deletion of a wallet file. - It is designed to significantly enhance the the security framework of the wallet client and complexity of data recovery, but dose not ensure absolute irrecoverability (See 'Assumption of Irreversible Deletion' section). 2. wallet_annihilation Function: - Added a wallet_annihilation function, which orcastrates the wiping process. It first encrypts the data to be wiped using random SHA3-512 hashes as encryption parameters, and then proceeds with the wiping process by utalizeing, in succession, the DoD 5220.22-M, Schneier, and Gutmann methods to ensure thorough overwriting and scrambling of data. - The sequence of encryption and data wiping techniques in this functiom aims to greatly diminish the likelihood of successful data recovery. 3. Encryption with Random SHA3-512 Hashes: - The encryption process involves generating random SHA3-512 hashes, which are used as cryptographic parameters for encrypting the wallet data before the wiping process begins. - This approach elevates the security of the encryption, as the randomness of SHA3-512 hashes greatly reduces the possibility of cryptographic attacks or hash collisions. - The use of these random hashes ensures that encryption parameter is highly secure and unique. 4. Comprehensive Data Wiping Functions: - Incorporated three advanced data wiping standards: DoD 5220.22-M, Schneier, and Gutmann methods. - Each method is specifically chosen for its effectiveness in annihilating data: - DoD_5220_22_M_wipe Function: Executes the DoD 5220.22-M wiping method, a recognized method for secure file erasure. This function executes seven overwrite passes, using a mix of zero bytes (0x00), one bytes (0xFF), and random data. Each pass serves to further obfuscate the underlying data, aligning with the standard's specifications for secure deletion. - Schneier_wipe Function: Executes the Schneier wiping method, a multi-pass data destruction method. This function executes seven overwrite passes. The first two passes use fixed byte patterns (0x00 and 0xFF), followed by five passes that introduce random data. This sequence is designed to thoroughly scramble the data, reducing the possibility of data recovery. - Gutmann_wipe Function: Executes the Gutmann wiping method, known for its extensive pattern use. This function executes thirty-five overwrite passes. The first four passes introduce random data, folowed by twenty-seven additional passes that use various fixed byte patterns, followed by four additional passes of random data. This method is comprehensive, aiming to address various data remanence possibilities and ensuring a high level of data sanitization. 5. overwrite_with_pattern Function: - Add a overwrite_with_pattern function which plays a crucial role in replacing the contents of a file. It methodically replaces the content of a file with a given pattern. It continuously writes the pattern to the file byte by byte, ensuring complete coverage of the original data. The function also includes progress logging and strict data integrity measures, like buffer flushing and disk state synchronization. Assumption of Irreversible Deletion: - The new measures implemented in the wallet client are engineered to make the recovery of deleted wallet data challenging, but it is important to recognize that in the field of digital data security, an absolute guarantee of irreversible deletion is not always possible. Therefore it cannot be gauranteed or assumed that data is 100% irrecoverable. - There are advanced techniques such as memory or cache analysis, and the use of certain text editors or specialized analysis software, that might, under specific conditions, be able to retrieve or restore parts of the deleted data. - While these enhancements significantly increase the difficulty of unauthorized data recovery, they are predicated on the understanding that complete irreversibility in digital data erasure cannot be unequivocally assured. Changes: - When there are 5 password attempts left the user will be shown a warning with this message: "WARNING: Password attempts left are approaching 0, after which any existing wallet data will be ERASED AND POTENTIALLY UNRECOVERABLE!!". - When there are 3 or less password attempts left the warning is set to critial and the message will be in upercase letters. - Other very minor changes to accomidate the new 'Wallet Annihilation' feature.
- Loading branch information