When a DDD file reaches the archive, you should be able to answer two questions: has anyone changed it since, and does the data come from a genuine card or vehicle unit at all? Each question has its own tool.
1. Two different questions
- A SHA-256 checksum answers: is this file exactly the same as when it was archived?
- A digital signature answers: was the data written by a genuine card or vehicle unit and left unchanged afterwards?
2. SHA-256 – a file's fingerprint
SHA-256 is a 64-character digest computed from the entire file content. Changing a single byte gives a completely different result. If the checksum recorded at archiving matches the file's checksum today, the file has not been changed. Renaming the file does not affect the checksum.
You can compute the checksum yourself, without any special software:
# Linux / macOS sha256sum file.ddd # Windows (PowerShell) Get-FileHash file.ddd -Algorithm SHA256
3. Digital signature and certificate chain
Data blocks in a DDD file are signed with the card's or vehicle unit's key. The equipment certificate is signed by the member state authority (MSCA), and the authority's certificate by the European root key ERCA, published by the European Commission. Verification checks the whole chain.
4. Good archiving practice
- Keep the original files – do not open and re-save them in other programs.
- Record the SHA-256 of every file when archiving it.
- When passing files on, include a list of checksums (manifest).
- Keep a copy of the archive in a different place from the original.