1
0
mirror of https://github.com/HACKERALERT/Picocrypt.git synced 2024-12-15 22:48:45 +01:00
Picocrypt/README.md

118 lines
14 KiB
Markdown
Raw Normal View History

2021-03-29 17:25:29 +02:00
<p align="center"><img align="center" src="./logo/Picocrypt.svg" width="512" alt="Picocrypt"></p>
2021-03-15 03:17:52 +01:00
2021-03-29 17:28:33 +02:00
Picocrypt is a <i>very small</i> (hence "Pico"), very simple, yet very secure file encryption tool. It uses the modern ChaCha20-Poly1305 cipher suite as well as Argon2, making it about as secure and modern of an encryption tool as you'll ever get your hands on. It's very simple to use, which allows anyone to start encrypting private files, no matter what level of experience they have with computers. Picocrypt's focus is <i>security</i>, so it might be slightly slower and less attractive visually than others. Remember: your privacy and security is in your hands. Take good care of it and encrypt your files with Picocrypt. <strong>Please <a href="Donate.md">donate</a> to help raise money to get Picocrypt audited.</strong>
2021-02-18 21:41:56 +01:00
2021-04-07 16:34:55 +02:00
<p align="center"><img alt="Screenshot" src="https://i.imgur.com/qOW693f.png" width="384"></p>
2021-02-19 21:26:53 +01:00
2021-03-29 17:17:04 +02:00
# Downloads
2021-03-19 21:28:59 +01:00
<strong>Windows</strong>
2021-02-25 18:37:19 +01:00
2021-04-14 04:10:04 +02:00
Picocrypt for Windows is as easy as it gets. To download the latest, standalone, and portable executable, click <u><strong><a href="https://github.com/HACKERALERT/Picocrypt/releases/download/1.12.1/Picocrypt.exe" target="_blank">here</a></strong></u>. If your machine has Windows Script Host disabled (unlikely), you can download <strong><u><a href="https://github.com/HACKERALERT/Picocrypt/releases/download/1.12.1/Picocrypt-NoWSH.zip" target="_blank">this</a></u></strong>, extract it, and run the <code>Picocrypt.exe</code> inside. You can also download an installable version of Picocrypt <u><strong><a href="https://github.com/HACKERALERT/Picocrypt/releases/download/1.12.1/Picocrypt-Installer.exe" target="_blank">here</a></strong></u>. Specific releases and details are available from the Releases tab.
2021-03-19 21:28:59 +01:00
<strong>MacOS</strong>
2021-04-14 04:10:04 +02:00
Picocrypt for MacOS is also very easy to use. Download the latest, standalone, and portable executable for MacOS <u><strong><a href="https://github.com/HACKERALERT/Picocrypt/releases/download/1.12.1/Picocrypt.app.zip" target="_blank">here</a></strong></u>. Older versions are available under Releases. MacOS might show a notice that Picocrypt is malware (it isn't) and disable opening it. To fix this, open Finder, Ctrl and right click on Picocrypt, and hit "Open". You might have to do this twice to open Picocrypt. After opening Picocrypt, be patient while Picocrypt loads, as it might take a couple seconds.
2021-03-19 21:28:59 +01:00
<strong>Linux (Debian-based)</strong>
2021-03-19 21:28:59 +01:00
Picocrypt for Debian-based Linux distros is coming soon.
2021-03-19 21:28:59 +01:00
<br>
Note: For some reason, there's an outdated and useless piece of abandonware called PicoCrypt on the Internet, which was last updated in 2005. PicoCrypt is not related to Picocrypt (this project). <strong>Make sure you only download Picocrypt from this Github repository to ensure that you download the correct and backdoor-free software. Downloading from somewhere else could mean that you're potentially downloading malicious or hacked software!</strong>
2021-02-19 02:04:25 +01:00
# Why Picocrypt?
Why should you use Picocrypt, instead of Bitlocker, NordLocker, VeraCrypt, or 7-Zip? Here are some reasons why you should switch to Picocrypt:
<ul>
2021-04-23 00:25:08 +02:00
<li>The only safe encryption is the one you do yourself. Don't trust cloud providers to "encrypt" your data, because you'll never know if they do it properly or not. In Bruce Schneier's <a href="https://www.schneier.com/blog/archives/2013/09/the_nsa_is_brea.html/#comment-202932">opinion</a>, even open-source software can be backdoored. Thus, Picocrypt is meant to be the simplest open-source and auditable tool that allows you to take control over your confidential data and protect it with the most secure and modern standards available.</li>
<li>Unlike NordLocker, Bitlocker, and most cloud storage providers, Picocrypt and its dependencies are FOSS (free open-source software) and can be audited. You can verify for yourself that there aren't any backdoors or flaws.</li>
2021-04-07 19:37:09 +02:00
<li>Picocrypt is portable and <i>tiny</i> (just 4MB for Windows!). It's much lighter than NordLocker (>100MB) and VeraCrypt (>30MB). The standalone executables can run on any machine (Windows, MacOS, or Linux) and they run with no installation, dependencies, or admin privileges. Picocrypt floats your boat without any bloat.</li>
<li>It's infinitely easier to use than VeraCrypt (no need to create volumes) and a 5-year-old could probably use Picocrypt. All you need to do is select your file(s) and enter a password. The internals such as encryption, authentication, and anti-corruption are completely handled by Picocrypt, so you don't have to worry about a thing.</li>
<li>Picocrypt is built for security, using modern standards and secure settings. It's carefully designed and uses well-known libraries to do cryptography. See <strong>Security</strong> below for more info.</li>
2021-03-17 16:40:14 +01:00
<li>It supports file integrity checking through Poly1305, which means that you would know if a hacker has maliciously modified your data. This is useful for transfering sensitive data where authenticity is crucial.</li>
2021-03-19 15:01:16 +01:00
<li>Picocrypt supports anti-corruption through Reed-Solomon. Unlike other encryption tools, Picocrypt actively protects your files by adding extra Reed-Solomon bytes, so if your file gets corrupted (ie. hard drive failure), Picocrypt can still fix the errors and decrypt your files. None of Bitlocker, NordLocker, VeraCrypt, or 7-Zip has this ability.</li>
2021-02-19 02:04:25 +01:00
</ul>
2021-02-18 21:41:56 +01:00
# Instructions
Picocrypt is about as simple as it gets. Just drag and drop the file(s) and folder(s) you choose, enter a password, and start. There are some additional options that you can use for more control:
2021-02-18 21:41:56 +01:00
<ul>
2021-02-19 02:04:25 +01:00
<li>File metadata (editable for encryption, readonly for decryption): Use this to store notes, information, and text along with the file (it won't be encrypted). For example, you can put a description of the file before sending it to someone. When the person you sent it to selects the file in Picocrypt, your description will be shown to that person.</li>
2021-03-17 14:22:32 +01:00
<li>Keep decrypted output even if it's corrupted or modified (decryption only): Picocrypt automatically checks for integrity upon decryption. If the file has been modified or is corrupted, Picocrypt will delete the output. If you want to keep the corrupted or modified data after decryption, check this option. Also, if this option is checked and the Reed-Solomon feature was used on the encrypted file, Picocrypt will attempt to recover as much of the file as possible during decryption, if it is corrupted.</li>
<li>Securely erase and delete original file (encryption only): If checked, Picocrypt will use system internals to overwrite the input file(s) multiple times and delete it. This method is better than just deleting the original file, because in that case, the original file can still be recovered by hackers using special software. Picocrypt securely deletes the original file making sure that it's impossibe to retrieve the original file after deletion.</li>
<li>Prevent corruption using Reed-Solomon (encryption only): This feature is very useful if you are planning on archiving important data on a cloud provider or external hard drive for a long time. If checked, Picocrypt will use the Reed-Solomon error correction code to add 13 extra bytes for every 128 bytes to prevent file corruption. This means that up to ~5% (13/128/2) of your file can corrupt, and Picocrypt will still be able to correct it and decrypt your files with no corruption. Obviously, if your file corrupts very badly (ie. you dropped your hard drive), Picocrypt won't be able to fully recover your files, but it will try its best to recover what it can. Note that decryption is very slow because Picocrypt is reassembling and (if necessary) correcting broken bytes. The output will also be ~10% larger.</li>
2021-02-18 21:41:56 +01:00
</ul>
2021-02-19 02:04:25 +01:00
# Security
2021-03-30 23:21:58 +02:00
I have a solid understanding of cryptography, so I can say with very high confidence that Picocrypt is very secure. It uses XChaCha20-Poly1305, which is a revision of the eSTREAM winner, Salsa20. ChaCha20 has been through a significant amount of cryptanalysis and was selected by security engineers at Google to be used in modern TLS suites. It's considered to be the modern suite of symmetric encryption, and makes Picocrypt more secure than Bitlocker, NordLocker, and 7-Zip. It's used by Cloudflare, Google, and many other forward-thinking companies.
2021-02-19 02:36:55 +01:00
2021-03-29 18:39:51 +02:00
In terms of practical security, I have 2FA enabled on all accounts with a tie to Picocrypt, so you can rest assured that the official Picocrypt repository won't be hacked.
2021-02-19 02:36:55 +01:00
2021-03-29 18:39:51 +02:00
For key derivation, Picocrypt uses Argon2d, winner of the PHC (Password Hashing Competition), which was completed in 2015. Argon2 is even slower than Scrypt and Bcrypt (for those that don't understand crypto, this is a good thing), making GPU, ASIC, and FPGA attacks impractical due to the huge amount of RAM that is used and written to during the key derivation.
2021-02-20 19:53:30 +01:00
2021-04-03 23:47:19 +02:00
For key checking, SHA3-512 (Keccak) is used. For corruption checking, BLAKE3 is used. Before decrypting, Picocrypt checks whether the password is correct by comparing <i>the derived key</i> to a SHA3-512 hash stored in the encrypted file. SHA3 is the latest standard for hashing recommended by the NIST. It's a modern and well-designed hash function that's open-source, unpatented, and royalty-free.
2021-03-29 18:39:51 +02:00
2021-04-03 23:47:19 +02:00
XChaCha20-Poly1305, Argon2, and SHA3 are all well-recognized within the field of cryptography and are all considered to be mature and future-proof. You can rely on these ciphers and algorithms to protect your data, as they are all modern and have undergone a large amount of cryptanalysis.
2021-02-24 16:01:44 +01:00
I did not write the crypto for Picocrypt. Picocrypt uses two Python libraries, <code>argon2-cffi</code> and <code>pycryptodome</code> to do the heavy lifting, both of which are well known and popular within the Python community. For people who want to know how Picocrypt handles the crypto, or for the paranoid, here is a breakdown of how Picocrypt protects your data:
2021-02-19 02:23:40 +01:00
<ol>
2021-03-29 18:43:04 +02:00
<li>A 16-byte salt (for Argon2d) and a 24-byte nonce (for XChaCha20) is generated using a CSPRNG (Python's <code>os.urandom()</code>)</li>
2021-02-19 02:23:40 +01:00
<li>
2021-03-29 18:39:51 +02:00
The encryption/decryption key is generated through Argon2d using the salt above and the following parameters:
2021-02-19 02:23:40 +01:00
<ul>
2021-02-22 17:45:27 +01:00
<li>Time cost: 8</li>
<li>Memory cost: 2^30 (1GiB)</li>
<li>Parallelism: 8</li>
2021-02-19 02:23:40 +01:00
</ul>
</li>
2021-03-15 03:08:50 +01:00
<li>If decrypting, compare the derived key with the SHA3-512 hash of the correct key stored in the ciphertext. If encrypting, compute the SHA3-512 of the derived key and add to ciphertext.</li>
2021-04-03 23:47:19 +02:00
<li>Encryption/decryption start, reading in 1MB chunks at a time. For each chunk, it is first encrypted by XChaCha20, and then a BLAKE3 CRC is updated.</li>
2021-03-17 16:40:14 +01:00
<li>If anti-corruption is checked, the 1MB chunk will be split into 128 byte chunks and 13 additional Reed-Solomon (parity) bytes will be added. If decrypting, decode the encoded 1MB chunk to get the raw data.</li>
2021-03-30 23:21:58 +02:00
<li>When encryption/decryption is finished, the MAC tag (Poly1305) will be added to the ciphertext or verified, depending on if you're encrypting or decrypting. If 'Secure wipe' is enabled, the original file is securely deleted via system internals (<code>sdelete64</code> for Windows, <code>rm -P</code> for MacOS, and <code>shred</code> on Linux).</li>
2021-04-03 23:47:19 +02:00
<li>Similar to above, the BLAKE3 CRC is either checked or added to the ciphertext depending on the operation.</li>
<li>If decrypting and both the BLAKE3 CRC and Poly1305 tag are correct, decryption is considered successful and the process is done. If either don't match, decryption is unsuccessful and an error message will be displayed.</li>
2021-02-19 02:23:40 +01:00
</ol>
2021-02-19 02:36:55 +01:00
Note: the list above is simplified. A lot more is actually happening.
2021-03-17 16:40:14 +01:00
2021-03-19 19:53:54 +01:00
# Roadmap
See <code>Roadmap.md</code> for a list of new features and improvements that I'm working on.
2021-03-21 18:54:02 +01:00
# Community
Here's some places where you can see the latest news about Picocrypt and get involved:
<ul>
2021-04-04 19:00:10 +02:00
<li><a href="https://www.reddit.com/r/Picocrypt/">Reddit</a> (I'm u/ProHackerEvan)</li>
2021-04-07 19:37:09 +02:00
<li><a href="https://discord.gg/ktzZSj853X">Discord</a> (I'm Evannnnn)</li>
2021-03-21 18:54:02 +01:00
</ul>
2021-04-04 19:00:10 +02:00
These are the official Picocrypt social groups. Be aware of scammers and hackers that might try to impersonate me and get you to download malicious software. Only trust these accounts and only download from this Github repo.
2021-03-21 18:54:02 +01:00
2021-04-25 18:25:29 +02:00
# Stargazers
[![Stargazers over time](https://starchart.cc/HACKERALERT/Picocrypt.svg)](https://starchart.cc/HACKERALERT/Picocrypt)
2021-02-19 02:36:55 +01:00
# Limitations
<ul>
2021-03-30 23:21:58 +02:00
<li>Max file size of a single file is 256GB, due to ChaCha20 cipher itself. This is because the counter for ChaCha20 will overflow out of the 32-bit range at 256GB. You can split files into chunks for files larger than 256GB.</li>
<li>Argon2 may take a while to derive a key, but realize that this is all for security. Security and speed were never friends and there is always a trade-off between security and speed.</li>
<li>The portable executables can be detected as viruses. I've done my best and submitted them as false positives to a couple antivirus companies to deal with this. If your antivirus is detecting Picocrypt as a virus, please help the community and submit it as a false positive to your antivirus provider.</li>
2021-02-19 02:36:55 +01:00
</ul>
# Contribution
If you find a bug or security issue, please create an Issue. If the security problem is severe or critical and could potentially be exploited by hackers if published, please contact me privately <a href="https://evansu.cc/#contacts">here</a>. If one of Picocrypt's dependencies gets a critical security patch, let me know and I'll update the code (if necessary). I'm also open to suggestions and features (you can leave an Issue or write about it in Discussions).
2021-03-19 22:37:05 +01:00
# Donations
2021-03-22 14:48:40 +01:00
If you find Picocrypt useful, please consider donating. I've spent countless hours on Picocrypt and I'd love to get Picocrypt along with its dependencies audited by a cybersecurity firm such as Cure53. Audits typically cost <i>thousands</i> of dollars, so I'm asking for your support. If every person who saw this message or uses Picocrypt donated a dollar or two, I'd have enough funds to get Picocrypt audited. For more information about donating, see <a href="Donate.md">here</a>.
2021-04-01 15:27:15 +02:00
# Thank You's
2021-04-02 02:14:50 +02:00
A <i>huge</i> thanks to the following list of people, who were the first people to donate and support Picocrypt:
2021-04-01 15:27:15 +02:00
<ul>
2021-04-02 02:14:50 +02:00
<li>W.Graham</li>
<li>N. Chin</li>
2021-04-06 15:00:14 +02:00
<li>Manjot</li>
2021-04-05 20:00:16 +02:00
<li>Phil P.</li>
2021-04-11 16:06:29 +02:00
<li>E. Zahard</li>
2021-04-01 15:27:15 +02:00
</ul>
2021-04-02 02:14:50 +02:00
Also, thanks to Freepik from Flaticon for Picocrypt's key icon.