Jon Hash

Tags

About

Definitions

This demonstration uses the following definitions:

CHAR_BIT 8

COST 10

BASE64 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-"

BLOCK_SIZE 4

H0 "JONM"

(The password is "PASSWORD")

Salt

A string of BLOCK_SIZE characters randomly selected from BASE64 using a CSPRNG

For simplicity, this demonstration uses "SALT"

Weave

Generates the string to hash by alternating between password and salt

S A L T

P A S S W O R D

Block

Divides the weave into BLOCK_SIZE chunks

(This is just a visual aid; there are no base conversions)

Each block uses the previous block's hash, starting with H0

Shift

shift: the number of 1s in the concatenated binary value of the block

charshift = shift/CHAR_BIT: the number of characters to offset by

bitshift = shift - charshift*CHAR_BIT: the number of times to left-shift by

01010011 01010000 01000001 01000001

XOR

Used as a compression/sponging function

The previous hash (H0 in the first iteration) is XORed with the shifted block

010101010101011010101

^011101010101110101011

001000000000101111110