HASH64 algorithm represents an algorithm for calculating a 64bit hash function based on the block symmetric algorithm with a secret key. The HASH64 algorithm secret key size may be 16 or 32 bytes (128 or 256 bit). The minimal size of a data block, hash of which should be calculated, amounts to 16 bytes. The size of data blocks should be a multiple of 8 bytes.

The main feature of HASH64 algorithm lies in its unidirectionality. This means that even knowing the value of hash function for some random set of data, one will not be able to restore the data itself.

HASH64 algorithm is used for calculating reliable checksums, authentication and validity checks of data.

If the size of a data array is not a multiple of 8 bytes or is less than 16 bytes, you will need to add the missing bytes. It is strongly recommended to have variable filler bytes. You can use random numbers as filler bytes. In this case the block to be processed should be stored as a whole with encrypted filler bytes (without removing such bytes).

Recommendations for operating with initialization vector (IV)

You need to use the following recommendations to ensure proper conversion of data by HASH64 algorithm:

  • Ensure that the results of calculation of hash functions for the same data by the algorithms with the same determinants remain the same, the initialization vector (IV) should have the same values
  • While calculating the hash function of large blocks (exceeding 248 bytes), save the value of the initialization vector (IV) between the calls to algorithms
  • Initialize the IV with the respective number of record/sector to ensure that the calculation of hash function for each such record (e.g. database records, disk sectors, etc.) is always done same way and different records with the same values have different values of hash functions
  • No labels