Closed MicahParks closed 2 years ago
The OtherPrimes
R
field was being assigned the R
field on CRTValues
, but the RFC for that field wanted the prime factor
, not the product of primes prior to this (inc p and q).
See 8d59d93bb66c873d3d40f1f444c009ee1b814e27
In this snippet of code there is a
TODO
that needs to be addressed. https://github.com/MicahParks/jwkset/blob/f4551a14867564cd46401777c4bfc2977f6ecccf/marshal.go#L305-L331When I generate a multi-prime RSA key with the below function call:
I can see that the
private.Primes
field is a slice with a length of 5 andprivate.Precomputed.CRTValues
field is a slice with a length of 3.However, the current project does not unmarshal back into this
private.Primes
field correctly.