Skip to content

SecureHasher is a hybrid Java-C++ application designed to securely hash and encrypt input data. It hashes the input using SHA-256 and encrypts the hash with an RSA public key retrieved from a remote server in PEM format. The encryption process leverages OpenSSL for secure key management and data handling.

Notifications You must be signed in to change notification settings

olekacak/Hashing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Secure Hasher Project

Overview

The Secure Hasher Project is a cross-platform Java application designed to securely generate a strong hash of a UTF-8 encoded string, download a public key from a remote URL, and encrypt the hash using that public key. To enhance security, the hashing and encryption logic is implemented in C++ to make reverse-engineering more difficult.

Features

  • Secure hashing of UTF-8 encoded strings.
  • Encryption using public keys retrieved from remote URLs.
  • Hybrid Java and C++ implementation for enhanced security.
  • Cross-platform support (Windows, macOS, Linux).

Prerequisites

Java Requirements

C++ Requirements

  • GCC (for compiling C++ code):
    • Pre-installed on most Linux systems.
    • Available via MinGW for Windows - Download Here
  • OpenSSL library (for encryption) - Download Here

Setup Instructions

1. Compile Java Code to Generate Header File

javac -cp "C:\Users\Ole Kacak\.m2\repository\org\json\json\20210307\json-20210307.jar" -h ../cpp src/main/java/com/secure/SecureHasher.java

2. Compile C++ Code

g++ -shared -o SecureHasherNative.dll -I"%JAVA_HOME%\include" -I"%JAVA_HOME%\include\win32" SecureHasher.cpp -lssl -lcrypto

3. Package the Application Using Maven

mvn compile package

Running the Application

java -Djava.library.path="target" -cp "target/hashing-1.0-SNAPSHOT.jar;target/json-20210307.jar" com.secure.SecureHasher

Additional Notes

  • Ensure the SecureHasherNative.dll (or libSecureHasherNative.so for Linux) file is present in the target folder before running the application.
  • Make sure the OpenSSL library is installed and accessible during the compilation of the C++ code.
  • Adjust file paths and extensions according to your operating system.

Compatibility

  • Windows (DLL handling).
  • macOS (Requires compilation with .dylib).
  • Linux (Requires compilation with .so).

About

SecureHasher is a hybrid Java-C++ application designed to securely hash and encrypt input data. It hashes the input using SHA-256 and encrypts the hash with an RSA public key retrieved from a remote server in PEM format. The encryption process leverages OpenSSL for secure key management and data handling.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published