Giter VIP home page Giter VIP logo

simplecrypto's Introduction

SimpleCrypto

This projects implements 3 crypto algorithms

  1. One-time Pad
  2. Caesar's Cipher
  3. Vigenere's Cipher

One-Time Pad

The OTP algorithm is a very simple but yet very strong algorithm in the sense that it can not be cracked even with post-quantum techniques.

In case of non printable characters, the One-Time Pad prints $

INFO:      One-Time Pad (It read an input plaintext and generates a random secret key from /dev/urandom)
FUNCTIONS: 1. NAME:      one_time_pad_encryption
              INPUT:     input_plaintext, input_secret_key,size_of_input
              OUTPUT:    encrypted_message
           2. NAME:      one_time_pad_decryption
              INPUT:     encrypted_message,input_secret_key
              OUTPUT     decrypted_message

In the one_time_pad_decryption function is necessary to add the size_of_plaintext because if the output of XOR produces the character '' the key will not end

Caesar's Cipher

This technique is one of the simplest and most widely known encryption techniques.

INFO: Caesar's Cipher (It reads an input plaintext and a positive key)
FUNCTIONS: 1.  NAME:      ceasar_cipher_encryption
               INPUT:     plaintext_ceasar, key
               OUTPUT:    encrypted_message_ceasar
            2. NAME:      ceasar_cipher_decryption
               INPUT:     encrypted_message_ceasar,key
               OUTPUT     decrypted_message_ceasar

Vigenere's Cipher

The Vigenere's cipher encrypts an alphabetic plaintext using a series of interwoven Caesar's ciphers.

INFO: Vigenere's Cipher (It reads an input plaintext and a key text)
FUNCTIONS: 1. NAME:      vigenere_cipher_encryption
            INPUT:     plaintext_ceasar, key
            OUTPUT:    encrypted_message_ceasar
         2. NAME:      vigenere_cipher_decryption
            INPUT:     encrypted_message_ceasar,key
            OUTPUT     decrypted_message_ceasar

Demo.c

There is an extra implementation in demo.c which takes into consideration the cases of ./demo < test.xt and ./demo

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.