pyjwkest icon indicating copy to clipboard operation
pyjwkest copied to clipboard

ECKey serialize may create invalid JWKS parameters

Open schlenk opened this issue 5 years ago • 0 comments

Take a key for P-256 with x=24014791858128669844935517199947753409425201576699879295797457599559336031L

The jwkest.long2intarr() method turns that into an array of just 31 instead of 32 octets, which is too short for the base64 encoded value put into a JWKS file.

This can lead to problems when other libraries try to use that key, the pyjwkest library roundtrips it just fine.

schlenk avatar Aug 04 '20 16:08 schlenk