2

Having a XAdES-BES signature with the signed content embedded inside, is it possible to detach the signed content, so that one will have the XAdES with ObjectReference instead.

So to put it simple - I need a method that takes a XAdES with embedded file, and returns the file and XAdES referencing the file (so that the file is no longer embedded in the XAdES).

I was trying to figure out a way using XAdES4j with no result.

Thanks in advance for answering!

gnom1gnom
  • 735
  • 7
  • 15
  • Do you want to preserve existing signature? – Eugene Mayevski 'Callback Nov 24 '12 at 13:47
  • @Eugene Mayevski 'EldoS Corp I'm not sure what do you mean by "preserve". I don't want to extract the signed file and re-sign it, since I don't have the private key. I want to preserve the existing signature, so that after separating signatureValue and signed content into two files, the signature will still match the file. – gnom1gnom Nov 30 '12 at 22:38

1 Answers1

4

You can easily extract the signed file from XAdES signature, but you cannot convert a enveloping signature to detached one.

Signed content is referenced in SignedInfo by reference uri, and since SignedInfo element is "signed", you cannot change that reference without breaking the signature value.

Cigiller
  • 84
  • 1
  • 1
  • 7