-
Notifications
You must be signed in to change notification settings - Fork 255
Open
Labels
Description
As far as I can tell, python-jose supports PKCS#1 v1.5 for key transport:
https://github.com/mpdavis/python-jose/blob/99ec142374a6eb98e32be5b8cdfd72508fd404d4/docs/jwe/index.rst#supported-key-management-algorithms
and:
Lines 84 to 97 in 99ec142
| expected_header = {u"alg": u"RSA1_5", u"enc": u"A128CBC-HS256"} | |
| jwe_str = "eyJhbGciOiJSU0ExXzUiLCJlbmMiOiJBMTI4Q0JDLUhTMjU2In0." \ | |
| "UGhIOguC7IuEvf_NPVaXsGMoLOmwvc1GyqlIKOK1nN94nHPoltGRhWhw7" \ | |
| "Zx0-kFm1NJn8LE9XShH59_i8J0PH5ZZyNfGy2xGdULU7sHNF6Gp2vPLgN" \ | |
| "Z__deLKxGHZ7PcHALUzoOegEI-8E66jX2E4zyJKx-YxzZIItRzC5hlRir" \ | |
| "b6Y5Cl_p-ko3YvkkysZIFNPccxRU7qve1WYPxqbb2Yw8kZqa2rMWI5ng8" \ | |
| "OtvzlV7elprCbuPhcCdZ6XDP0_F8rkXds2vE4X-ncOIM8hAYHHi29NX0m" \ | |
| "cKiRaD0-D-ljQTP-cFPgwCp6X-nZZd9OHBv-B3oWh2TbqmScqXMR4gp_A" \ | |
| "." \ | |
| "AxY8DCtDaGlsbGljb3RoZQ." \ | |
| "KDlTtXchhZTGufMYmOYGS4HffxPSUrfmqCHXaI9wOGY." \ | |
| "9hH0vgRfYgPnAHOd8stkvw" | |
| actual_header = jwe.get_unverified_header(jwe_str) | |
| assert expected_header == actual_header |
at the same time, pyca/cryptography doesn't guarantee side-channel safety of their decryption API:
pyca/cryptography#5510
pyca/cryptography#5600
pyca/cryptography@1ac4759
which means that python-jose with PKCS#1 v1.5 is insecure
Reactions are currently unavailable