News for hackers. Stuff that matters.
Re:BearSSL – Smaller SSL/TLS by stavros on Thursday November 03, 2016 @01:30PM (#12866040)
I very badly need a TLS library in my embedded firmware so I can accept new firmware updates over HTTP.
Re:BearSSL – Smaller SSL/TLS by rthille on Thursday November 03, 2016 @02:06PM (#12866388)
You don't need TLS for that, you could simply use an HMAC and a shared secret, assuming you're not worried about people with physical access (and ability to get the secret) being able to create updates. Of course if you've got multiple instances of the device (not some hobby thing where they are all owned by you), then the secret for each device should be different so someone can't buy the device, determine the secret and then push updates to other people's devices.
Re:BearSSL – Smaller SSL/TLS by conradev on Thursday November 03, 2016 @02:13PM (#12866445)
Wouldn't signing each release with a private key be the simplest solution here?

(that can take many forms, but that general idea is how most software updates currently work)

Re:BearSSL – Smaller SSL/TLS by revelation on Thursday November 03, 2016 @07:09PM (#12868912)
RSA means big integer which means unhappy performance on devices that often don't even have floating point in hardware. I think elliptic curve could be faster?
Re:BearSSL – Smaller SSL/TLS by erichocean on Thursday November 03, 2016 @07:25PM (#12869030)
> I think elliptic curve could be faster?

Yes, EdDSA is faster, with 64 byte signatures. Recommended.

https://en.wikipedia.org/wiki/EdDSA

Re:BearSSL – Smaller SSL/TLS by adrianN on Thursday November 03, 2016 @04:28PM (#12867638)
Verifying a signature is not the simplest thing to do on hardware that doesn't even support a normal OS.
Re:BearSSL – Smaller SSL/TLS by conradev on Thursday November 03, 2016 @07:20PM (#12868999)
I see, that makes sense. Let's say you implement verification as:

1. Hashing the incoming data

2. Decrypting an attached signature

3. Verifying the decrypted and calculated hash are the same

Even though Step 2 would involve RSA or ECC, wouldn't Step 1 be the most expensive part regardless?

Re:BearSSL – Smaller SSL/TLS by baby on Thursday November 03, 2016 @05:15PM (#12868013)
Yup you are right.
Re:BearSSL – Smaller SSL/TLS by captn3m0 on Thursday November 03, 2016 @02:50PM (#12866804)
Not a very good idea, for the very reasons you point out. Signed releases with public keys, as conradev points out below is the far better approach.