element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Enchanted Objects
  • Challenges & Projects
  • Design Challenges
  • Enchanted Objects
  • More
  • Cancel
Enchanted Objects
Blog Smart Key Hooks – The Design
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: crjeder
  • Date Created: 30 Mar 2015 9:09 PM Date Created
  • Views 1028 views
  • Likes 5 likes
  • Comments 9 comments
  • smart_key_hooks
  • enchanted_objects
Related
Recommended

Smart Key Hooks – The Design

crjeder
crjeder
30 Mar 2015

Let's recapitulate: My Enchanted object consists of a sheet of brushed stainless steel with 5 hooks to hang keys. Magnets are used to stick notes to the board. In this blog post I will (try to) design the application as good as possible. Hopefully this can serve as a framework for my (and others) future projects.

 

User Interface

I'd like to keep the user interface as clean and natural as possible. No additional buttons and no restrictions should be added. The users should be allowed to hang their key on any hook they like and use any free magnet to post messages. The online interface consists of a simple command and return value. Here is a table with the actions a user can do an the effect of that action:

 

User Action

Effect

Remove key

Change status of the respective person to „out“

Hang key

Change status of the respective person to „in“

Request status of person <name>

Return status of person <name>

Remove note

Send „Note removed“ message

Add note

Send „Note added“ message

Update my status LED <colour>

Set the colour of the status LED of the respective person to <colour>

Request full statusController sends all (user permitted) status information
Power resumedSend Power resumed message

 

Use Cases

The information provided by the Key Hook Controller (SAMA5D4) alone is of not much use. But combined with other smart home information it can be very useful:

  • If nobody is at home turn off the central heating
  • If a person signals that it will arrive soon turn it on again
  • If the shed key is returned but the shed is not locked send a message
  • If the children have not left until 7:00 send an alarm (they will be late for school)
  • If a note is removed cross off something of the To-Do list
  • …

 

Normally a smart home controller will be able to take actions like the above. Since my home is not „smart“ I will simulate it with a cloud messaging service and an android app called tasker. This app works like IFTTT – it accepts messages and takes actions. I'll use the SAMA5D4 Xplained Ultra as the controller.

Sensible Data which is Processed

The data we are dealing with is quite personal as it shows a lot about the habits and relation of the people living in the house. The data can be abused in many ways. Most obvious is the use for burglars – they could learn when nobody is at home in order to break in to the house. But with the technology available today much more can be learnt from it. And this data is valuable for corporations and governments alike.

First step into security is to enumerate the data we are dealing with:

From Devices connected to the smart key hooks:

  • user identities
  • connection information
  • passwords
  • meta information (date, time, IP address, coarse location, …)

From the smart key hooks:

  • Presence Status
  • Notes

Now we have established that we need to protect the data from peeping eyes, we'll have a look at how the data is attacked and how we can protect them.

Data flows

The following chapter is a very simple implementation of the Application Threat Modelling from The Open Web Application Security Project (https://www.owasp.org/index.php/Application_Threat_Modeling).

image

Data is generated by the sensors connected to the controller and sent from the clients over the Internet. The Trust boundary is clearly the Internet connection of the controller.

 

Threat Modelling

Threat Modelling tries to describe all relevant attacks on the system. It tries to answer the question where and how your data is endangered by the system / application. Here I will use STRIDE to guide me through the process.

This may seem trivial and for a relatively simple application like this it really is, but it will help to make the right decisions later.

From wikipedia:

STRIDE is a system developed by Microsoft for thinking about computer security threats. It provides a mnemonic for security threats in six categories.

 

The threat categories are:

  •     Spoofing of user identity
  •     Tampering
  •     Repudiation
  •     Information disclosure (privacy breach or data leak)
  •     Denial of service (D.o.S)
  •     Elevation of privilege

So let's jump right into it.

Spoofing of user identity

Users are represented by their key fob which is attached to the key ring. Since users can easily change key fobs / rings technical measures against identity spoofing are not effective. More security would be needed (e. g. PINs / passwords) if rights are attached to key ring identities. On the other hand there is an inherit antipathy of sharing keys even within a family which should be effective against identity spoofing.

Tampering

The program and data is stored in the controller’s flash and RAM which per se is not secure against tampering. Among the security features of the SAMA5D4 is a integrity monitor and a SHA engine. Those can be used to make sure that the content is not changed or to at least to detect changes. Tampering can happen over the network or directly on the hardware by using e. g. the USB ports or removing the flash card. The later is covered by physical security.

Any networked computer is susceptible to “hacking” which can lead to data being changed. To reduce the attack surface the smart key hooks controller does not host any network services. It communicates only with the cloud service to send and receive data.

Malicious clients might send crafted data to corrupt data. Therefore data orginating outside of the trust boundary has to be validated.

Repudiation

The following definition from Wikipedia for Non-Repudiation is relevant to our scenario:

A service that provides proof of the integrity and origin of data

So the threat of Repudiation is to claim that the data is not authentic or is from a different source than claimed. Countermeasures usually require a PKI which is out of scope of this project.

Information disclosure (privacy breach or data leak)

Because of the private nature of the data this the treat which comes into mind first. Of course we do not want our data to be disclosed to any unauthorized party. Not when stored neither when transmitted. End to End Encryption is effective against this attack. One challenge of using encryption is key handling. In this application the user base is small enough to use pre-shared keys without to much disadvantages.

Denial of service (D.o.S)

D.o.S. would be relevant only if we were doing business or some more vital parameters of the house being monitored (like water leakages e. t. c.). Therefore we don't care about this threat here.

Elevation of privilege

Since in a good design all processes have minimal privileges and services delivering information (e. g. web servers) to the untrusted world usually run on least privileges, it's a top priority for a successful attacker to gain additional rights. To protect against this is a difficult task since we will have procedures which need root rights to access the hardware. So I'd try to not let any user data be passed on to procedures with high privileges.

Physical Security

Key hook is inside the house which is trusted for physical security. So no authentication is necessary for interface interaction. The controller board needs to be secured against unauthorized software install. Secure boot and tamper protection can be used for this. Documentation for both features is under NDA so they cant be used in this project. If I can find an other way I'll implement some tamper protection.

  • Sign in to reply

Top Comments

  • crjeder
    crjeder over 10 years ago in reply to mcb1 +2
    Yes, it is https (443). The cloud service woud likely be pushbullet ( https://www.pushbullet.com/ ) Indeed the router / firewall is part of the defense strategy. In later installments I will post more…
  • mcb1
    mcb1 over 10 years ago +1
    Very nicely thought out approach. One question that I admit I haven't googled... Does the cloud service use a particular port for exchange.? If so, can you also lock the router to only allow that port…
  • crjeder
    crjeder over 10 years ago in reply to Workshopshed +1
    Thanks for your tip. I have not thought about this one but will consider it now.
  • crjeder
    crjeder over 10 years ago in reply to clem57

    Thanks will do - tomorrow.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • clem57
    clem57 over 10 years ago in reply to crjeder

    May want to see http://www.element14.com/community/community/designcenter/sama5d3xplained/blog/2015/02/24/sama5d4-xplained-ultra--tips-and-tricks-1--getting-displays-up-and-running

    Clem

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • crjeder
    crjeder over 10 years ago in reply to clem57

    Thank you very much!

    This will hopefully be my last theory only post. But I still struggle with the Xplained board...

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • clem57
    clem57 over 10 years ago

    Well thought out. Nice idea.

    Clem

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
<
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube