Export / Integrity Check
Introduction
The Fiscal Archive must be created at least once a year and may not contain more than 365 days. If the POS System does not rely on the efsta Cloud for archiving, it must regularly create the archive itself and store it in a revision safe manner.
To access efsta documentation in French for exporting the data archived and checking its integrity follow this link.
Note that the POS System end-user is obliged to provide all fiscal archives of the last 7 years (the current fiscal year plus 6 past years). The POS System end-user must prove that the archives have not been changed and have also been stored in an audit-proof manner.
This obligation can be transferred to the POS System Creator if the POS System end-user does not have direct access to the archives. For example, the POS stores the archives in its own memory and only grants access via the user interface.
If the archives are stored locally on the POS, the POS System end-user is obliged to restore the entire system with a regular backup in case of failure, theft or similar.
Access to archived data via efsta Portal
Connection to efsta Portal
Depending if the archive obligation relies on the POS System Creator or the POS System end-user, connect to efsta Portal using the appropriate Username and Password or by using an existing Microsoft or Google account.
Selection in organizational structure
As archiving can be seen per Location or Cash register terminal (EFR), make the selection within the organizational structure in the left side menu.
Data Export
Data export: Location level
On the “Locations” page in the efsta portal, select the location for which you need the data export. Then click on in the location level. A properties window will open in which you must click on the "Data sharing" tab. There you can select a period and create the data release.
A link to exported data and a key to decrypt the exported data are then created.
Copy the password then click on the link to access data.
The download will start. Kindly note that depending on the volume of data to be exported this action can take several minutes. Do not put the tab with the download in the background as it might get into the « Eco mode » which then stops the download.
Download in process
Download finished
Once download is finished, select from the drop down menu the Download type: Fiscal FR = export.xml, the journal containing all proof able document and record types as XML file FR Grand Totals = total.xml, the journal containing all month and year signatures since start of recording (this data is never purged) as XML file FR Journal Archive - .json
Once download type selected in the drop down menu, past the previously copied password and click “OK”.
Downloaded files will be saved by default in “download” folder on local computer.
Data export: EFR level
Search in the efsta Portal under "Fiscal Register" for the EFR for which an export is required. click on – a properties window opens. In the properties window, select the "Data Sharing" tab. You can now select the period for which you want to create the export. On the “Fiscal Register” page in the efsta portal, select the EFR for which you need the data export. Then click on in the EFR level. A properties window will open in which you can select a period and create the data release.
A link to exported data and a key to decrypt the exported data are then created.
Copy the password then click on the link to access data.
The download will start. Kindly note that depending on the volume of data to be exported this action can take several minutes.
Download in process
Download finished
Once download finished, select from the drop down menu the Download type: Fiscal FR = export.xml, the journal containing all proofable document and record types as XML file FR Grand Totals = total.xml, the journal containing all month and year signatures since start of recording (this data is never purged) as XML file FR Journal Archive - .json
Once download type selected in the drop down menu, past the previously copied password and click “OK”.
Downloaded files will be saved by default in “download” folder on local computer.
Content of the export
- export.xml: the journal containing all proofable document and record types as XML file
- total.xml : the journal containing all month and year signatures since start of recording (this data is never purged) as XML file
- .json
- audit.csv: the journal containing audit events (JET) as CSV file
Detailed naming of data file item as well as coding values of the headings used can be found in Chapter Contents of exported files.
Access to archived data on local computer
To access data on EFR locally, use a browser interface to http://localhost:5618/control
Export fiscal data
To export the journal containing all proof able documents and record types as XML file select the period for which you want to create the export and click on “Commence”.
Downloaded files will be saved by default in “download” folder on local computer.
Export Grand totals
Click on “Commence” to export the journal containing all month and year signatures since start of recording (this data is never purged) as XML file.
Downloaded files will be saved by default in “download” folder on local computer.
Export audit events
Click on “Commence” to export the journal containing all month and year signatures since start of recording (this data is never purged) as CSV file.
Downloaded files will be saved by default in “download” folder on local computer.
Export fiscal data, grand totals and audit events as .zip
You also have the possibility to download fiscal data, grand totals and audit events as .zip. To do so, select the period for which you want to create the export and click on “Commence”.
Downloaded zip folder will be saved by default in “download” folder on local computer.
Content of the export
- export.xml: the journal containing all proof able document and record types as XML file
- total.xml : the journal containing all month and year signatures since start of recording (this data is never purged) as XML file
- audit.csv: the journal containing audit events (JET) as CSV file
- Jou zip folder:
- 0000.jou
- 0001.jou
- 0002.jou
- 0003.jou
The number of files depends on the amount of transactions made. EFR will include 1.000 transactions within one journal (*.jou) file then a new file will be created. In the example are three files with 1.000 transactions at each file and the last file will still store transactions. Detailed naming of data file item as well as coding values of the headings used can be found in Chapter Contents of exported files.
Integrity verification tool
Verification Tool "proof.js"
The EFR itself includes methods to check the integrity of the archive/journal. This tool "proof.js" can be copied from /ProgramData/EFR/app/FR/web/proof.js or downloaded from http://localhost:5618/control/proof.js or from efsta Cloud Portal or the check can be done directly at the EFR “controle” page.
It verifies the content of data export files by:
- verifying signatures
- checking the signature chain per DataType
- check file hash
To test the effectiveness of proof.js use a text editor to manipulate a signature value in the input file – proof.js will detect signature and file hash invalidity.
Proof.js error codes:
| Code | Severity | Description | Exit |
|---|---|---|---|
| #FILENAME | abort | Filename to be specified as start parameter | 2 |
| #OPEN | abort | Cannot open file specified | 3 |
| #FORMAT | error | Line is not a valid XML element | 1 |
| #ERROR | error | Unexpected runtime error | 1 |
| #ES256 | error | Incompatible input file (“alg“:“ES256“ expected) | 1 |
| #EC | error | Incompatible curve (NIST P-256 expected) | 1 |
| #CHAIN | error | “Payload“: predecessor signature mismatch | 1 |
| #CERTIFICATE | error | “_“:“certificate“ missing | 1 |
| #PAYLOAD | error | “Payload“: missing in line | 1 |
| #SIGNATURE | error | “Signature“: missing in line | 1 |
| #VERIFY | error | Line signature verification failed | 1 |
| #SIGN | error | “Signature“: invalid length (base64url 86 bytes) | 1 |
| !CONTINUED | warning | First “Payload”: with unknown predecessor signature | 0 |
Journal File Verification "proofjou.js"
This program is automatically contained in jou*.zip when an export of local journal archive is performed (alternatively run from …/ProgramData/EFR/app/FR/web) or when entering the EFR on localhost:5618/.
Checks performed on .jou files:
- file checksum
- structural integrity
- gap lessness of sequence number SQ
- signature chain per DT
- signature verification against fiscal.cer
- in –expert mode analysis of transaction amounts
- and gap lessness of TN, DN per DT
proofjou.js errors and warnings
Following errors (#...) and warnings (!...) may be reported:
| Code | Name | Description |
|---|---|---|
| #LIC | File checksum error | May be caused by exception during operation or modification |
| #PARSE | Data parsing error | May be caused by execption during |
| #AUDIT | Audit message | Important selfcheck event |
| !INCR |