Hi all, I was wondering whether it might be possible for someone to put together a page or two in the documentation site which covers all of the security in the spark? For example, what role does the core ID play, is there end-to-end encryption between the cloud and the spark or do I need to use SSL/https? Is there any way of securing the spark once deployed in the field to prevent hardware hacking by malicious entities or competitors (I know PICs have a firmware switch which prevents code extraction)?
I’m sure there are many other such security areas we all want to know about. Any further suggestions welcome.
1.) Spark <<----->> core communication has been encrypted at 128-bit right from day 1
128-bit encryption
From Kickstarter:
The Core, the Cloud, and the entire Spark development platform is secured with industry-standard AES (on the hardware side) and SSL (on the API side) encryption to keep all your wireless communications in the right hands.
But not sure if it is a must for SSL on the cloud or at least the local
2.) You need access token in order to even communicate with the core. Also, the core is already programmed to hit the right server ip with a correct server public key.
It just doesn’t make sense to me that someone can ever hack it
I’m sure @Dave will be happy to put together some official docs once we have some spare time
Your core’s unique public/private keypair is associated with its unique core id, and the core has a stored copy of the server’s public key. I believe the stm32 has flags that let you protect certain regions of flash, and it’s how we protect the bootloader from being accidentally overwritten, so I would think you could use that to protect your firmware as well.
Good question! Anything you send to your core via the HTTPS secured API is sent to your core over an encrypted CoAP session. When you open and send your own packets via custom TCP / UDP sockets, anything you send is going over in the clear, unless you’re encrypting it yourself. This is because TCP / UDP sockets are a lot like plumbing, they’re just making a connection, they don’t bring their own security. You can absolutely bring your own encryption since you have full control, and you can make more secure HTTPS requests with webhooks.
So how do I do encryption/decryption on the fly? Is there a library built in? Will the local cloud bring an end-to-end encrypted pathway between my server and my Spark core without relying on the Spark cloud?
If you’re using the local cloud, then you can write any kind of code running on that machine or elsewhere on the internet, and use the existing secure connection to the core definitely.
A couple more code examples of this sort of stuff in the documentation would be very handy, but I understand you’re still crushing big bugs with OTA/CFOD right now