Skip to content

Wrong decryption key for ECDH with keywrap #1951

@max4t

Description

@max4t

Hello,

I believe there's an error in the implementation.

// on decryption we get the public key from the EPK value see: https://datatracker.ietf.org/doc/html/rfc7518#appendix-C
var ecdhKeyExchangeProvider = new EcdhKeyExchangeProvider(
key as ECDsaSecurityKey,
validationParameters.TokenDecryptionKey as ECDsaSecurityKey,
jwtToken.Alg,

The second argument of EcdhKeyExchangeProvider should be the public key taken from the epk in the token's header (as the comment said).

Metadata

Metadata

Assignees

Labels

BugProduct is not functioning as expectedCustomer reportedIndicates issue was opened by customerIdentityModel8xFuture breaking issues/features for IdentityModel 8xP1More important, prioritize highly

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions