Why requiring --certificate when verifySignature?
Ian Young
ian at iay.org.uk
Thu Oct 8 16:45:50 UTC 2020
> On 2020-10-08, at 12:00, Weiwu Zhang via dev <dev at shibboleth.net> wrote:
>
> If the certificate is already in the XMLDSIG, the tool only need to
> validate if the signature matches the key provided in the certificate
> in the signature, right?
You need some external trust root to be provided for the signature to be anything other than an indication of integrity.
To use a signature as an indication of _authenticity_, you need to provide an _external_ indication of the key associated with the expected signing entity. That's why you provide an external credential (from a certificate, a PKCS#11 token or a Java keystore).
> Adding --certificate only make sure that the signature is validated
> against the pubkey contained in the --certificate, instead of the one
> contained in the certificate in the XMLDSIG. Which IMHO doesn't make
> it a mandantory parameter.
Well, if you trust the credential included in the signature, you're open to being fed a document signed by an attacker who uses an arbitrary key and wraps it in a self-made certificate. As I say above, you might argue that this would give you integrity protection but it's useless for verifying authenticity, which is what we're interested in here and what xmlsectool is designed to provide.
-- Ian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/dev/attachments/20201008/6dbc4ad9/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3883 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/dev/attachments/20201008/6dbc4ad9/attachment.p7s>
More information about the dev
mailing list