Coder Social home page Coder Social logo

dam00042 / files-encryptor Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 42 KB

Python Application to encrypt and decrypt files using password. Argon2id to derive a key and Salsa20 - Poly1305 from NaCl for the encryption.

Batchfile 0.22% Python 99.78%
argon2id compression encryption-decryption nacl password-encryption poly1305 salsa20

files-encryptor's Introduction

Installation and Usage Instructions for Files Encryptor (馃嚞馃嚙)

Steps to Install and Configure Python and Required Modules

  1. Install Python:

    • Visit the official Python website.
    • Download the latest version of Python 3.x for your operating system (Windows, macOS, or Linux).
    • Run the downloaded installer and follow the on-screen instructions.
    • Make sure to check the Add Python to PATH checkbox during the installation.
  2. Verify Python Installation:

    • Open a new terminal window (Command Prompt on Windows or Terminal on macOS/Linux).

    • Execute the following command to verify the installation:

      python --version
    • You should see the installed Python version.

  3. Update pip (Python Package Manager):

    • Execute the following command to upgrade pip to the latest version:

      python -m pip install --upgrade pip
  4. Install Required Modules:

    • Open a terminal window.

    • Navigate to the directory C:/Users/xxxx, where xxxx represents your username. If your username is pepe, you would need to enter the following in the terminal:

      cd C:/Users/pepe
    • Check if you already have the required modules for the project to work. Follow these steps:

      1. Type 'python' and press ENTER.
      python
      1. Next, type 'help' and press ENTER
      help
      1. Now type 'help()' and press ENTER
      help()
      1. From now on, you can check different Python help topics. In our case, type 'modules' and press ENTER
      modules
      1. It will display all the installed modules for Python on your computer. Ensure that these modules are present: os, io, zipfile, zlib, nacl, getpass, tkinter, threading.
      2. The following modules should be installed by default when installing Python: os, io, zipfile, zlib, getpass, threading, and possibly tkinter. Therefore, the only module that should be installed separately is nacl. If any other module is missing, simply search Google for how to install it.

      To install nacl:

      python -m pip install PyNaCl

      To install tkinter:

      python -m pip install tk
  5. Run the Application:

    • After installing Python and the modules, you can run the application.
    • Simply run the execute_encryptor.bat file located in this directory.

With these steps, you should have Python installed and the necessary modules configured to run the application.


Usage Instructions

Once you have installed Python and configured the required modules, you can access its various functionalities:

  • Open the Application:

    • Run the execute_encryptor.bat file located in the project directory.
  • User Interface:

    • The File Encryptor user interface will open. It includes:
      • A text bar to enter the password, along with a button to hide or show the password.
      • Buttons to select a file and a folder; after selection, the chosen path will be displayed in the text box. If the first option is selected, you can encrypt a single file, and in the second case, an entire folder will be compressed automatically without marking the compression checkbox.
      • 3 Radio buttons with three options: Interactive, Moderate, and Sensitive. In ascending order of strength, they indicate whether more memory should be used and more operations should be performed in the encryption process using the Salsa20 - Poly1305 algorithm.
      • Encryption and decryption buttons that will execute the command to encrypt the content after selecting the output folder for the encrypted file.
      • Checkbox buttons that allow indicating whether to compress before encryption or decompress a decrypted file afterward.
      • A button to clear the entire screen.
  • Enter Information:

    • Enter a password in the corresponding field.
    • Select a file or folder using the Select File or Select Folder buttons.
    • Choose the desired hash strength using the radio buttons.
  • Additional Options:

    • Check the Compress before Encrypting box if you want to compress the file before encrypting it. If a folder is selected, it will be compressed as well.
    • Check the Decompress when Decrypting box if the file is compressed and you want to decompress it when decrypting.

Warning

Ensure that you are decompressing a file with the .zip.enc extension. Otherwise, the file cannot be decrypted correctly.

  • Encrypt File:

    • Click the Encrypt File button to encrypt the selected file. A dialog box will appear to choose the destination folder for the encrypted file. Once selected, the file will be encrypted and saved in that directory.
  • Decrypt File: Click the Decrypt File button to decrypt the selected file. A dialog box will appear to choose the destination folder for the decrypted file. Once selected, the file will be decrypted and saved in that directory.

  • Operation Progress:

    • During encryption or decryption, a progress window will be displayed.

Warning

DO NOT CLOSE this loading window during the process. The program will crash.

  • Success or Error:

    • After completing the operation, you will receive a message indicating whether the operation was successful or if there was an error. In case of an error, check if the password is correct or if you have selected the same encryption strength as when encrypting the file, as well as the paths and names of the files.
  • Clear Everything:

    • You can use the Clear Everything button to reset all fields and prepare the application for a new operation. By default, when encryption or decryption is performed, the entire screen and loaded files are cleared to avoid errors if the application is used for other files. This is also done for security reasons so that the password is not remembered. The only thing that is not reset is the list of radio buttons to avoid errors if the application is still being used and you forget to select the strength you had used for encryption.

Warning

Once you close the application, you must remember with what strength you encrypted a file, as you need to use the same strength to decrypt it later.

Following these steps, you can use File Encryptor to securely encrypt and decrypt files.


Instrucciones de Instalaci贸n y uso de Files Encryptor (馃嚜馃嚫)

Pasos para instalar y configurar Python y los m贸dulos necesarios

  1. Instalar Python:

    • Visita el sitio web oficial de Python.
    • Descarga la versi贸n m谩s reciente de Python 3.x para tu sistema operativo (Windows, macOS o Linux).
    • Ejecuta el instalador descargado y sigue las instrucciones en pantalla.
    • Aseg煤rate de marcar la casilla Agregar Python a la variable de entorno PATH durante la instalaci贸n.
  2. Verificar la Instalaci贸n de Python:

    • Abre una nueva ventana de terminal (Command Prompt en Windows o Terminal en macOS/Linux).

    • Ejecuta el siguiente comando para verificar la instalaci贸n:

      python --version
    • Deber铆as ver la versi贸n de Python instalada.

  3. Actualizar pip (Administrador de Paquetes de Python):

    • Ejecuta el siguiente comando para actualizar pip a la 煤ltima versi贸n:

      python -m pip install --upgrade pip
  4. Instalar M贸dulos Necesarios:

    • Abre una ventana de terminal.

    • Navega al directorio C:/Users/xxxx. Donde xxxx representa tu usuario. Si tu usuario es pepe, tendr铆as que escribir lo siguiente en el terminal:

      cd C:/Users/pepe
    • Comprueba si ya tienes los m贸dulos necesarios para que el proyecto funcione. Para ello, sigue los siguientes pasos:

      1. Escribe 'python' y pulsa ENTER.
      python
      1. A continuaci贸n, escribe 'help' y pulsa ENTER
      help
      1. Ahora escribe 'help()' y pulsa ENTER
      help()
      1. A partir de ahora podr谩s consultar diferentes ayudas sobre Python, en nuestro caso escribiremos 'modules' y pulsaremos ENTER
      modules
      1. Se mostrar谩n todos los m贸dulos instalados para Python en nuestro ordenador. Debes comprobar que est茅n todos estos m贸dulos: os, io, zipfile, zlib, nacl, getpass, tkinter, threading
      2. Los siguientes m贸dulos deber铆an estar instalados por defecto al instalar Python: os, io, zipfile, zlib, getpass, threading, e incluso creo que tkinter. Por tanto, el 煤nico m贸dulo que deber铆a instalarse aparte ser铆a nacl. Si hay alguno m谩s que no lo est茅, simplemente busca en Google c贸mo instalarlo.

      Para instalar nacl:

      python -m pip install PyNaCl

      Para instalar tkinter:

      python -m pip install tk
  5. Ejecutar la Aplicaci贸n:

    • Despu茅s de instalar Python y los m贸dulos, puedes ejecutar la aplicaci贸n.
    • Basta con ejecutar el archivo execute_encryptor.bat que se encuentra dentro de este directorio.

Con estos pasos, deber铆as tener Python instalado y los m贸dulos necesarios configurados para ejecutar la aplicaci贸n.


Instrucciones de Uso

Una vez que hayas instalado Python y configurado los m贸dulos necesarios, puedes acceder a sus diferentes funcionalidades:

  • Abrir la Aplicaci贸n:

    • Ejecuta el archivo execute_encryptor.bat ubicado en el directorio del proyecto.
  • Interfaz de Usuario:

    • Se abrir谩 la interfaz de usuario de File Encryptor. Como se puede observar, tiene:
      • Una barra de texto para introducir la contrase帽a, junto con un bot贸n que permite ocultar o mostrar dicha contrase帽a
      • Un bot贸n para seleccionar un archivo y otro para seleccionar la carpeta; tras ello, se mostrar谩 en el cuadro de texto la ruta seleccionada. En caso de seleccionar el primero, podr谩s encriptar un 煤nico archivo, en el segundo caso, una carpeta completa que se comprimir谩 previamente de forma autom谩tica sin tener que marcar la casilla de compresi贸n.
      • 3 Botones de tipo radio con tres opciones. Interactivo, moderado y sensible. En orden de menos a m谩s fuerza, permitir谩n indicar si se quiere usar m谩s memoria y realizar m谩s operaciones en el proceso de cifrado mediante el algoritmo Salsa20 - Poly1305.
      • Los botones de cifrado y descifrado, que enviar谩n la orden para cifrar el contenido tras seleccionar la ruta a la carpeta de salida del archivo cifrado
      • Los botones checkbox que permiten indicar si se quiere comprimir previo al cifrado, o descomprimir un archivo descifrado a posteriori.
      • Un bot贸n para limpiar toda la pantalla.
  • Ingresar Informaci贸n:

    • Ingresa una contrase帽a en el campo correspondiente.
    • Selecciona un archivo o carpeta utilizando los botones Seleccionar Archivo o Seleccionar Carpeta.
    • Selecciona la fuerza del hash deseada utilizando los radio buttons.
  • Opciones Adicionales:

    • Marca la casilla Comprimir antes de cifrar si deseas comprimir el archivo antes de encriptarlo. Si es una carpeta lo que est谩 seleccionando, se comprimir谩 igualmente
    • Marca la casilla Descomprimir al descifrar si el archivo est谩 comprimido y deseas descomprimirlo al descifrarlo.

Warning

Debes asegurarte de que est谩s descomprimiendo un archivo con extensi贸n .zip.enc. De lo contrario, no s茅 podr谩 desencriptar correctamente el archivo.

  • Cifrar Archivo:

    • Haz clic en el bot贸n Cifrar Archivo para encriptar el archivo seleccionado. Te aparecer谩 un cuadro de selecci贸n de la carpeta de destino del archivo cifrado. Una vez seleccionado, se cifrar谩 el archivo y se guardar谩 en dicho directorio.
  • Descifrar Archivo: Haz clic en el bot贸n Descifrar Archivo para desencriptar el archivo seleccionado. Te aparecer谩 un cuadro de selecci贸n de la carpeta de destino del archivo descifrado. Una vez seleccionado, se descifrar谩 el archivo y se guardar谩 en dicho directorio.

  • Progreso de la Operaci贸n:

    • Durante la encriptaci贸n o desencriptaci贸n, se mostrar谩 una ventana de progreso.

Warning

NO CIERRES esta ventana de carga durante el proceso. El programa crashear铆a.

  • 脡xito o Error:

    • Despu茅s de completar la operaci贸n, recibir谩s un mensaje indicando si la operaci贸n fue exitosa o si hubo alg煤n error. En caso de ser un error, revisa si la contrase帽a es correcta o si has seleccionado la misma fuerza de encriptado que seleccionaste al cifrar el archivo, as铆 como las rutas y los nombres de los archivos.
  • Limpiar Todo:

    • Puedes utilizar el bot贸n Limpiar Todo para restablecer todos los campos y preparar la aplicaci贸n para una nueva operaci贸n. Por defecto, cuando se lleva a cabo un proceso de cifrado o descifrado, se limpia toda la pantalla y los archivos cargados para evitar errores si se utiliza la aplicaci贸n para otros archivos distintos. Tambi茅n se hace por seguridad, para que la contrase帽a no se quede recordada. Lo 煤nico que no se reinicia es la lista de radio buttons, para evitar as铆 errores en caso de que se siga usando la aplicaci贸n y no recuerdes seleccionar la fuerza que hab铆as utilizado para encriptar.

Warning

Una vez cierres la aplicaci贸n, deber谩s recordar con qu茅 fuerza encriptaste un archivo, porque debes poner la misma para desencriptarlo posteriormente.

Siguiendo estos pasos, podr谩s utilizar File Encryptor para cifrar y descifrar archivos de manera segura.

files-encryptor's People

Contributors

dam00042 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.