Git Product home page Git Product logo

data-security-using-cryptography-and-steganography's Introduction

SecureIT - Data Security using Cryptography and Steganography

Demo: Youtube

Run in GitPod

Open in Gitpod

  • This is a Python based tool to encrypt files and important data into a very secure form.
  • It uses Cryptography (RSA, AES and TripleDES) and Steganography (Image Steganography and Video Steganography)

Requirements (installable via pip)

What I used?

  1. pycrypto - for Cryptography based encryption - It is used to encrypt and decrypt data into secured unreadable form.
  2. opencv2 - for Steganography - It is used for image and video manipulation. We used it for embedding encrypted data into images/videos.
  3. rsa - for RSA based encryption - RSA is a asymmetric encryption method, used for encrypting data.

How to run the program?

  1. Download this GitHub repository

    • Either Clone the repository
       git clone https://github.com/Kunal-Attri/Data-Security-using-Cryptography-and-Steganography.git
      
    • Or download and extract the zip archive of the repository.
  2. Download & Install requirements

    • Ensure that you have Python 3 installed.
    • Open terminal in the Repository folder on your local machine.
    • Run the following command to install requirements.
       pip install -r requirements.txt
      
  3. Run the Program

    python main.py
    

    Expected Interface:

  4. Generate RSA Keys

    • If running first time, you need to generate RSA Keys.
    • Generate it using option no 5.
  5. Ready to Secure data

    • Now, you can secure your data files into either images or videos.

References

data-security-using-cryptography-and-steganography's People

Contributors

kunal-attri avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

data-security-using-cryptography-and-steganography's Issues

Attempt to encrypt data fails

Error is related to AES Encryption in Encrypt.py file
Traceback (most recent call last): File "C:\Users\attri\OneDrive\Desktop\check\Data-Security-using-Cryptography-and-Steganography\main.py", line 63, in <module> main() File "C:\Users\attri\OneDrive\Desktop\check\Data-Security-using-Cryptography-and-Steganography\main.py", line 28, in main secure.secure_file(fName) File "C:\Users\attri\OneDrive\Desktop\check\Data-Security-using-Cryptography-and-Steganography\test\Lib\site-packages\multipledispatch\dispatcher.py", line 435, in __call__ return func(self.obj, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\attri\OneDrive\Desktop\check\Data-Security-using-Cryptography-and-Steganography\lib\Secure.py", line 16, in secure_file f = self.crypt.encrypt_file(f) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\attri\OneDrive\Desktop\check\Data-Security-using-Cryptography-and-Steganography\lib\Crypt.py", line 66, in encrypt_file enc = self.encrypt(enc, self.key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\attri\OneDrive\Desktop\check\Data-Security-using-Cryptography-and-Steganography\lib\Crypt.py", line 33, in encrypt cipher = AES.new(key, AES.MODE_CBC, iv) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\attri\OneDrive\Desktop\check\Data-Security-using-Cryptography-and-Steganography\test\Lib\site-packages\Crypto\Cipher\AES.py", line 228, in new return _create_cipher(sys.modules[__name__], key, mode, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\attri\OneDrive\Desktop\check\Data-Security-using-Cryptography-and-Steganography\test\Lib\site-packages\Crypto\Cipher\__init__.py", line 79, in _create_cipher return modes[mode](factory, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\attri\OneDrive\Desktop\check\Data-Security-using-Cryptography-and-Steganography\test\Lib\site-packages\Crypto\Cipher\_mode_cbc.py", line 274, in _create_cbc_cipher cipher_state = factory._create_base_cipher(kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\attri\OneDrive\Desktop\check\Data-Security-using-Cryptography-and-Steganography\test\Lib\site-packages\Crypto\Cipher\AES.py", line 100, in _create_base_cipher result = start_operation(c_uint8_ptr(key), ^^^^^^^^^^^^^^^^ File "C:\Users\attri\OneDrive\Desktop\check\Data-Security-using-Cryptography-and-Steganography\test\Lib\site-packages\Crypto\Util\_raw_api.py", line 242, in c_uint8_ptr raise TypeError("Object type %s cannot be passed to C code" % type(data)) TypeError: Object type <class 'str'> cannot be passed to C code

Attempting to encrypt into image or video throws NotImplementedError

The process fails partway through and throws the following error:

Traceback (most recent call last):

File "/home/joeyio/ssl/Data-Security-using-Cryptography-and-Steganography/main.py", line 63, in
main()

File "/home/joeyio/ssl/Data-Security-using-Cryptography-and-Steganography/main.py", line 28, in main
secure.secure_file(fName)

File "/home/joeyio/anaconda3/envs/vidSteg/lib/python3.9/site-packages/multipledispatch/dispatcher.py", line 439, in call
return func(self.obj, *args, **kwargs)

File "/home/joeyio/ssl/Data-Security-using-Cryptography-and-Steganography/lib/Secure.py", line 17, in secure_file
self.stego.stego(f)

File "/home/joeyio/anaconda3/envs/vidSteg/lib/python3.9/site-packages/multipledispatch/dispatcher.py", line 435, in call
raise NotImplementedError(

NotImplementedError: Could not find signature for stego:

I'm running an Anaconda environment in WSL on Windows 11 64 bit. All the dependencies seem to be in place.

Error during image decryption.. Pls help!!

The following error pops up when I decrypt the image.

Traceback (most recent call last):
File "C:\Users\USER\Documents\GitHub\CrytoSteg\main.py", line 63, in
main()
File "C:\Users\USER\Documents\GitHub\CrytoSteg\main.py", line 44, in main
secure.desecure_file(stegoImg)
File "C:\Users\USER\Documents\GitHub\CrytoSteg\lib\Secure.py", line 37, in desecure_file
self.crypt.decrypt_file(outputFile)
File "C:\Users\USER\Documents\GitHub\CrytoSteg\lib\Crypt.py", line 106, in decrypt_file
dec1 = self.decrypt_rsa(dec, keyF)
File "C:\Users\USER\Documents\GitHub\CrytoSteg\lib\Crypt.py", line 49, in decrypt_rsa
message = self.key.decrypt(message)
File "C:\Users\USER\miniconda3\envs\cryptosteg\lib\site-packages\Crypto\PublicKey\RSA.py", line 416, in decrypt
raise NotImplementedError("Use module Crypto.Cipher.PKCS1_OAEP instead")
NotImplementedError: Use module Crypto.Cipher.PKCS1_OAEP instead

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.