-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
cc2538: Add PKA drivers, ECC algorithms and examples #1078
Conversation
a1296f1
to
20e4feb
Compare
Please squash your commits. There are a few things that do not comply to https://github.com/contiki-os/contiki/wiki/Code-Contributions and https://github.com/contiki-os/contiki/blob/master/doc/code-style.c, e.g. the function names, the layout of function definitions like There are a lot of useless double parentheses with For the function pointer parameters, always qualify the pointed type as Always restrict the scope of symbols as much as possible. E.g., It should be In the doxygen comments:
The architecture is good. There are many calls to @alignan: Can you test this after the rework (I do not have hardware)? |
Sure, ping me when it's done |
Sorry for the late response, I was on vacation. I worked on the cc2538 platform as a part of my master thesis. Now, I’m absorbed by another job. I try to do the suggested changes but it will take another week or so. |
@bthebaudeau The API is designed to fit TinyDTLS. For this reason all the structs allocate space. |
b4f02b0
to
78c098e
Compare
Maybe OK for the API/ In your latest push, you have squashed your commits as requested, but you have ignored all the other comments (not only the API/ |
I meant to do the remaining clean up after the rebase. I simply wasn't able reach the required quality yet. How long are you willing to wait? Either way all drivers are publicly available now (https://github.com/hosseinsh/Talos). |
Please take the time you need. There's no hurry. The important thing is that we know what you intend to do. Thanks for your efforts. |
059b040
to
3ce38e3
Compare
@bthebaudeau I finished the rework. Could you please take another look at it? |
@drandreas OK, thanks, will do. Give me a few days. |
@drandreas That's much better! There are still a few things to fix:
|
Thank you for your remarks. I didn't squash the commits to make it easier for you. I will do it at the end. I found five more |
No, it's the macro definitions that have to be made safe by parenthesizing the used parameters, not the macro invocations. Here, the first such occurrence is 4ff1e83 is fine for me, so you can now squash your commits. Thanks. |
c02d74c
to
4ac928a
Compare
@alignan: Could you please confirm the functionality? |
Verified just now and all three examples work, the timing is consistent in every run as well. |
#include <stdio.h> | ||
|
||
void | ||
ecc_setRandom(uint32_t *secret) |
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.
avoid camelcase here
4ac928a
to
d631270
Compare
@drandreas Thanks for your changes. When you push something, please add a comment to the pull request. Otherwise, we don't get notifications, and you might have to wait quite some time before we notice. @alignan Your comments have now been addressed. Anything else to add before merging this PR? |
Nope, it is great to have this as it is now 👍 |
👍 |
cc2538: Add PKA drivers, ECC algorithms and examples
We implemented ECC algorithms and examples following the idea of Benoît Thébaudeau's crypto driver #1071. Our changes in cpu/cc2538/lpm.c do conflict pull request #1071. If both pull request are merged LPM_PERIPH_PERMIT_PM1_FUNCS_MAX has to be changed to 4.