Giter VIP home page Giter VIP logo

secretkeeper's Introduction

Secret Keeper

A simple and secure command-line tool to protect your text by encrypting and decrypting it using the robust AES-256 algorithm. Built with Rust and GPT4.

Installation

cargo install secretkeeper

Usage

sk encrypt <text> <password>
sk decrypt <text> <password>

Ensure you keep the password safe; without it, you will not be able to recover the original text from the encrypted data.

This Rust-based command-line tool provides a simple yet secure way to encrypt and decrypt text using the AES-256 algorithm in CBC mode with PKCS7 padding. By taking an action (encrypt or decrypt), the input text, and a password, it offers an effective method to protect sensitive information. The encryption process involves hashing the provided password to create a 32-byte key, generating a random initialization vector (IV), and then encrypting the input text. The output is presented as a hexadecimal string, which combines the IV and the encrypted text, ensuring security during data storage or transmission.

The decryption process requires the same password that was used for encryption, ensuring that only users with the correct password can access the original content. The tool first separates the IV and the encrypted text from the provided input data. Then, it creates a cipher using the hashed password and the IV to decrypt the text. If the decryption is successful, the tool outputs the decrypted text, allowing users to recover their original information. To ensure the tool's usability and efficiency, the encryption and decryption functionalities have been separated into two distinct functions, improving the overall structure and maintainability of the code.

Overall, this encryption tool offers a straightforward and secure solution for users looking to protect their sensitive data with a widely-used cryptographic algorithm. The use of AES-256 in CBC mode, along with PKCS7 padding and a random IV, provides strong security against potential attacks. The command-line interface makes the tool easy to use and integrate into various workflows, while the code enhances the maintainability for future updates or customizations.

secretkeeper's People

Contributors

kunalbagaria avatar

Stargazers

Crescent Moon avatar Matthew Mason avatar  avatar Pratham Bhatnagar avatar Atreay Kukanur avatar Josh avatar Vageesh avatar Karthik Pariti avatar Arghya Dutta avatar rishi25m avatar  avatar  avatar Utkarsh avatar Anoushk Kharangate avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.