https://github.com/antomfdez/securetarvault
SecureTarVault is a simple yet powerful command-line tool that enables encryption and decryption of multiple files.
https://github.com/antomfdez/securetarvault
Last synced: 5 months ago
JSON representation
SecureTarVault is a simple yet powerful command-line tool that enables encryption and decryption of multiple files.
- Host: GitHub
- URL: https://github.com/antomfdez/securetarvault
- Owner: antomfdez
- Created: 2024-10-15T17:50:59.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-15T20:00:35.000Z (over 1 year ago)
- Last Synced: 2025-04-02T15:01:58.261Z (about 1 year ago)
- Language: C
- Homepage:
- Size: 3.91 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# SecureTarVault
**SecureTarVault** is a simple yet powerful command-line tool that enables encryption and decryption of multiple files. It creates a `tar` archive from the specified file paths, then encrypts it using GPG. You can also decrypt `.gpg` files and restore the original files. It offers flexible options to specify the output file for encryption with the `-o` flag.
## Features
- **Encrypt Multiple Files**: Select multiple files to compress and encrypt into a single `.gpg` archive.
- **Decrypt Encrypted Files**: Decrypt a `.gpg` file and restore its original contents.
- **Flexible Output**: Specify the output filename for the encrypted `.gpg` file using the `-o` flag at any position in the command line.
- **Automatic Cleanup**: Automatically removes temporary files after encryption or decryption to ensure a tidy process.
## Usage
### Encrypt Files
To encrypt one or more files using a public key:
```bash
./securetarvault c -o [file_path2] ...
```
You can specify the -o at any position. For example:
```bash
./securetarvault c file1.txt -o encrypted_output.gpg file2.txt
./securetarvault c -o encrypted_output.gpg file1.txt file2.txt
```
This will create a tar archive containing the specified files and encrypt it using the provided public key. The encrypted output will be saved as the specified (e.g., encrypted_output.gpg).
Decrypt Files
To decrypt an encrypted .gpg file and extract the contents:
```bash
./securetarvault d
```
This will decrypt the provided .gpg file, extract the contents from the embedded .tar archive, and restore the original files.
Cleanup
- After Encryption: The intermediate files.tar file is automatically deleted after encryption is complete.
- After Decryption: The files.tar file is automatically removed after extraction of the original files.
## Build
To compile the project, use gcc:
```bash
gcc -o securetarvault securetarvault.c
```
## Example
Encrypt files using a public key:
```bash
./securetarvault c my_public_key_id -o encrypted_data.gpg file1.txt file2.txt
```
### Decrypt a file:
```bash
./securetarvault d encrypted_data.gpg
```
### Requirements
GPG: Ensure GPG is installed on your system.
tar: The tar utility is used to archive files before encryption.
# License
This project is licensed under the [MIT License](https://opensource.org/licenses/MIT).