ghostbytes 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Max Kam
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,182 @@
1
+ Metadata-Version: 2.3
2
+ Name: ghostbytes
3
+ Version: 1.0.0
4
+ Summary: A desktop file encryption and data security utility.
5
+ Keywords: encryption,cryptography,file encryption,privacy,security
6
+ Author: maxttkam
7
+ License: MIT License
8
+
9
+ Copyright (c) 2026 Max Kam
10
+
11
+ Permission is hereby granted, free of charge, to any person obtaining a copy
12
+ of this software and associated documentation files (the "Software"), to deal
13
+ in the Software without restriction, including without limitation the rights
14
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
+ copies of the Software, and to permit persons to whom the Software is
16
+ furnished to do so, subject to the following conditions:
17
+
18
+ The above copyright notice and this permission notice shall be included in all
19
+ copies or substantial portions of the Software.
20
+
21
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
+ SOFTWARE.
28
+ Classifier: Environment :: X11 Applications
29
+ Classifier: Environment :: Win32 (MS Windows)
30
+ Classifier: Intended Audience :: End Users/Desktop
31
+ Classifier: Operating System :: Microsoft :: Windows
32
+ Classifier: Programming Language :: Python :: 3
33
+ Classifier: Programming Language :: Python :: 3 :: Only
34
+ Classifier: Topic :: Security :: Cryptography
35
+ Classifier: Topic :: Utilities
36
+ Requires-Dist: argon2-cffi>=25.1.0
37
+ Requires-Dist: cryptography>=50.0.1
38
+ Requires-Dist: ctkfontawesome>=0.8.0
39
+ Requires-Dist: ctkmessagebox>=2.7
40
+ Requires-Dist: customtkinter>=6.0.0
41
+ Requires-Dist: pathlib>=1.0.1
42
+ Requires-Dist: pillow>=12.3.0
43
+ Requires-Dist: psutil>=7.2.2
44
+ Requires-Dist: pycryptodome>=3.23.0
45
+ Requires-Python: >=3.14
46
+ Project-URL: Homepage, https://github.com/maxttkam/ghostbytes
47
+ Project-URL: Repository, https://github.com/maxttkam/ghostbytes
48
+ Project-URL: Issues, https://github.com/maxttkam/ghostbytes/issues
49
+ Project-URL: Changelog, https://github.com/maxttkam/ghostbytes/blob/main/docs/change-log.md
50
+ Description-Content-Type: text/markdown
51
+
52
+ # GhostBytes
53
+
54
+ Ghostbytes is a desktop-based user-friendly file encryption and data security utility implmented in python.
55
+ It features symmetrical, asymmetrical (public / private key), and post-quantum cryptography designs through an intuitive graphical user interface (GUI).
56
+
57
+ ![Screenshot on img/home.png](img/home.png)
58
+
59
+ ## Aim
60
+
61
+ The goal of this project is to introduce everyday users and beginner developers to the fundamentals of **cryptography**, **data privacy**, **confidentiality in file sharing**.
62
+
63
+ In today's digital world, privacy isn't just for tech experts. it’s something everyone deserves. This repository aims to break down complex security concepts into simple, practical examples so anyone (even if you just learned your first lines of Python!) can understand how online privacy works and why it matters.
64
+
65
+ ## Features
66
+
67
+ Ghostbytes implemented a range of security features ranging from encryption, key management, hashing, to cryptographical randomness and secure deletion. Core features of the program is listed below:
68
+
69
+ - **πŸ”’ AES-256 GCM Mode Encryption with Authentication Tag (Integrity and Confidentiality)**: Encrypt files while providing integrity verification and authenticated encryption.
70
+ - **πŸ”’ RSA Asymmetric Encryption / ML-KEM Post-Quantum Cryptography**: The _Module-Lattice-Based Key-Encapsulation Mechanism_ is implemented as one of the asymmetric encryption options along with RSA.
71
+ - **πŸ”’ Envelope-Based Asymmetric Encryption**: Plaintext is encrypted using AES-256-GCM with a symmetric master key, which is then encapsulated and protected using asymmetric encryption to eliminate the message-size limitations of direct asymmetric encryption. (See [docs/cryptography.md](docs/cryptography.md) for more details)
72
+ - **πŸ”‘ Generate, Verify, and View RSA / ML-KEM Key Pair**: Both asymmetric encryption algorithms (_ML-KEM_ and _RSA_) have a key-generation function within the program. The key information can also be viewed and verified.
73
+ - **# Fully-Featured Hashing Toolkit**: Major hashing algorithms (`SHA256`, `SHA512`, `SHA3_256`, `SHA3_512`, `BLAKE2b`, `BLAKE2s`, and `md5`) are implemented with an extension feature to copy output to checksum file.
74
+ - **🎲 Random Number Generator (with multiple random sources)**: Ghostbytes also features a function to generate passwords and random data from multiple random sources.
75
+ - **πŸ—‘οΈ Secure Delete (File Shredding)**: Secure delete or file shredding is implemented with multiple overwrite patterns (including `random`, `zero`, `one`, and `gutmann`)
76
+
77
+ ## Supported / Used Algorithms
78
+
79
+ | Name | Description | Library | Implementation |
80
+ | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
81
+ | AES-256-GCM | Authenticated symmetric encryption providing confidentiality and integrity verification. | PyCryptodome (`Crypto.Cipher.AES`) | Implemented by `aes_encrypt()` and `aes_decrypt()` in [primitives.py](src/ghostbytes/crypto/primitives.py#L31). A 32-byte key is used for AES-256, with the nonce and authentication tag stored in the ciphertext envelope. |
82
+ | RSA-OAEP | Asymmetric encryption using an RSA public key for encryption and private key for decryption. | PyCryptodome (`Crypto.Cipher.PKCS1_OAEP`, `Crypto.PublicKey.RSA`) | Implemented by `rsa_oaep_encrypt()` and `rsa_oaep_decrypt()` in [primitives.py](src/ghostbytes/crypto/primitives.py#L133). |
83
+ | Hybrid RSA-OAEP | Encrypts file data with AES-256-GCM and protects the AES key using RSA-OAEP, avoiding RSA message-size limitations. | PyCryptodome | Implemented in [oaep_extension.py](src/ghostbytes/crypto/oaep_extension.py#L18). A random AES-256 key is generated for each message and wrapped with RSA-OAEP. |
84
+ | ML-KEM-768 | Post-quantum key-encapsulation mechanism offering NIST Security Category 3 protection. | `cryptography` (`cryptography.hazmat.primitives.asymmetric.mlkem`) | Key generation, encapsulation, decapsulation, and hybrid AES encryption are implemented in [kyber.py](src/ghostbytes/crypto/kyber.py#L31). |
85
+ | ML-KEM-1024 | Post-quantum key-encapsulation mechanism offering NIST Security Category 5 protection. | `cryptography` | Supported alongside ML-KEM-768 through the algorithm mapping in [kyber.py](src/ghostbytes/crypto/kyber.py#L212). |
86
+ | Argon2id | Memory-hard password-based key derivation function used to derive 256-bit encryption keys. | `argon2-cffi` (`argon2.low_level`) | Implemented by `derive_key()` in [primitives.py](src/ghostbytes/crypto/primitives.py#L205), using configurable salt, time cost, memory cost, and parallelism. |
87
+ | SHA-256 | Secure cryptographic hash function producing a 256-bit digest. | PyCryptodome (`Crypto.Hash.SHA256`) | Registered in [config.py](src/ghostbytes/crypto/config.py#L13) and used by the file hashing and benchmarking tools. |
88
+ | SHA-512 | Secure cryptographic hash function producing a 512-bit digest. | PyCryptodome (`Crypto.Hash.SHA512`) | Registered in [config.py](src/ghostbytes/crypto/config.py#L13) and used by the file hashing and benchmarking tools. |
89
+ | SHA3-256 | SHA-3 cryptographic hash function producing a 256-bit digest. | PyCryptodome (`Crypto.Hash.SHA3_256`) | Registered in [config.py](src/ghostbytes/crypto/config.py#L13). |
90
+ | SHA3-512 | SHA-3 cryptographic hash function producing a 512-bit digest. | PyCryptodome (`Crypto.Hash.SHA3_512`) | Registered in [config.py](src/ghostbytes/crypto/config.py#L13). |
91
+ | BLAKE2b | High-performance cryptographic hash function optimized for 64-bit platforms. | PyCryptodome (`Crypto.Hash.BLAKE2b`) | Registered in [config.py](src/ghostbytes/crypto/config.py#L13). |
92
+ | BLAKE2s | BLAKE2 hash function optimized for smaller platforms and 32-bit systems. | PyCryptodome (`Crypto.Hash.BLAKE2s`) | Registered in [config.py](src/ghostbytes/crypto/config.py#L13). |
93
+ | MD5 | Legacy 128-bit hash function provided for compatibility and checksums. It is not suitable for security-sensitive integrity purposes. | Python standard library (`hashlib`) | Imported and registered in [config.py](src/ghostbytes/crypto/config.py#L12). |
94
+ | `os.urandom` | Operating-system random byte generator. | Python standard library (`os`) | Implemented in [random.py](src/ghostbytes/tools/random.py#L43). |
95
+ | PyCryptodome random | Random byte generator provided by PyCryptodome. | PyCryptodome (`Crypto.Random`) | Implemented using `get_random_bytes()` in [random.py](src/ghostbytes/tools/random.py#L45). |
96
+ | Python `secrets` | Cryptographically secure random byte generator intended for security-sensitive data. | Python standard library (`secrets`) | Implemented using `token_bytes()` in [random.py](src/ghostbytes/tools/random.py#L47). |
97
+ | Python random | General-purpose pseudo-random byte generator. | Python standard library (`random`) | Implemented using `randbytes()` in [random.py](src/ghostbytes/tools/random.py#L49). This should not be used where cryptographic security is required. |
98
+ | `/dev/urandom` | Unix operating-system random byte device that does not block waiting for additional entropy. | Unix device accessed through Python `subprocess` | Read through the `head` command in [random.py](src/ghostbytes/tools/random.py#L51). |
99
+ | `/dev/random` | Unix operating-system random byte device that may block while collecting entropy. | Unix device accessed through Python `subprocess` | Read through the `head` command in [random.py](src/ghostbytes/tools/random.py#L57). |
100
+ | Random overwrite | Overwrites file contents with random data. | Ghostbytes implementation using configured random sources | Implemented by `overwrite_random()` in [shred.py](src/ghostbytes/tools/shred.py#L148). |
101
+ | Zero overwrite | Overwrites file contents with zero bytes. | Ghostbytes implementation | Implemented by `overwrite_pattern()` and selected through `shred_file()` in [shred.py](src/ghostbytes/tools/shred.py#L44). |
102
+ | One overwrite | Overwrites file contents with `0xFF` bytes. | Ghostbytes implementation | Implemented by `overwrite_pattern()` and selected through `shred_file()` in [shred.py](src/ghostbytes/tools/shred.py#L44). |
103
+ | Gutmann overwrite | Uses the traditional multi-pass Gutmann overwrite pattern. | Ghostbytes implementation | The 32-pass pattern is defined by `GUTMANN_PATTERN` and applied by `overwrite_gutmann()` in [shred.py](src/ghostbytes/tools/shred.py#L27). |
104
+
105
+ ## Requirements
106
+
107
+ This project uses `Uv` as the main python package and project manager. In `Uv`, you can install the project dependencies via the following command:
108
+
109
+ ```bash
110
+ uv sync
111
+ ```
112
+
113
+ To run code instantly, use this command instead (it automatically triggers a sync before running the code):
114
+
115
+ ```bash
116
+ uv run ghostbytes
117
+ ```
118
+
119
+ ## Quick Start / Installation
120
+
121
+ 1. **Install uv (either in a virtual environment or globally on your system)** (if you haven't already):
122
+
123
+ ```bash
124
+ pip install uv
125
+ ```
126
+
127
+ 2. **Clone the repository**:
128
+
129
+ ```bash
130
+ git clone https://github.com/maxttkam/ghostbytes.git
131
+ ```
132
+
133
+ 3. **Sync the project dependencies**:
134
+
135
+ ```bash
136
+ uv sync
137
+ ```
138
+
139
+ For development, use:
140
+
141
+ ```bash
142
+ uv sync --group dev
143
+ ```
144
+
145
+ 4. **Run code directly**:
146
+
147
+ ```bash
148
+ uv run ghostbytes
149
+ ```
150
+
151
+ 5. **(optional) Install and configure PATH environment variable**:
152
+
153
+ ```bash
154
+ uv tool install
155
+ uv tool update-shell
156
+ ```
157
+
158
+ ## Security Notes
159
+
160
+ GhostBytes uses established cryptographic primitives, but correct security depends on configuration, key handling, and operational practices.
161
+
162
+ Important Considerations:
163
+
164
+ - **The encryptor and decryptor must use the same configuration, including the salt, for decryption to succeed.**
165
+ - Use a preferably **unique salt** (in advanced settings) for each encryption (if applicable) and keep it with the encrypted data or configuration. Unique salts make precomputed rainbow table attacks more difficult.
166
+ - Configuration can be exported to and imported from a `.conf` file. Use **Generate Config (Random Salt)** to automatically create a salt from random bytes, then export the configuration so the same settings can be used by the encryptor and decryptor.
167
+ - Protect passwords, private keys, and configuration files from unauthorized access.
168
+ - Keep backups of important private keys and recovery information.
169
+ - Sensitive data, passwords, or keys may be exposed by malware, debugging tools, or memory extraction.
170
+ - Use trusted devices and secure environments when handling sensitive information.
171
+
172
+ ### Limitations
173
+
174
+ - RSA key generation above 4096 bits may take significant time due to expensive prime generation operations.
175
+ - Python runtime overhead can make CPU-intensive cryptographic operations slower than equivalent lower-level implementations.
176
+ - Performance varies depending on hardware and cryptographic backend.
177
+
178
+ For operations that require speed (if you are a professional and you know what you are doing), consider the following alternatives instead:
179
+
180
+ [VeraCrypt](https://github.com/veracrypt/VeraCrypt)
181
+
182
+ [OpenSSL](https://github.com/openssl/openssl)
@@ -0,0 +1,131 @@
1
+ # GhostBytes
2
+
3
+ Ghostbytes is a desktop-based user-friendly file encryption and data security utility implmented in python.
4
+ It features symmetrical, asymmetrical (public / private key), and post-quantum cryptography designs through an intuitive graphical user interface (GUI).
5
+
6
+ ![Screenshot on img/home.png](img/home.png)
7
+
8
+ ## Aim
9
+
10
+ The goal of this project is to introduce everyday users and beginner developers to the fundamentals of **cryptography**, **data privacy**, **confidentiality in file sharing**.
11
+
12
+ In today's digital world, privacy isn't just for tech experts. it’s something everyone deserves. This repository aims to break down complex security concepts into simple, practical examples so anyone (even if you just learned your first lines of Python!) can understand how online privacy works and why it matters.
13
+
14
+ ## Features
15
+
16
+ Ghostbytes implemented a range of security features ranging from encryption, key management, hashing, to cryptographical randomness and secure deletion. Core features of the program is listed below:
17
+
18
+ - **πŸ”’ AES-256 GCM Mode Encryption with Authentication Tag (Integrity and Confidentiality)**: Encrypt files while providing integrity verification and authenticated encryption.
19
+ - **πŸ”’ RSA Asymmetric Encryption / ML-KEM Post-Quantum Cryptography**: The _Module-Lattice-Based Key-Encapsulation Mechanism_ is implemented as one of the asymmetric encryption options along with RSA.
20
+ - **πŸ”’ Envelope-Based Asymmetric Encryption**: Plaintext is encrypted using AES-256-GCM with a symmetric master key, which is then encapsulated and protected using asymmetric encryption to eliminate the message-size limitations of direct asymmetric encryption. (See [docs/cryptography.md](docs/cryptography.md) for more details)
21
+ - **πŸ”‘ Generate, Verify, and View RSA / ML-KEM Key Pair**: Both asymmetric encryption algorithms (_ML-KEM_ and _RSA_) have a key-generation function within the program. The key information can also be viewed and verified.
22
+ - **# Fully-Featured Hashing Toolkit**: Major hashing algorithms (`SHA256`, `SHA512`, `SHA3_256`, `SHA3_512`, `BLAKE2b`, `BLAKE2s`, and `md5`) are implemented with an extension feature to copy output to checksum file.
23
+ - **🎲 Random Number Generator (with multiple random sources)**: Ghostbytes also features a function to generate passwords and random data from multiple random sources.
24
+ - **πŸ—‘οΈ Secure Delete (File Shredding)**: Secure delete or file shredding is implemented with multiple overwrite patterns (including `random`, `zero`, `one`, and `gutmann`)
25
+
26
+ ## Supported / Used Algorithms
27
+
28
+ | Name | Description | Library | Implementation |
29
+ | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
30
+ | AES-256-GCM | Authenticated symmetric encryption providing confidentiality and integrity verification. | PyCryptodome (`Crypto.Cipher.AES`) | Implemented by `aes_encrypt()` and `aes_decrypt()` in [primitives.py](src/ghostbytes/crypto/primitives.py#L31). A 32-byte key is used for AES-256, with the nonce and authentication tag stored in the ciphertext envelope. |
31
+ | RSA-OAEP | Asymmetric encryption using an RSA public key for encryption and private key for decryption. | PyCryptodome (`Crypto.Cipher.PKCS1_OAEP`, `Crypto.PublicKey.RSA`) | Implemented by `rsa_oaep_encrypt()` and `rsa_oaep_decrypt()` in [primitives.py](src/ghostbytes/crypto/primitives.py#L133). |
32
+ | Hybrid RSA-OAEP | Encrypts file data with AES-256-GCM and protects the AES key using RSA-OAEP, avoiding RSA message-size limitations. | PyCryptodome | Implemented in [oaep_extension.py](src/ghostbytes/crypto/oaep_extension.py#L18). A random AES-256 key is generated for each message and wrapped with RSA-OAEP. |
33
+ | ML-KEM-768 | Post-quantum key-encapsulation mechanism offering NIST Security Category 3 protection. | `cryptography` (`cryptography.hazmat.primitives.asymmetric.mlkem`) | Key generation, encapsulation, decapsulation, and hybrid AES encryption are implemented in [kyber.py](src/ghostbytes/crypto/kyber.py#L31). |
34
+ | ML-KEM-1024 | Post-quantum key-encapsulation mechanism offering NIST Security Category 5 protection. | `cryptography` | Supported alongside ML-KEM-768 through the algorithm mapping in [kyber.py](src/ghostbytes/crypto/kyber.py#L212). |
35
+ | Argon2id | Memory-hard password-based key derivation function used to derive 256-bit encryption keys. | `argon2-cffi` (`argon2.low_level`) | Implemented by `derive_key()` in [primitives.py](src/ghostbytes/crypto/primitives.py#L205), using configurable salt, time cost, memory cost, and parallelism. |
36
+ | SHA-256 | Secure cryptographic hash function producing a 256-bit digest. | PyCryptodome (`Crypto.Hash.SHA256`) | Registered in [config.py](src/ghostbytes/crypto/config.py#L13) and used by the file hashing and benchmarking tools. |
37
+ | SHA-512 | Secure cryptographic hash function producing a 512-bit digest. | PyCryptodome (`Crypto.Hash.SHA512`) | Registered in [config.py](src/ghostbytes/crypto/config.py#L13) and used by the file hashing and benchmarking tools. |
38
+ | SHA3-256 | SHA-3 cryptographic hash function producing a 256-bit digest. | PyCryptodome (`Crypto.Hash.SHA3_256`) | Registered in [config.py](src/ghostbytes/crypto/config.py#L13). |
39
+ | SHA3-512 | SHA-3 cryptographic hash function producing a 512-bit digest. | PyCryptodome (`Crypto.Hash.SHA3_512`) | Registered in [config.py](src/ghostbytes/crypto/config.py#L13). |
40
+ | BLAKE2b | High-performance cryptographic hash function optimized for 64-bit platforms. | PyCryptodome (`Crypto.Hash.BLAKE2b`) | Registered in [config.py](src/ghostbytes/crypto/config.py#L13). |
41
+ | BLAKE2s | BLAKE2 hash function optimized for smaller platforms and 32-bit systems. | PyCryptodome (`Crypto.Hash.BLAKE2s`) | Registered in [config.py](src/ghostbytes/crypto/config.py#L13). |
42
+ | MD5 | Legacy 128-bit hash function provided for compatibility and checksums. It is not suitable for security-sensitive integrity purposes. | Python standard library (`hashlib`) | Imported and registered in [config.py](src/ghostbytes/crypto/config.py#L12). |
43
+ | `os.urandom` | Operating-system random byte generator. | Python standard library (`os`) | Implemented in [random.py](src/ghostbytes/tools/random.py#L43). |
44
+ | PyCryptodome random | Random byte generator provided by PyCryptodome. | PyCryptodome (`Crypto.Random`) | Implemented using `get_random_bytes()` in [random.py](src/ghostbytes/tools/random.py#L45). |
45
+ | Python `secrets` | Cryptographically secure random byte generator intended for security-sensitive data. | Python standard library (`secrets`) | Implemented using `token_bytes()` in [random.py](src/ghostbytes/tools/random.py#L47). |
46
+ | Python random | General-purpose pseudo-random byte generator. | Python standard library (`random`) | Implemented using `randbytes()` in [random.py](src/ghostbytes/tools/random.py#L49). This should not be used where cryptographic security is required. |
47
+ | `/dev/urandom` | Unix operating-system random byte device that does not block waiting for additional entropy. | Unix device accessed through Python `subprocess` | Read through the `head` command in [random.py](src/ghostbytes/tools/random.py#L51). |
48
+ | `/dev/random` | Unix operating-system random byte device that may block while collecting entropy. | Unix device accessed through Python `subprocess` | Read through the `head` command in [random.py](src/ghostbytes/tools/random.py#L57). |
49
+ | Random overwrite | Overwrites file contents with random data. | Ghostbytes implementation using configured random sources | Implemented by `overwrite_random()` in [shred.py](src/ghostbytes/tools/shred.py#L148). |
50
+ | Zero overwrite | Overwrites file contents with zero bytes. | Ghostbytes implementation | Implemented by `overwrite_pattern()` and selected through `shred_file()` in [shred.py](src/ghostbytes/tools/shred.py#L44). |
51
+ | One overwrite | Overwrites file contents with `0xFF` bytes. | Ghostbytes implementation | Implemented by `overwrite_pattern()` and selected through `shred_file()` in [shred.py](src/ghostbytes/tools/shred.py#L44). |
52
+ | Gutmann overwrite | Uses the traditional multi-pass Gutmann overwrite pattern. | Ghostbytes implementation | The 32-pass pattern is defined by `GUTMANN_PATTERN` and applied by `overwrite_gutmann()` in [shred.py](src/ghostbytes/tools/shred.py#L27). |
53
+
54
+ ## Requirements
55
+
56
+ This project uses `Uv` as the main python package and project manager. In `Uv`, you can install the project dependencies via the following command:
57
+
58
+ ```bash
59
+ uv sync
60
+ ```
61
+
62
+ To run code instantly, use this command instead (it automatically triggers a sync before running the code):
63
+
64
+ ```bash
65
+ uv run ghostbytes
66
+ ```
67
+
68
+ ## Quick Start / Installation
69
+
70
+ 1. **Install uv (either in a virtual environment or globally on your system)** (if you haven't already):
71
+
72
+ ```bash
73
+ pip install uv
74
+ ```
75
+
76
+ 2. **Clone the repository**:
77
+
78
+ ```bash
79
+ git clone https://github.com/maxttkam/ghostbytes.git
80
+ ```
81
+
82
+ 3. **Sync the project dependencies**:
83
+
84
+ ```bash
85
+ uv sync
86
+ ```
87
+
88
+ For development, use:
89
+
90
+ ```bash
91
+ uv sync --group dev
92
+ ```
93
+
94
+ 4. **Run code directly**:
95
+
96
+ ```bash
97
+ uv run ghostbytes
98
+ ```
99
+
100
+ 5. **(optional) Install and configure PATH environment variable**:
101
+
102
+ ```bash
103
+ uv tool install
104
+ uv tool update-shell
105
+ ```
106
+
107
+ ## Security Notes
108
+
109
+ GhostBytes uses established cryptographic primitives, but correct security depends on configuration, key handling, and operational practices.
110
+
111
+ Important Considerations:
112
+
113
+ - **The encryptor and decryptor must use the same configuration, including the salt, for decryption to succeed.**
114
+ - Use a preferably **unique salt** (in advanced settings) for each encryption (if applicable) and keep it with the encrypted data or configuration. Unique salts make precomputed rainbow table attacks more difficult.
115
+ - Configuration can be exported to and imported from a `.conf` file. Use **Generate Config (Random Salt)** to automatically create a salt from random bytes, then export the configuration so the same settings can be used by the encryptor and decryptor.
116
+ - Protect passwords, private keys, and configuration files from unauthorized access.
117
+ - Keep backups of important private keys and recovery information.
118
+ - Sensitive data, passwords, or keys may be exposed by malware, debugging tools, or memory extraction.
119
+ - Use trusted devices and secure environments when handling sensitive information.
120
+
121
+ ### Limitations
122
+
123
+ - RSA key generation above 4096 bits may take significant time due to expensive prime generation operations.
124
+ - Python runtime overhead can make CPU-intensive cryptographic operations slower than equivalent lower-level implementations.
125
+ - Performance varies depending on hardware and cryptographic backend.
126
+
127
+ For operations that require speed (if you are a professional and you know what you are doing), consider the following alternatives instead:
128
+
129
+ [VeraCrypt](https://github.com/veracrypt/VeraCrypt)
130
+
131
+ [OpenSSL](https://github.com/openssl/openssl)
@@ -0,0 +1,79 @@
1
+ [project]
2
+ name = "ghostbytes"
3
+ version = "1.0.0"
4
+ description = "A desktop file encryption and data security utility."
5
+ readme = "README.md"
6
+ requires-python = ">=3.14"
7
+ keywords = [
8
+ "encryption",
9
+ "cryptography",
10
+ "file encryption",
11
+ "privacy",
12
+ "security",
13
+ ]
14
+ classifiers = [
15
+ "Environment :: X11 Applications",
16
+ "Environment :: Win32 (MS Windows)",
17
+ "Intended Audience :: End Users/Desktop",
18
+ "Operating System :: Microsoft :: Windows",
19
+ "Programming Language :: Python :: 3",
20
+ "Programming Language :: Python :: 3 :: Only",
21
+ "Topic :: Security :: Cryptography",
22
+ "Topic :: Utilities",
23
+ ]
24
+ dependencies = [
25
+ "argon2-cffi>=25.1.0",
26
+ "cryptography>=50.0.1",
27
+ "ctkfontawesome>=0.8.0",
28
+ "ctkmessagebox>=2.7",
29
+ "customtkinter>=6.0.0",
30
+ "pathlib>=1.0.1",
31
+ "pillow>=12.3.0",
32
+ "psutil>=7.2.2",
33
+ "pycryptodome>=3.23.0",
34
+ ]
35
+
36
+ [project.license]
37
+ file = "LICENSE"
38
+
39
+ [[project.authors]]
40
+ name = "maxttkam"
41
+
42
+ [project.urls]
43
+ Homepage = "https://github.com/maxttkam/ghostbytes"
44
+ Repository = "https://github.com/maxttkam/ghostbytes"
45
+ Issues = "https://github.com/maxttkam/ghostbytes/issues"
46
+ Changelog = "https://github.com/maxttkam/ghostbytes/blob/main/docs/change-log.md"
47
+
48
+ [project.scripts]
49
+ ghostbytes = "ghostbytes.__main__:main"
50
+
51
+ [build-system]
52
+ requires = ["uv_build>=0.12.17,<0.13.0"]
53
+ build-backend = "uv_build"
54
+
55
+ [dependency-groups]
56
+ dev = [
57
+ "build>=1.6.1",
58
+ "colorama>=0.4.6",
59
+ "deptry>=0.25.1",
60
+ "pylint>=4.0.8",
61
+ ]
62
+
63
+ [tool.pylint.main]
64
+ ignore-paths = [
65
+ "^src/ghostbytes/.*",
66
+ '.*/__main__\.py$',
67
+ ]
68
+ disable = [
69
+ "R0902",
70
+ "R0914",
71
+ "R0912",
72
+ "R0913",
73
+ "R0917",
74
+ "E0611",
75
+ "E0401",
76
+ "R0801",
77
+ "C0415",
78
+ "W0718",
79
+ ]
@@ -0,0 +1,73 @@
1
+ [project]
2
+ name = "ghostbytes"
3
+ version = "1.0.0"
4
+ description = "A desktop file encryption and data security utility."
5
+ readme = "README.md"
6
+ requires-python = ">=3.14"
7
+ license = { file = "LICENSE" }
8
+ authors = [
9
+ { name = "maxttkam" }
10
+ ]
11
+ keywords = [
12
+ "encryption",
13
+ "cryptography",
14
+ "file encryption",
15
+ "privacy",
16
+ "security"
17
+ ]
18
+ classifiers = [
19
+ "Environment :: X11 Applications",
20
+ "Environment :: Win32 (MS Windows)",
21
+ "Intended Audience :: End Users/Desktop",
22
+ "Operating System :: Microsoft :: Windows",
23
+ "Programming Language :: Python :: 3",
24
+ "Programming Language :: Python :: 3 :: Only",
25
+ "Topic :: Security :: Cryptography",
26
+ "Topic :: Utilities"
27
+ ]
28
+
29
+ dependencies = [
30
+ "argon2-cffi>=25.1.0",
31
+ "cryptography>=50.0.1",
32
+ "ctkfontawesome>=0.8.0",
33
+ "ctkmessagebox>=2.7",
34
+ "customtkinter>=6.0.0",
35
+ "pathlib>=1.0.1",
36
+ "pillow>=12.3.0",
37
+ "psutil>=7.2.2",
38
+ "pycryptodome>=3.23.0",
39
+ ]
40
+
41
+ [project.urls]
42
+ Homepage = "https://github.com/maxttkam/ghostbytes"
43
+ Repository = "https://github.com/maxttkam/ghostbytes"
44
+ Issues = "https://github.com/maxttkam/ghostbytes/issues"
45
+ Changelog = "https://github.com/maxttkam/ghostbytes/blob/main/docs/change-log.md"
46
+
47
+ [project.scripts]
48
+ ghostbytes = "ghostbytes.__main__:main"
49
+
50
+ [build-system]
51
+ requires = ["uv_build>=0.12.17,<0.13.0"]
52
+ build-backend = "uv_build"
53
+
54
+ [dependency-groups]
55
+ dev = [
56
+ "build>=1.6.1",
57
+ "colorama>=0.4.6",
58
+ "deptry>=0.25.1",
59
+ "pylint>=4.0.8",
60
+ ]
61
+
62
+ [tool.pylint.main]
63
+ ignore-paths = [
64
+ "^src/ghostbytes/.*",
65
+ ".*/__main__\\.py$",
66
+ ]
67
+ disable = [
68
+ "R0902", "R0914", "R0912", "R0913", "R0917", # Complexity Warnings
69
+ "E0611", "E0401", # pycryptodome packages will raise error
70
+ "R0801", # Similar Lines
71
+ "C0415", # Third party import issue from crypto/config.pycryptodome
72
+ "W0718", # Too general exception catching
73
+ ]
@@ -0,0 +1,3 @@
1
+ __version__ = "1.0.0"
2
+ __license__ = "MIT"
3
+ __link__ = "http://github.com/maxttkam/ghostbytes"
@@ -0,0 +1,9 @@
1
+ from .gui import gui
2
+
3
+ def main() -> None:
4
+ app = gui.App()
5
+ app.mainloop()
6
+
7
+
8
+ if __name__ == "__main__":
9
+ main()