PrivatePing is a secure messaging application built on Python's Django framework, providing end-to-end encryption for messages exchanged between users. It leverages HTML, CSS, JavaScript, SubtleCrypto API, channels, and Redis to ensure secure communication channels.
Note: Currently, the application is not accessible from mobile and tablet devices.
PrivatePing is hosted on Heroku. It is accessible through a web browser. Users can register, log in securely, and exchange encrypted messages with each other without the need to install or run the application locally.
To get started:
PrivatePing employs a robust encryption system to ensure secure and private communication between users. Here's a step-by-step breakdown of the process:
User Authentication and Key Generation: When a user logs into their account or creates a temporary account, PrivatePing's SubtleCrypto module generates a secure key-pair for the user. The private key is stored locally in the user's browser's local storage, while the public key is sent to the server. This key generation process occurs each time a user logs in, and any previous session keys are destroyed to maintain security.
Initiating Communication: When a user initiates communication with another user, PrivatePing fetches the recipient's public key from the server. This public key is then stored in the user's browser's cookie, awaiting connection. The same process occurs for the recipient user on the other side.
Secure Connection Establishment: Once both users are connected, PrivatePing establishes a secure and private communication channel between them.
Message Encryption and Transmission: When a user types a message and hits the send button, PrivatePing retrieves the recipient's public key from its cookie. The message is then encrypted using the SHA-256 algorithm and sent to the recipient over websockets.
Message Decryption and Display: Upon receiving the encrypted message, the recipient retrieves their private key from their browser's local storage. Using this private key, the recipient decrypts the message, which is then displayed on the webpage in its original form.
This comprehensive encryption process ensures that all communication on PrivatePing remains secure and private, with messages encrypted end-to-end and inaccessible to anyone other than the intended recipient.
You can install PrivatePing locally on Linux and Mac devices using the provided installation script.
install.sh
script is located.
chmod +x install.sh
./install.sh
If you prefer not to use the provided installation script or encounter any issues, you can manually install PrivatePing on Linux and Mac using the following steps:
Install Python 3: If you haven't already, install Python 3 on your system. You can download it from Python's official website.
Install Virtualenv: This command installs Virtualenv, a tool used to create isolated Python environments.
pip3 install virtualenv
Clone the repository with the following command:
git clone https://github.com/princekhunt/privateping.git
Create a Virtual Environment: This command creates a virtual environment named venv
in the current directory.
python3 -m venv venv
Activate the Virtual Environment: Activating the virtual environment isolates your Python environment, ensuring dependencies are installed locally rather than globally.
source venv/bin/activate
venv\Scripts\activate
Install Dependencies: This command installs all required Python packages specified in the requirements.txt
file.
pip3 install -r requirements.txt
Create .env
File: These commands create a .env file in the PrivatePing/settings
directory with environment variable configurations. (Recommendation: Generate a new SECRET_KEY and replace it with the defined here.)
echo "SECRET_KEY='*$j@tpltfyblml&*1d+n9t@il^0xef4=bvdu&!7r=zvoq$a19g'" > PrivatePing/settings/.env
echo "SECRET_ADMIN_URL=''" >> PrivatePing/settings/.env
echo "HCAPTCHA_SITEKEY='10000000-ffff-ffff-ffff-000000000001'" >> PrivatePing/settings/.env
echo "HCAPTCHA_SECRET='0x0000000000000000000000000000000000000000'" >> PrivatePing/settings/.env
Run Database Migrations: This command applies migrations to create necessary database tables.
python3 manage.py migrate
Start the Server: This command starts the Django development server. You can access PrivatePing through your web browser at http://localhost:8000.
python3 manage.py runserver
We extend our heartfelt gratitude to all contributors who have helped improve PrivatePing! Your efforts are greatly appreciated. See the humans.txt page for a list of contributors.
Contributions are welcome! If you'd like to contribute to PrivatePing, please follow these guidelines:
We invite everyone to use this absolutely free application and suggest improvements that can enhance security and privacy.
PrivatePing is licensed under the MIT License.
Special thanks to @Madhur215 for the groundwork and inspiration for this project.