Showing posts with label OpenSSL. Show all posts
Showing posts with label OpenSSL. Show all posts

Monday, March 7, 2022

Hashing in Action

Hashing is a cryptographic concept that can be used to validate the integrity of files and store passwords. 

What does it mean?

> Let's say I want to download Eclipse, the popular Java IDE
> I google and find the website from where I can download Eclipse

> But wait, how do I know that this file was not tempered and what is this SHA-512 button
> If you are here, you already know where this is going, let's look at SHA-512

> Now download the file and use OpenSSL tool to find hash of your downloaded file
> cat eclipse-inst-jre-win64.exe | openssl dgst -sha512
> Match the hash

I have OpenSSL tool installed on my system, here are the steps:
https://iamsecurity-tips.blogspot.com/2022/03/install-openssl-on-windows-subsystem.html
https://iamsecurity-tips.blogspot.com/2022/03/install-windows-subsystem-for-linux-wsl2.html

Install OpenSSL on Windows Subsystem for Linux (WSL2)

wget https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.5.0.tar.gz

<Check latest version and replace everywhere>

tar -xvf libressl-3.5.0.tar.gz

cd libressl-3.5.0/

./configure

You may receive and error configure: error: no acceptable C compiler found in $PATH 

sudo apt-get install -y build-essential checkinstall

sudo make

sudo make check

sudo make install

sudo ldconfig

<In new Terminal>

openssl version