Questions tagged [xml-dsig]

XML digital signature is a standard for representing digital signatures as XML. While it can be used to sign other data, it is mainly used to sign XML documents.

XML digital signature is defined in XML Signature Syntax and Processing.

The standard mainly covers the following topics:

  • signature representation

  • definition of signed data

  • key references

  • signature generation process

106 questions
7
votes
1 answer

Java - Create XML Digital Signature using ECDSA (Elliptic Curve)

We can create XML Digital Signature using RSA keys. But how do I use elliptic curve keys to sign xml files ? I get error messages such as - Exception in thread "main" java.security.KeyException: ECKeyValue not supported at…
user2531191
  • 579
  • 10
  • 27
7
votes
1 answer

xmlsec fails to verify signature

I am trying to verify XML (attached on the bottom of the question) signature with xmlsec1 utility. However, when executing a command xmlsec1 --verify test.xml I am getting following stack…
Artur Rychlewicz
  • 495
  • 6
  • 16
7
votes
1 answer

JAXB Marshalling with xmldsig Signature

Is it possible to create jaxb marshaller which automatically adds digital signature to xml content. For example if I have a class which is defined: @XmlRootElement @XmlAccessorType(XmlAccessType.FIELD) public class Test { @XmlElement …
wojtek
  • 493
  • 1
  • 7
  • 12
7
votes
2 answers

How to sign only specific part of XML

I am trying to do some XML Signature by signing only parts of the xml however after much searching I have not been able to find a solution. I am using java to sign an XML using Xpath2 transform and EXCLUSIVE canonicalization. If I have the following…
Alexandre Thenorio
  • 2,288
  • 3
  • 31
  • 50
6
votes
0 answers

Signature validation false

I'm try to verify signature like this (it's PARes from Mastercard) and receive false every time, but xml from VISA work ok Mastercard
koa73
  • 861
  • 2
  • 10
  • 27
4
votes
2 answers

XMLDSig: Do I have to specify Reference URI in an enveloped signature

Suppose I have such xml: Empire Burlesque Bob Dylan USA
mdzh
  • 1,030
  • 2
  • 17
  • 34
4
votes
2 answers

XML signature with using xmlsec1

I tried to use the following command to sign my testing xml with the P12 private key, and got the following errors: xmlsec1 --sign --output tested.payload.xml --pkcs12 SenderCert/sender.p12 --pwd password tested.xml Error: failed to find default…
Alex_C
  • 41
  • 2
4
votes
1 answer

How to verify signatures of XML File in C# with (not cert file)?

i am making some codes for goverment billing system and after reading for some weeks i reached a dead end. I need to validate at least two signatures inside a xml file i receive from a server, i had made some code based on public MSDN to verify…
Glas
  • 169
  • 1
  • 3
  • 12
4
votes
1 answer

PHP DSA Signature Conversion from DER ASN.1 to XMLDSIG P1363

I am writing a PHP app (acting as a SAML IdP) which is trying to do a login via a SAML Response to a server (acting as the SAML SP. I am currently stuck with the server rejecting the request (I just get a 500 Bad Request). I have written a test app…
Torid
  • 4,176
  • 1
  • 28
  • 29
3
votes
2 answers

C#- How to sign certificate XML document without URI attribute on tag?

It is possible to sign a XML document without passing the URI attribute to the tag? I was able to sign the entire XML document of type using KeyInfoX509Data certificate and XAdEs format using C#. The signature is valid,…
3
votes
1 answer

How to verify xmldsig signature using java.security

I need to verify document with enveloped xml-dsig signature using java.security package. After loading I unmarshal document and have object of Signature according to xsd - http://www.w3.org/2000/09/xmldsig# Then: @Service public class…
Daria Bulanova
  • 547
  • 1
  • 5
  • 16
3
votes
1 answer

XML Digital Signature: How is the digest value calculated for same-document reference URIs?

My XML digital signature has the following excerpts:
SkypeMeSM
  • 3,197
  • 8
  • 43
  • 61
3
votes
1 answer

What exactly to digest and sign on XMLDSIG and how? (or, OSX-native client mismatches XMLDSIG calculated on server)

I'm trying to sign a xml document following XMLDSIG specification with an enveloped signature, sha1 digest and rss-sha1 signature, and the server keeps returning a "297 - Rejection: Signature does not match calculated [result]" ("297 - Rejeicao:…
TarqTeles
  • 41
  • 7
3
votes
1 answer

javax.xml.crypto custom CanonicalizationMethod for old specefications

I'm trying to validate xml signed with But I get an exception: javax.xml.crypto.MarshalException: java.security.NoSuchAlgorithmException: no such algorithm:…
xander27
  • 3,014
  • 8
  • 30
  • 42
3
votes
1 answer

How can I sign various XML elements and also sign their parent?

in a SOAP webservice I'm trying to consume there's the necessity of sending a XML with a structure that resembles this: 1
fiatjaf
  • 11,479
  • 5
  • 56
  • 72
1
2 3 4 5 6 7 8