mirror of
https://github.com/kevinveenbirkenbach/splitted-secret.git
synced 2025-09-10 20:37:16 +02:00
Compare commits
9 Commits
a0c17c9fd6
...
main
Author | SHA1 | Date | |
---|---|---|---|
6f5c04ba11 | |||
a5ada012b6 | |||
69d0592b05 | |||
5e4fe2c01a | |||
b939870c1d | |||
44b2db0cbc | |||
960e14d59e | |||
62f51b449d | |||
09bb6d1e31 |
7
.github/FUNDING.yml
vendored
Normal file
7
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
github: kevinveenbirkenbach
|
||||||
|
|
||||||
|
patreon: kevinveenbirkenbach
|
||||||
|
|
||||||
|
buy_me_a_coffee: kevinveenbirkenbach
|
||||||
|
|
||||||
|
custom: https://s.veen.world/paypaldonate
|
129
README.md
129
README.md
@@ -1,82 +1,95 @@
|
|||||||
# Split Secret
|
# Split Secret (sisec) 🔐
|
||||||
The purpose of this software is to splitt a secret over multiple people. Just if a defined amount of this people meet together they can encrypt the secret and have access to it.
|
[](https://github.com/sponsors/kevinveenbirkenbach) [](https://www.patreon.com/c/kevinveenbirkenbach) [](https://buymeacoffee.com/kevinveenbirkenbach) [](https://s.veen.world/paypaldonate)
|
||||||
|
|
||||||
## requirements
|
|
||||||
|
|
||||||
### system
|
[](LICENSE) [](https://github.com/kevinveenbirkenbach/split-secret/stargazers)
|
||||||
This software is developed for and on an [Arch Linux](https://archlinux.org/) system.
|
|
||||||
|
|
||||||
### setup
|
Split Secret is a versatile command-line tool for securely splitting a master secret among multiple users. Only when a defined quorum of users combines their secret shares can the original secret be decrypted. The tool also supports robust encryption, decryption, and cleanup operations to ensure sensitive data is managed securely throughout the process.
|
||||||
|
|
||||||
Before executing the script it may be necessary to install the following software packages:
|
---
|
||||||
|
|
||||||
|
## 🛠 Features
|
||||||
|
|
||||||
|
- **Secret Splitting:** Divide a master secret into shares distributed among users.
|
||||||
|
- **Encryption & Decryption:** Securely encrypt and decrypt data files using strong cryptographic methods.
|
||||||
|
- **User Management:** Add and manage user information along with their secret shares.
|
||||||
|
- **Cleanup Operations:** Remove decrypted files after processing to maintain security.
|
||||||
|
- **Interactive Modes:** Operate in active, preview, or interactive modes to match your workflow.
|
||||||
|
- **Parallel Processing:** Efficiently handles file operations using process pooling.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 📥 Installation
|
||||||
|
|
||||||
|
Install Split Secret via [Kevin's Package Manager](https://github.com/kevinveenbirkenbach/package-manager) under the alias `sisec`:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pacman -S gpg tar python pip python-pip
|
package-manager install sisec
|
||||||
pip install numpy
|
|
||||||
```
|
|
||||||
## commands
|
|
||||||
|
|
||||||
## cleanup data
|
|
||||||
|
|
||||||
### delete all data
|
|
||||||
|
|
||||||
To delete all data execute:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
python scripts/main.py --mode cleanup
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### delete decrypted data
|
This command installs Split Secret globally, making it available as `sisec` in your terminal. 🚀
|
||||||
To delete all encrypted data execute:
|
|
||||||
|
|
||||||
```bash
|
---
|
||||||
python scripts/main.py --mode cleanup --file-types decrypted
|
|
||||||
|
## 🚀 Usage
|
||||||
|
|
||||||
|
Split Secret offers several modes for managing your secrets. Here are a few example commands:
|
||||||
|
|
||||||
|
### Cleanup Data
|
||||||
|
To delete all unnecessary decrypted and encrypted files:
|
||||||
|
```bash
|
||||||
|
sisec --mode cleanup
|
||||||
```
|
```
|
||||||
|
|
||||||
### delete all encrypted data
|
### Encrypt Data & Generate Meta Data
|
||||||
To delete all encrypted data execute:
|
Encrypt the master secret file and generate encrypted metadata with additional user information:
|
||||||
|
```bash
|
||||||
```bash
|
sisec --secret-holders-amount 3 --quota 50 --mode encrypt --add-user-information --master-password "your_master_password" --meta --add-user-information << EOL
|
||||||
python scripts/main.py --mode cleanup --file-types encrypted
|
Alan Turing
|
||||||
|
+12358
|
||||||
|
turing@turing-bomb.world
|
||||||
|
Bletchley Park
|
||||||
|
¯\_(ツ)_/¯
|
||||||
|
Ada Lovelace
|
||||||
|
+132134
|
||||||
|
best@algorythm.ai
|
||||||
|
Somewhere in London
|
||||||
|
:)
|
||||||
|
John von Neumann
|
||||||
|
+5488142
|
||||||
|
test@test3.de
|
||||||
|
Washington D.C.
|
||||||
|
<3 <3 <3
|
||||||
|
EOL
|
||||||
```
|
```
|
||||||
|
|
||||||
## decrypt
|
### Decrypt Meta Data File
|
||||||
|
To decrypt the accumulated metadata file:
|
||||||
### decrypt automatic
|
```bash
|
||||||
To decrypt the data execute:
|
sisec --mode decrypt --meta
|
||||||
|
|
||||||
```bash
|
|
||||||
python scripts/main.py --mode decrypt-data
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### decrypt accumulated file
|
For additional commands and options (such as user-specific decryption, file type filtering, or recursive processing), use:
|
||||||
To decrypt the accumulated datafile execute:
|
```bash
|
||||||
|
sisec --help
|
||||||
```bash
|
|
||||||
python scripts/main.py --mode decrypt --meta
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
### decrypt defined user
|
## 🧑💻 Author
|
||||||
To decrypt the data for a defined user execute:
|
|
||||||
|
|
||||||
```bash
|
Developed by **Kevin Veen-Birkenbach**
|
||||||
python scripts/main.py --mode decrypt --user "<<user_id>>"
|
- 📧 [kevin@veen.world](mailto:kevin@veen.world)
|
||||||
```
|
- 🌐 [https://www.veen.world](https://www.veen.world)
|
||||||
|
|
||||||
### addtional instructions
|
---
|
||||||
In the [INSTRUCTIONS.md](./Instruction.md) file the master encrypter can leave additional instructions.
|
|
||||||
|
|
||||||
## encrypt
|
## 📜 License
|
||||||
|
|
||||||
### encrypt main data
|
This project is licensed under the **MIT License**.
|
||||||
```bash
|
|
||||||
python scripts/main.py --secret-holders-amount "<<amount>>" --quota "<<quota>>" --mode encrypt --master-password "<<master_password>>" --input-directory "<<input_directory>>"
|
|
||||||
```
|
|
||||||
|
|
||||||
### encrypt master password
|
---
|
||||||
To encrypt the master-password file and to create the neccessary encrypted meta data execute:
|
|
||||||
|
|
||||||
```bash
|
## 🤝 Contributions
|
||||||
python scripts/main.py --secret-holders-amount "<<amount>>" --quota "<<quota>>" --mode encrypt --add-user-information --master-password "<<master_password>>" --meta
|
|
||||||
```
|
Contributions are welcome! Please feel free to fork the repository, submit pull requests, or open issues if you have suggestions or encounter any problems. Let's work together to make secure secret management accessible and efficient! 😊
|
||||||
|
2
requirements.txt
Normal file
2
requirements.txt
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
pacman -S gpg tar python pip python-pip
|
||||||
|
pip install numpy
|
@@ -4,13 +4,16 @@ class Cleanup():
|
|||||||
def __init__(self,cli,paths):
|
def __init__(self,cli,paths):
|
||||||
self.cli = cli
|
self.cli = cli
|
||||||
self.paths = paths
|
self.paths = paths
|
||||||
|
|
||||||
def getAllFilePaths(self,file_type):
|
def getMetaFilePaths(self,file_type):
|
||||||
all_file_paths = [
|
return [
|
||||||
self.paths.getGroupFilesFolderPath(file_type),
|
self.paths.getGroupFilesFolderPath(file_type),
|
||||||
self.paths.getUserFilesPath(file_type),
|
self.paths.getUserFilesPath(file_type),
|
||||||
self.paths.getAccumulatedFilePath(file_type)
|
self.paths.getAccumulatedFilePath(file_type)
|
||||||
]
|
]
|
||||||
|
|
||||||
|
def getAllFilePaths(self,file_type):
|
||||||
|
all_file_paths = self.getMetaFilePaths(file_type)
|
||||||
if file_type == Paths.TYPE_DECRYPTED:
|
if file_type == Paths.TYPE_DECRYPTED:
|
||||||
all_file_paths.append(self.paths.getDecryptedMainDataStandartFolder())
|
all_file_paths.append(self.paths.getDecryptedMainDataStandartFolder())
|
||||||
return all_file_paths
|
return all_file_paths
|
||||||
@@ -32,6 +35,10 @@ class Cleanup():
|
|||||||
pass
|
pass
|
||||||
self.cleanupFiles(Paths.TYPE_DECRYPTED)
|
self.cleanupFiles(Paths.TYPE_DECRYPTED)
|
||||||
|
|
||||||
|
def cleanupMetaData(self,file_type):
|
||||||
|
for folder_path in self.getMetaFilePaths(file_type):
|
||||||
|
self.deleteAllFilesInFolder(folder_path)
|
||||||
|
|
||||||
def deleteAll(self):
|
def deleteAll(self):
|
||||||
self.cleanupFiles(Paths.TYPE_ENCRYPTED)
|
self.cleanupFiles(Paths.TYPE_ENCRYPTED)
|
||||||
self.cleanupFiles(Paths.TYPE_DECRYPTED)
|
self.cleanupFiles(Paths.TYPE_DECRYPTED)
|
@@ -166,6 +166,8 @@ try:
|
|||||||
encrypt.addInformationToUser(user_id, label, str(input()))
|
encrypt.addInformationToUser(user_id, label, str(input()))
|
||||||
encrypt.compileData()
|
encrypt.compileData()
|
||||||
if args.meta_data is True:
|
if args.meta_data is True:
|
||||||
|
print('Cleaning up encrypted meta data.')
|
||||||
|
cleanup.cleanupMetaData(Paths.TYPE_ENCRYPTED)
|
||||||
print("Create and encrypt meta data.")
|
print("Create and encrypt meta data.")
|
||||||
encrypt.encryptMetaData()
|
encrypt.encryptMetaData()
|
||||||
if args.input_directory is not None:
|
if args.input_directory is not None:
|
||||||
|
Reference in New Issue
Block a user