Five Principals for of embedded security
Message
Off course this is what you want to protect from intruder.
Integrity
Original message sent from sender should not altered when received by receiver.
Authentication
Message should be received from intended sender party.
Authorization
Sender of message should have be authorized to execute some action on receptor
Anti-replay
A valid message should not be used again by intruder to carry out malicious activities
Nonreduating
Sender of message should not able to disown the message.
Encryption types
Symmetric key cryptography
- Simple
- Fast
Asymmetric (public key cryptography)
- More failsafe
- slower
Algorithms security levels
- MD5 Unsecured
- SHA-1 Unsecured
Hash functions
Consistency
Get same value for same input
compression
Compress large data into small output range
Lossiness
We loose information from input to output.
Threat modeling
What we are building
What can go wrong
How we mitigate it
How well we done our job.
STRIDE for finding threats
GPG
GPG key usage
- I want anyone receiving my email to know that I cannot repudiate it. Sign my message with private key.
- I want to verify message I received is sent by person who say he is. Verify the signature by senders public key.
- I want to send message which only intended recipient can read. Encrypt message with recipient public key.
- I want to read message i received. Decrypt message with your private key.
FOTA
Firmeware over the air. For IOT devices we need to update the firmware on the field.