-
Notifications
You must be signed in to change notification settings - Fork 25
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
EC2: Allow creation with x only (for compact applications) #57
EC2: Allow creation with x only (for compact applications) #57
Conversation
Yes, this is something we definitely need to include in the pycose library. I'll prepare a PR (including this commit) that updates the test vectors so they pass and answers some of your FIXME comments in the code. |
To elaborate on the second point: The EC2Key init is accepting the curve as Consequently, when I later look up the curve, I have to do There may be merit to accepting all these types, but I don't think there is merit to allowing The right thing to do IMO would be to pass crv through But I can open a PR for something along these lines to actually change this once this is merged (so we don't open up conflicts). |
Hi @chrysn, your explanation makes a lot of sense. You are right, it is a bug and I definitely intended to store the |
On second thoughts, I think this bug was already fixed in master but it was not released on PyPi. Thus In the Line 88 in a4da657
Line 116 in a4da657
|
@TimothyClaeys , It seems that code in Git is not in sync with PyPi for the same version number 0.9.dev5. May be version number needs to be incremented in Git and latest package needs to be pushed to PyPi. Thank you for developing such a nice library. |
Thanks @sanghvibk, I bumped the version and uploaded everything to PyPi. |
@chrysn I cherry-picked this commit and put it on top of the ongoing work on the |
Something like this is essential for getting cipher suites 2-3 running in pyedhoc.
The FIXMEs in the code primarily represent questions I have about the style of pycose:
Union[Type['CoseCurve']
type input is a bit hard to use (as seen by theif crv in
part), and it doesn't seem like it is resolved even on the path to the final object. Is there any harm in giving CoseCurve some copy-constructor like behavior that'd allow us to just pass that union type throughcrv = CoseCurve(crv)
once and be done with it?(This has been tested as a part of a py-cose branch, but not interop'd; only the fact that if I swap around any key endianness the later curve point import to openssl fails makes me relatively confident that the reconstruction does work out).