Categorygithub.com/melis34/hashbash
repositorypackage
0.0.0-20241125204058-0d9220107ac5
Repository: https://github.com/melis34/hashbash.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# README

HashBash

A collection of tools to experiment with diffrent hash functions. Made during internship. A lot of the tools are specially made for myself and may seem a little unnecessary, but they helped me understand the SHA-256 hash function further.

Why

The tools are made to experiment with hash functions. Online tools don't let you hash binary value, so it is hard to test diffrent points of intrest against each other

And the padding makes it so that some points of intrest ar not able to compare to each other. If you want to compare 512 zeros to 1024 zeros the padding adds message length, so that the comparising isn't usefull

How

The tools work by running go build /toolname/ then use ./toolname to run tool

What

The different tools currently availible are:

Tools

tooluse
binary inputThis tool takes binary input and gives a hash back, both in binary as in a hexidecimal represitation.
padthis tool takes binary input and gives the padding that would be used in the sha256 hashfunction
zerosgives a string of zeros with a user-chosen length
onesgives a string of ones with a user-chosen length
TimingTimes the the diffrence between own and traditional method and makes a chart

Examples

ExampleUseWhy
No skew hashbuild with go build NoSkewHash.goAims to help prove A
Skew hashbuild with go build NoSkewHash.goAims to help prove A
Not all outputsbuild with go build NoSkewHash.goAims to help prove A
Hash.gorun with go run Hash.goBaseline for custom SHA256 research implementations
Timingchange the value of n to select how many bytes are checked, change first forloop to change number of results

A

This theory is false

mb = message block h = compression function H = hash function O = Output l = length h(mb)=h(mb) h(mb)^(Ol+1)≠h(mb) proves H:A→B ∃x ∈ [0,2^l)∶ x ∉ B