Rsa Key

187 views
Skip to first unread message

Guilherme Wenclaski Tutilo

unread,
Jan 29, 2016, 5:54:05 AM1/29/16
to xmlseclibs
To Confirm Key x509 I use the method $ objKeyInfo- > getX509Certificate ()
and the file looks like this:

<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
           
<ds:SignedInfo>
               
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
               
<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
               
<ds:Reference URI="#pfx4067e70d-5632-1d56-4435-d962996dfb9b">
                   
<ds:Transforms>
                       
<ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
                       
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
                   
</ds:Transforms>
                   
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
                   
<ds:DigestValue>gxK9NFgypPKBJN9npiBexaOt5rA=</ds:DigestValue>
               
</ds:Reference>
           
</ds:SignedInfo>
           
<ds:SignatureValue>Vx7XyvDlqtz6NpbU...</ds:SignatureValue>
           
<ds:KeyInfo>
               
<ds:X509Data>
                   
<ds:X509Certificate>MIIDHDCCAoWgAwIBAgIJALJb...</ds:X509Certificate>
               
</ds:X509Data>
           
</ds:KeyInfo>
       
</ds:Signature>

to do the same validation for the RSA KEY which method I use ?
and the file looks like this:
<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 URI="#ILD9714-2016-01-27">
                   
<Transforms>
                       
<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
                       
<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
                   
</Transforms>
                   
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
                   
<DigestValue>gdtDzX34Cin733MTK/EL/Nq388w=</DigestValue>
               
</Reference>
           
</SignedInfo>
           
<SignatureValue>K8XE46KL/Q0PQzRMjPs...</SignatureValue>
           
<KeyInfo>
               
<KeyValue>
                   
<RSAKeyValue>
                       
<Modulus>qo8U4EkyUc6SSqchYPX...</Modulus>
                       
<Exponent>AQAB</Exponent>
                   
</RSAKeyValue>
               
</KeyValue>
           
</KeyInfo>
       
</Signature>

I put three points because the key is too large
Reply all
Reply to author
Forward
0 new messages