Compressing Sensitive Data Manually: Part 1
This project in summary uses encryption, encoding and compression using base 10 and base 2 formats. This project should allow anyone to compress and encrypt their data (especially sensitive data) by hand by following a few easy steps.
Compression:
Step 1: Get plaintext
Step 2: Encode each plaintext letters using numbers (ASCII table would be a good choice)
Step 2a: Obtain checksum for plaintext (easiest method would be summing up all of the numbers obtained although not secure)
Step 3: Convert each encoded plaintext letters into base 2 and turn it into a byte (using the same encoding method as step 2)
Step 4: Place each byte into one string of base 2
Step 5: Find base 10 equivalent of the base 2 string
Step 5a: Encryption - Any method will do like RSA, ciphers, and matrix multiplication for example [optional step]
*For step 5a, more than 1 round of encryption with diffrerent methods of encryption for each round is encouraged to decrease your chance of having your ciphertext being cracked.
Decompression:
Step 1: Decryption
Step 2: Change base 10 into base 2 string
Step 3: Separate every 8 bits into a byte
Step 4: If the first byte (the byte containing the MSB) has 7 bits after separating the bits into bytes, add an extra 0 behind the 7th bit to make it 8 bits and therefore a byte. If 6 bits, two 0s.
Step 5: If it is already a byte, leave it
Step 6: Find the base 10 equivalent of each byte
Step 6a: Verify checksum
Step 7: Decode each base 10 value into an alphabet
This compression method offers some benefits like:
Data loss can be identified easily (e.g. torn paper)
Key splitting (the closest example to this is multisignature)
However, the downside would be that the compressed text will always be longer than the plaintext but will always take less space compared to storing base 2 alone.