-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sans cstruct #66
base: master
Are you sure you want to change the base?
sans cstruct #66
Conversation
let x = x_cs |> U_Base64.url_encode_string in | ||
let y = y_cs |> U_Base64.url_encode_string in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't need a pipe here anymore
I looked into the "jose doesn't produce the same signature" -- and this has been the case as well earlier (taking a look into mirage-crypto-ec 0.10.0, and RFC 7515 A.3.1 and A.4.1 testcases - the R and S aren't the same). I don't understand from the RFC how the ECDSA signature is supposed to happen -- mirage-crypto-ec computes a deterministic In case you've some more insight - how ECDSA is supposed to happen in jose (or how the |
note, I also read through RFC 7518 and couldn't find any remark how |
Talking about your test case failure, JTW.10 "Can validate my own EC JWT (pub es512)" -- this is failing with this branch. The underlying reason is mirage/mirage-crypto#230 - which actually fixes test cases ;) On your side, you'll need to update your Fixtures.ml: --- a/test/Fixtures.ml
+++ b/test/Fixtures.ml
@@ -144,7 +144,7 @@ let es256_jwt_string =
{|eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiIsImtpZCI6IlVYNHF1OUw3WnlvU0ZDWlJiWGlmWDdhcV94ay1QTGZQaVB5czItS05rQW8ifQ.eyJzdWIiOiJ0ZXN0ZXIifQ.PU5foY53xooRx6PlBUpD9ZPKkDbSEfoXDvBiyTvJAQl2R8ilCglPh_eCSKX6B03SDAh5TcAanche999TBOs31w|}
let es512_jwt_string =
- {|eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzUxMiIsImtpZCI6IjhmVlZQSTczRE9nZ2xKZ0Y0eXIwbkFMRmg2STVMbG9tMVhtdDhoVHVjLVUifQ.eyJzdWIiOiJ0ZXN0ZXIifQ.AWt-F7KxQnLQoCt3AjK9XBznyus1NszsL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iFOGHsGxdrRTgWKjlLKDVk0eSqJ4_zCp0xnUf-Pnzp_B9RreBEsu4RcEi0OEqS0PP1514sncGz7gsFBDfuX6opbIH5bbuhW0GkkkVooxSVkNuEgfBsaZovyo15LcQ8_zpF0nCXa_g6kyCz7KE3thBxC7u3Ex6jrk8fdt80daRn_ZDEpODlD0N6rki2fM4yAMWC6pLYrNZG9h_VIvKK947GsIsMR4CKR0OAsK4cqS3ahR3W49lP66quo6ThK8z5GMFgzlqgzt_A-tbjYmCQp2A110vvKY1U6j_WU2Vn8eHrU1rVdYaOwMlRj5RVbHw" I've no idea how your Fixtures.ml was generated -- or that specific value in there. May be worth to document for the future. |
@hannesm thanks so much for your insights here |
WIP branch for nix-ocaml/nix-overlays#1568