I believe that the verification of a checksum for a DataObject with xmlData doesn't follow the specification. From BSI TR-ESOR-F, 1.2.2:
The subject of the checksum calculation is the Base64-decoded payload data object for <binaryData> elements and the XML data canonicalized pursuant to the <packageHeader>/<CanonicalizationMethod> for <xmlData> elements.`
Based on the specification, the checksum should be computed over canonicalized content of xmlData, with the canonicalization method http://www.w3.org/2001/10/xml-exc-c14n# from packageHeader. Canonicalized content of the xmlData is in the attachment canonicalized.txt, it starts with
The SHA-256 checksum of canonicalized.txt is d13c5a91f88a296b32c212c0b31d056e50b3f635d6db0ad6708c26d595a00605. This checksum is in the XAIP, but it was marked as invalid in the report. I also have a signature over the data computed by a third party, that contains this checksum.
I don't see any usage of the canonicalizer in the process, I don't think the data are canonicalized. As a result, the checksum doesn't match and it's reported as invalid.
I believe that the verification of a checksum for a
DataObject
withxmlData
doesn't follow the specification. From BSI TR-ESOR-F, 1.2.2:Given XAIP xaip-with-xml-data.txt with an xmlData and a checksum,
using a call
the tool generetes a verification report with result
checkSumInvalid
. I will try to claim that the checksum is correct.Based on the specification, the checksum should be computed over canonicalized content of
xmlData
, with the canonicalization methodhttp://www.w3.org/2001/10/xml-exc-c14n#
frompackageHeader
. Canonicalized content of thexmlData
is in the attachment canonicalized.txt, it starts withThe SHA-256 checksum of
canonicalized.txt
isd13c5a91f88a296b32c212c0b31d056e50b3f635d6db0ad6708c26d595a00605
. This checksum is in the XAIP, but it was marked as invalid in the report. I also have a signature over the data computed by a third party, that contains this checksum.--
I checked how the checksum it computed by the tool. A added a debug output near https://github.com/de-bund-bsi-tr-esor/tr-esor-AIP-eIDAS-SigValidator/blob/14ae0b01dac99080d305787021085cdaef38fc4e/default-syntax-validator/src/main/java/de/bund/bsi/tresor/aip/validator/syntax/validators/DataObjectSectionValidator.java#L113 The tool computed the checksum over the content returned by
AIPUtil.extractXmlData()
:I don't see any usage of the canonicalizer in the process, I don't think the data are canonicalized. As a result, the checksum doesn't match and it's reported as invalid.
What I think must be done: