Skip to content

Hash Chain

VeriFactu · Hash Chain

The VeriFactu hash chain ensures data integrity and chronological ordering.

VeriFactu uses SHA-256 (Secure Hash Algorithm 256-bit):

Input: Invoice data + Previous hash
Output: 64-character hex string
Huella = SHA256(
NIF_Obligado + "|" +
Num_Serie + "|" +
Fecha_Hora + "|" +
Importe_Total
)
Huella = SHA256(
NIF_Obligado + "|" +
Num_Serie + "|" +
Fecha_Hora + "|" +
Importe_Total + "|" +
Huella_Anterior
)

To validate a chain:

  1. Recompute each hash
  2. Verify against stored Huella
  3. Confirm previous hash references

Kreyo automatically:

  • Maintains your chain state
  • Computes hashes correctly
  • Handles chain breaks (rare edge cases)
  • Validates before submission