title: Comparing a SAML response with RSA Key to IDP metadata with x509
body: <p>I am trying to debug a SAML configuration. I am setting up a SP and was provided with metadata that includes an X509 certificate. The SAMLResponse that I get from the IDP have an RSAKey. I am assuming that the modulus of both should match (as well as the modulus of the private key which I dont have access to).</p>
  
  <p>Using openssl, I can get the modulus and modulus md5:</p>
  
  <pre><code>$ openssl x509 -in idp.crt -modulus -noout
  Modulus=CB123123
  $ openssl x509 -in idp.crt -modulus -noout | openssl md5
  5a562
  </code></pre>
  
  <p>The x509 Exponent: 65537 (0x10001)</p>
  
  <p>The SAMLResponse has a modulus and exponent</p>
  
  <pre><code>        &lt;KeyValue&gt;
              &lt;RSAKeyValue&gt;
                  &lt;Modulus&gt;
                      wb3JBTztiDtGQ
                  &lt;/Modulus&gt;
                  &lt;Exponent&gt;ABC&lt;/Exponent&gt;
              &lt;/RSAKeyValue&gt;
          &lt;/KeyValue&gt;
  </code></pre>
  
  <p>How can I confirm if the x509 certificate modulus matches the RSA modulus / what format is the SAMLResponse modulus? </p>