Question

XML-DSig describes 3 positions where the signature of an XML document can be placed relatively to the XML document : the signature can be detached, enveloping, enveloped

What are the implications in terms of performance of these three options?

Was it helpful?

Solution

Detached will be a bit more efficient, but the difference is minimal (of course it depends on document size - with a 100Mb document the difference would be larger, than with small XML blocks).

OTHER TIPS

Since XMLdSig is not written keeping in mind that performance or file size can be a problem; streaming is not possible. With large data to be signed, it really is a problem, since DOM objects eat lots of memory, believe me. Enveloping or enveloped does not matter in this respect.

This is where detached signatures shine. Signature itself is not that large, and data to be signed can be streamed, since you only need hash of it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top