Code Monkey home page Code Monkey logo

delta-l's Introduction

delta-l Build Status

Program that can encrypt and decrypt files.

Quick notes and some history

I don't recommend using this encryption algorithm for anything important (see Flaws) -- This was mostly an interesting idea that came to me, so I made it as a little exercise.

Initially, I actually tried to make this in Java, but that project got very messy and I abandoned it a long time ago (before I knew of Rust). Then recently, I remembered that project and thought it would a cool little thing to make in Rust, and here it is.

The algorithm

Encryption is done by taking each byte and adding with the previous byte (the first byte will just be the byte itself). The addition allows overflowing, i.e. it will just wrap.

For example, let's say we have a file with the following bytes (in hex): 20 A3 17 55. The resulting file would be: 20 E3 7D 25 8B (Note: this isn't exactly true, since the resulting file also would have a header)

Decryption just does the reverse.

When using a passphrase, the passphrase will be hashed and the hash will be used as an extra offset on each byte.

Flaws

  • This is very fast and should therefore be very easy to break, when using checksum.

Installation

As of Rust 1.5, it's possible to install this by running:

cargo install --git https://github.com/LFalch/delta-l.git

delta-l's People

Contributors

lfalch avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

delta-l's Issues

No checking of passphrase

Decrypting a file isn't much different to encrypting and practically just does the inverse of encrypting.
It also doesn't check whether the decrypted file is correct.

Possible solution

Include a header in the encrypted files

Correct spelling in code

I left some spelling mistakes in some of the comments.
This should be fairly simple to correct.

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.