Giter VIP home page Giter VIP logo

gosecure's Introduction

GoSecure Logo

GitHub GitHub commit activity (branch) GitHub last commit (branch) GitHub go.mod Go version (branch & subdirectory of monorepo) GitHub release (with filter)

Description

A simple utility to encrypt and decrypt files utilizing a user provided password. GoSecure is written in Golang utilizing the standard crypto libraries. Files are encrypted utlizing AES-256-GCM symetric encryption algorithm and Argon2id key derivation function.

Instructions

Installation

  1. Navigate to the latest release
  2. Download the binary appropriate for your operating system and architecture (Windows-AMD64 or Linux-AMD64)
  3. Additionally, you can download the latest source and build an appropriate binary for your architecture Note: We are only able to support official builds

Usage

File Encryption

$ ./gosecure -e -in "/path/to/file" -k "<Your-Password>"

File Decryption

$ ./gosecure -d -in "/path/to/file" -k "<Your-Password>"

Command Line Options

-e      Encrypt the input data.
-d      Decrypt the input data.
-in     The input filename, standard input by default.
-k      The password to derive the key from.
-v      Enables verbosity to default logger.
-debug  Enables debug output to default logger.

Process Diagrams

Encryption

┌────────┐  ┌──────────┐  ┌─────────────────────────────────┐
│  SALT  │  │ Password │  │            Plaintext            │
└────┬───┘  └───────┬──┘  └────────────────┬────────────────┘
     │              │                      │
     │              │                      │
     ├──────────┐   │                      │
     │          │   │                      │
     │          ▼   ▼                      ▼
     │    ┌────────────────┐      ┌──────────────────┐
     │    │                │      │                  │
     │    │  Argon2id KDF  ├─────►│  GCM Encryption  │
     │    │                │      │                  │
     │    └────────────────┘      └────────┬─────────┘
     │                                     │
     │                                     │
     ▼                                     ▼
 ┌────────┬─────────────────────────────────────────────────┐
 │  SALT  │                     Ciphertext                  │
 ├────────┼─────────────────────────────────────────────────┤
 0        32                                               EOF

Decryption

               0        32                                               EOF
 ┌──────────┐  ├────────┼─────────────────────────────────────────────────┤
 │ Password │  │  SALT  │                     Ciphertext                  │
 └─────┬────┘  └───┬────┴──────────────────────────┬──────────────────────┘
       │           │                               │
       │           │                               │
       │           │                               │
       │           │                               │
       │           │                               │
       ▼           ▼                               ▼
     ┌────────────────┐                  ┌──────────────────┐
     │                │                  │                  │
     │  Argon2id KDF  ├─────────────────►│  GCM Encryption  │
     │                │                  │                  │
     └────────────────┘                  └─────────┬────────┘
                                                   │
                                                   │
                                                   ▼
                         ┌─────────────────────────────────────────────────┐
                         │                     Plaintext                   │
                         └─────────────────────────────────────────────────┘

Credit

Initial development and work is based off of the hard work of the following folks:

gosecure's People

Contributors

acavella avatar

Stargazers

 avatar  avatar

Watchers

 avatar

gosecure's Issues

[CR] Update branding

Change project name to reflect new branding: GoSecure

To be updated:

  • References in documentation
  • Binary name
  • Build artifacts

[Feature] Improve password input

Feature description

Allow for password to be passed via flag or prompted for input.

Suggested implementation

No response

Relevant code

No response

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.