GithubHelp home page GithubHelp logo

trisna22 / lockfile Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 1.41 MB

LockFile is a command-line tool that locks your personal files with AES and RSA encryption algorithms.

License: MIT License

Makefile 2.69% C++ 97.31%

lockfile's Introduction

LockFile

Encrypts/decrypts files on local computer with custom combination of encryption methods. Every file in a folder gets an own key so bruteforcing all files is harder. Make sure to not forget your password or else your data will be gone for good. Your unencrypted files can be shredded if needed.

Installing project

$ git clone https://github.com/Trisna22/LockFile
$ cd LockFile
$ make
$ sudo cp ./build/LockFile /usr/bin
$ LockFile --help

Usage

# For encrypting files/folders
$ LockFile --encrypt folderToEncrypt
# For decrypting files/folders
$ LockFile --decrypt folderToDecrypt
# To get information of any CryptFile
$ LockFile --info cryptFile

Screenshot

plot

CryptFile architecture

<File>
<CryptHeader/>
    <RSA-Encrypted>
        <CryptFile-object>
        <CryptFile-object>
        <CryptFile-object>
        ...
    </RSA-Encrypted>
    <AES-Encrypted>
        <FileData>
        ...
    </AES-Encrypted>
</File>

CryptFile object

The CryptFile object contain information of the encrypted files. Every file has his own key and IV for the AES encryption.
The objects won't be visible without your provided password, the objects itself are encrypted with RSA.

struct CryptFile {
        int fileNameLen;                // The size of the filename.
        bool isFolder;                  // Is folder?
        unsigned short permissions;     // File permissions
        unsigned long sizeFileData;     // File data size.
        unsigned char fileKey[32];      // The key of the AES encryption.
        unsigned char fileIV[16];       // The IV of the AES encryption.
        unsigned char fileHash[16];     // The hash of the (unencrypted) content.
        char *fileName;                 // Filename.
};

Used libraries

OpenSSL [https://www.openssl.org/]
pthreads [https://man7.org/linux/man-pages/man7/pthreads.7.html]

License

MIT

TODO

- [X] Section encryption/decryption.
- [X] Use sendfile() function for better performance
- [X] RSA stream encrypt instead of blocks of data
- [X] File shredder for deleting files
- [X] Improve the AES encryption, write memory-based encryption.
- [~] Create a TUI (Terminal User Interface) animation?
- [X] Threads for better performance
- [X] -r option to auto delete the original files with our shredder
- [X] Threads for decrypting
- [X] Save file permissions in CryptFile. (Read-Write-Execute)
- [ ] Compression algorithm
- [ ] Adding own MIME and file extension
- [ ] -q option to minimize output?

Credits

Me, Myself and I

lockfile's People

Contributors

trisna22 avatar

Stargazers

Emre avatar

Watchers

 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.