Quick How-To for Hazy ( older v1.24 )

2022-06-22


Note: This is a "quick how-to". The instructions are subjectively reduced to a minimum, to keep focus and clarity.


Setup for the first time


[1] Unpack the archive:

unzip -o __ARCHIVE__.zip OR 7z x -y __ARCHIVE__.zip

(optional) Verify the checksums against the official checksum values.

Do not use checksums from unknown sources.

(optional) On Linux: chmod +x bin/* or chmod u+x bin/*.

[2] Enjoy.

The --help command line argument can be used.

Examples of use


Note: Replace the sample values for Chaos/Seed/Rounds/Strings with your values.


Choose Chaos values

Find Chaos values with small number of conflicts between lines. A line is used as one string.

4x methods are faster and sometimes better for long strings.


hazy --sc -i dictionary-file.txt -s 0x12345678 -l 50 -m sma4

hazy --sc -i dictionary-file.txt -s 0x12345678 -l 50 -m shams

Encrypt/decrypt using files

It works for binary files, too.


# // encrypt a text file
echo "Line with text" > original.txt
hazy -r 2 -s 0x12345678 -c 0x87654321 -a -i original.txt -o secret-file
# // backup or send "secret-file"

# // decrypt on the other side
hazy -r 2 -s 0x12345678 -c 0x87654321 -a -i secret-file  -o original2.txt
cat original2.txt
diff -qs original*

# // encrypt binary file
truncate --size 123M binary-file && shred --iterations 1 binary-file
hazy -r 2 -s 0x12345678 -c 0x87654321 -a -i binary-file -o secret-file
# // backup or send "secret-file"

# // decrypt on the other side
hazy -r 2 -s 0x12345678 -c 0x87654321 -a -i secret-file -o decrypted-file
diff -qs binary-file decrypted-file


Encrypt/decrypt using stdin/stdout and arguments


# // encrypt, see the bytes in the output
hazy -r 2 -s 0x12345678 -c 0x87654321 -a "Line with text"

# // encrypt to file
hazy -r 2 -s 0x12345678 -c 0x87654321 -a "Line with text" -o secret-file

# // decrypt, see the text in the output
hazy -r 2 -s 0x12345678 -c 0x87654321 -a -i secret-file

Encrypt/decrypt with a custom key

[1] Choose: Seed, Chaos, Rounds, Method.

[1.1] Generate a long Chaos value in a file.

Use several 32bit hex non-zero numbers, with "0x" prefix.

The echo command below is to show how a key file should look like. od or dumphex are good enough for this quick example, to generate numbers from text.

However, using random numbers for the key would be even better.


# // create a long chaos/key file
echo -n "My Ultimate Long Password, text to remember, shared only with my friend" | \
  od -A n -t x4 | \
  sed -e 's/ 0000\w*//g;s/ / 0x/g;' | \
  tee MyChaosKey.txt

[1.2] Generate a Seed value with the same length.

Note: seed can be 0, chaos should not be 0.


# // (optional) create a seed file with the same length
echo -n "Some Seed value, as Text, eventually from last previous result" | \
  od -A n -t x4 | \
  sed -e 's/ 0000\w*//g;s/ / 0x/g;' | \
  tee MySeedKey.txt

[1.3] Choose rounds and method, then share (Seed-file, Chaos-file, Rounds, Method) with your friend.


[2] Example for encrypt/decrypt, using key files


# // create a text file
echo "Line with text" > original.txt
echo "Line with text" >> original.txt
echo "Line with text" >> original.txt
echo "Line with text" >> original.txt

# // encrypt with seed
hazy -r 2 -m sma4 --sf MySeedKey.txt --cf MyChaosKey.txt -a -i original.txt -o secret-file

# // decrypt on the other side
hazy -r 2 -m sma4 --sf MySeedKey.txt --cf MyChaosKey.txt -a -i secret-file  -o original2.txt
cat original2.txt
diff -qs original*

[2.1] Similar example for encrypt/decrypt, init with Seed zero


# // encrypt without seed
hazy -r 2 -m sma4 --cf MyChaosKey.txt -a -i original.txt -o secret-file

# // decrypt on the other side
hazy -r 2 -m sma4 --cf MyChaosKey.txt -a -i secret-file  -o original2.txt
cat original2.txt
diff -qs original*


Additional notes regarding the license file
  • With a "Default License", there is usually a small delay for each run.
    • Delays can add up quickly when the application is run for batch processing, several times per second/minute.
  • No delays during Happy Hours.
  • You can purchase an "Active License" to eliminate delays.

Previous Article Next Article

..