-
Notifications
You must be signed in to change notification settings - Fork 78
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
Secure random seed from Spark Cloud #25
Conversation
There are only 5 bytes left in the credentials, so an attempt on any future hardware that might support 64-bit integers to use sizeof(seed) would read past the end of the credentials buffer. For future reference, there would be very little cryptographic risk in starting the seed at offset 32 and allowing 8 bytes, duplicating use of the initial message ID and token bytes as part of the seed. However, there is no need to do so at this time.
@andyw-lala said
Sure, that's pretty much how it would be - a seed is sent as part of the handshake. The only change is that in the PR the seed is always used to call |
@towynlin - my preference is for the weak function rather than any of the other syntaxes - it's going to be a niche case and not used by 99% of people so I feel no need to dress it up! Will this change work against older versions of the local cloud? |
Yes. No cloud changes required. Just using some secure random bytes already being sent by the cloud but not currently being used by the core. |
Awesome, thanks, I was guessing the plaintext was padded with random bytes, but wanted to be sure. |
The random bytes can cover the entire gamut of values, correct ? They are On Tue, Sep 2, 2014 at 10:43 AM, Matthew McGowan notifications@github.com
Andy |
Yes, secure random byte values 0-255. |
…ion. this function as weak linkage so that user code can redefine and override this behavior.
I assumed `make test` built the test suite using the libcore-communication-lib.a + headers. "assumptions are bad, mkay?"
… I don't fully understand why - theory is that a weak declaration in the header seems to stop the linker binding the implementation given.
Secure random seed from Spark Cloud
Also, when particle-iot-archived/core-communication-lib#25 is merged, then the user will automatically have a secure random seed after handshaking with the Spark Cloud.
@m-mcgowan did somebody force-push to master after this got merged? I can't find these changes in the latest master branch and the history of spark_protocol.cpp shows its last commit at August 1st instead of the merge on September 4th. |
Github is telling me that the commit is available in the feature/hal branch. I'm not sure why it's not in master, but probably that's a good thing since it was intended as a development change. (It's since migrated to the merged repos in the develop branch of spark/firmware.) I hope that helps, sorry I can provide more specific info. |
No description provided.