CUFE & CUDE Electronic Invoice Generator (Colombia)
Generate 96-character SHA-384 CUFE (Código Único de Factura Electrónica) codes and DIAN validation URLs.
Waiting for generation...
About CUFE (Colombia)
CUFE is the fiscal integrity hash regulated by DIAN (Resolutions 42/2020 & 165/2023) mandatory for all electronic invoices in Colombia.
Calculated using cryptographic SHA-384 over 14 concatenated fiscal fields including Invoice Number, Date, Amounts, Taxes, NITs, Environment, and Technical Key.
Anatomy & Structure of CUFE Code (Colombia)
The Código Único de Factura Electrónica (CUFE) is a cryptographic SHA-384 hash of 96 hex characters computed from 11 tax invoice fields:
| Position | Field | Length | Technical Meaning in DIAN | Example |
|---|---|---|---|---|
| 1 to 96 | SHA-384 Hash | 96 hex chars | One-way 384-bit cryptographic digest in lowercase hexadecimal (0-9, a-f). | 45f8a02b... |
| Source | Invoice Data | 11 fields | Invoice number, date, time, total amount, taxes, issuer NIT, buyer ID, and software technical key. | NumFac+FecFac+... |
CUFE Cryptographic Algorithm (DIAN Resolution 000042)
The CUFE is generated via the Secure Hash Algorithm SHA-384:
CUFE = SHA-384(NumFac + FecFac + HorFac + ValFac + CodImp1 + ValImp1 + ... + TechKey + EnvType)
- 1. Field Concatenation: 11 specific billing fields are concatenated without spaces or separators per DIAN specs.
- 2. Technical Key Addition: the secret 64-character technical key issued by DIAN is appended to the string.
- 3. SHA-384 Cryptographic Hash: the concatenated string is passed through the SHA-384 hash function.
- 4. Hexadecimal String: the final output is represented as exactly 96 lowercase hexadecimal characters.