Giter VIP home page Giter VIP logo

iniencrypt's Introduction

IniEncrypt

The goal of IniEncrypt is to test the efficacy and the applicability of both symmetric and asymmetric cryptographic algorithms when encrypting/decrypting text and images.

Algorithms being considered include:

  1. Diffie-Hellman
  2. RSA
  3. 3DES
  4. AES

How it Works?

Cryptographic Algorithms can be:

  1. Symmetric Algorithm (e.g AES and TripleDES)
  2. Asymmetric Algorithm (e.g. RSA and DiffieHellman)

Symmetric Algorithm

Symmetric Algorithm are cryptographic algorithms that use a single key to either encrypt or decrypt data. This means both parties (Bob and Alice) share a single secret key. AES has a key size length of 16-bytes while TripleDES can support both 16-bytes and 24-bytes key sizes.

Asymmetric Algorithm

Asymmetric Algorithms are cryptographic algorithms that require the use of a key pair i.e. two keys (PrivateKey and PublicKey) are required. When two parties (Bob and Alice) want to communicate, The following processes happens:

  1. The sender(Alice) generates a Public and Private Key pair.
  2. Alice then encodes her Public Key and sends it to the receiver(Bob).
  3. Bob generates his own Public and Private Key pair and sends his encoded Public Key over to Alice.
  4. This marks the end of the key sharing process.
  5. To transmit data between both parties, Alice, for example, encrypts her message (data) with Bob's Public Key and sends it to Bob.
  6. Bob receives the encrypted message from Alice and decrypts it with his Private Key.
  • RSA accepts key sizes between 512 and 65536 bytes (in multiples of 64 bytes). RSA can only encrypt data with a maximum size of ((keySize/8)-11) i.e. for example, if a keySize of 1024 is used, it can only encrypt data with a maximum size of ((1024/8)-11) = 117 bytes

  • Diffie Hellman is a Key Exchange algorithm and accepts key sizes between 512 and 2048 bytes (in multiples of 64 bytes). The DH Key Exchange Process:

  1. The sender (Alice) starts the DH Key exchange process by generating a Private and Public Key pair with a specified Key size.
  2. Alice encodes her Public Key and sends it to the receiver (Bob).
  3. Bob receives Alice's encoded Public Key and generates his own Public and Private Key pair using the parameters encoded in Alice's Public Key.
  4. Bob encodes his Public Key and sends it over to Alice.
  5. Alice uses Bob's encoded Public Key to initiate her own first phase of the DH protocol.
  6. Bob also uses Alice's Public Key to initiate his own first phase of the DH protocol.
  7. Both Bob and Alice generates a Shared Secret Key (The keys generated at both ends must tally).
  8. The size of the Shared Secret Key is dependent on the size of the cryptographic Key used. If a key size of 512 is used, a Shared Secret Key of 64 bytes would be generated.
  9. The Shared Secret Key is used to encrypt/decrypt data being sent or received to/from both parties (Bob and Alice).

Screenshots

launch default portrait

RSA1 RSA 2 RSA3

land

References

  1. https://docs.oracle.com/javase/9/security/java-cryptography-architecture-jca-reference-guide.htm
  2. https://docs.oracle.com/javase/7/docs/technotes/guides/security/SunProviders.html

iniencrypt's People

Contributors

codewithade avatar

Stargazers

 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.