Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8493215
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T22:56:37+00:00 2026-06-10T22:56:37+00:00

I have 2 signature file that only different in namespace. Both these file provide

  • 0

I have 2 signature file that only different in namespace. Both these file provide the same message digest. I use the same key to sign with the same algo RSA-SHA1. But there are 2 different signature. I think that as long as the message digest, key and algo is the same, the signature should be the same, no matter how the origin file is.

I use python-xmlsec1 lib with openssl1.0.1.

The first file with namespace:

<?xml version="1.0" encoding="UTF-8"?>
<myns:MyElement xmlns:myns="urn:abc" ID="1">
    <myns:SubElement AssertionID="2" attr1="value1"/>
    <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
        <ds:SignedInfo>
            <ds:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"/>
        <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
        <ds:Reference URI="">
            <ds:Transforms>
                <ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
            </ds:Transforms>
            <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
            <ds:DigestValue>zzIulx6UyIN9BrYp0gpW9cCx05k=</ds:DigestValue>
        </ds:Reference>
    </ds:SignedInfo>
    <ds:SignatureValue>Gpcf/Yy1U9M6jvQL024pfMNHqB0+3kpUvFK9XF8wglgKIo9kPi2eyZ0qDEBm93ecXD1CfHLyHZc3gKR4cMsfobOkWDCoT5VA6FYwjyASnGlEyJE7dpvqU1BE7wDuCxDznI1NQsRTw4Ix8jFx20Cd91bbDibYG8Fn9ACVZdHRo=</ds:SignatureValue>
    </ds:Signature>
</myns:MyElement>

The second file with no namespace:

<?xml version="1.0" encoding="UTF-8"?>
<myns:MyElement xmlns:myns="urn:abc" ID="1">
    <myns:SubElement AssertionID="2" attr1="value1"/>
    <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
    <SignedInfo>
        <CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
        <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
        <Reference>
            <Transforms>
                <Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
            </Transforms>
            <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
            <DigestValue>zzIulx6UyIN9BrYp0gpW9cCx05k=</DigestValue>
        </Reference>
    </SignedInfo>
    <SignatureValue>gs3U/ea2KmLbAy5Tle0196W+AcW7ftS2POgZHYaGLUX0QgPXRx5+a0ZhJ4d0NitzaTgXQtnPaMfqcsw8ZMBEQxYLdeulErtosX5bpiOt9SQpbRre7hB8VJPjb2ZT+Vu5V4SkAf1LI624JjeVUr0xrSjoCSP5ppxW87gQDPU=</SignatureValue>
    <KeyInfo>
        <KeyName/>
    </KeyInfo>
</Signature>
</myns:MyElement>

Both file can be verified by the xmlsec (given the public key).

Could anyone please explain how this can occur?

Many thanks,

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T22:56:38+00:00Added an answer on June 10, 2026 at 10:56 pm

    I see that the signature value does not depend on digest value only. it is calculated based on the whole SignedInfo node.
    http://www.mismo.org/files/InformationSecurityGuidelines/XML_Signature_Section_for_General_I-Guide-1.pdf

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So these two methods have the same signature but different constraints public static void
Both are delegates and have the same signature, but I can not use Action
if i have both encrypted message and signature (let's say two different size files),
When I validate a signature, that I have created before using the same keystore
I have to verify the signature on a file that may be as large
I have a data file, a signature file (created by the GnuPG) and a
Can anybody tell me how to add signature in jar file. I have developed
I have a DER file with sha1RSA as the Signature Algorithm . I have
I have an application that compared an xml file to a text file, and
My Task: I have a Java Application that writes text files. These files should

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.