On Wed, Sep 18, 2024 at 01:50:20PM -0700, Sophie Schmieg wrote:
> On Tue, Sep 17, 2024 at 1:20 PM Ilari Liusvaara <[email protected]>
> wrote:
> 
> >
> > In case of signed JWT, the very first thing that needs to be parsed out
> > is "iss".
> >
> > ... Which is a bit problematic.
>
> Yeah, I somewhat intentionally did not mention iss, because yeah, it is a
> bit problematic, and forces the "authorization decision passed down to
> downstream system" as a pattern.

Dedicated JWT validation code could callback to map issuer name to
keyset. But that runs into bit annoying function color issues in many
laguages (fortunately synchronous factorization does not seem to be too
bad)...


> > Unfortunately, that runs into problems with pre-hashing.
> >
> > Currently, that only gets problematic for RSA, but supporting pre-hashed
> > ML-DSA would also introduce the problem there.
> >
> > ECDSA has essentially fixed prehash (ok), and EdDSA in COSE/JOSE does
> > not support pre-hashing.
> >
> 
> I'm not sure I follow. The hash function used with a signature scheme is
> part of the signature scheme as well, and so the public key should allow
> you to derive that information. Several common public key serialization
> formats unfortunately do not properly include the hash function, maybe that
> is what you are referring to? Or do you have a system where the decision
> which hash function to use is taken independently of the decision of which
> key to use? In that case, yeah you have lots of incompatibilities,
> especially in the case of ML-DSA where the hash function is fixed to
> SHAKE256, and has to be prefixed with a hash of the public key, but I'm not
> sure why the algorithm has to be part of the token to enable this use case.

Because public keys frequently fail to include hash function, one would
have to deduce the hash function from the key itself.

That works in practice for ECDSA, EdDSA and HSS-LMS. But it does not
work for RSA (then there is the PSS versus PKCS#1 v1.5 stuff...).

For ML-DSA, supporting pre-hash mode breaks deducing hash function.




-Ilari

_______________________________________________
COSE mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to