SlideShare ist ein Scribd-Unternehmen logo
1 von 11
Downloaden Sie, um offline zu lesen
How Your Compiler Can Help You Write
Secure Code for Your IoT Device
Jeremy Bennett
IoT London Meeting #63, 21 February 2017
Copyright © 2017 Embecosm. Freely available under a Creative Commons license
Why?
Copyright © 2017 Embecosm. Freely available under a Creative Commons license
Why the Compiler?
C/C++
Java
Assembler
Scripts
Raw machine code
The compiler gets to look at
(almost) all the code
The compiler gets to look at
(almost) all the code
Copyright © 2017 Embecosm. Freely available under a Creative Commons license
How The Compiler Can Help
Warning of bad practice
Advising the programmer when
code appears to follow bad
practice
Providing heavy lifting
Automating complex tasks to
make them easier for the
programmer
Copyright © 2017 Embecosm. Freely available under a Creative Commons license
Leakage Aware Design Automation
The LADA Project
●
EPSRC funded 4 year academic research project
– supported by a team of RAs and PhD students
●
Embecosm is the “industrial supporter”
– providing summer PhD internships
– writing open source implementations for GCC & LLVM
Prof Elisabeth Oswald
University of Bristol
Dr Dan Page
University of Bristol
Copyright © 2017 Embecosm. Freely available under a Creative Commons license
What is Information Leakage
“Information leakage happens whenever a system
that is designed to be closed to an eavesdropper
reveals some information to unauthorized parties
nonetheless.”
Wikipedia
Copyright © 2017 Embecosm. Freely available under a Creative Commons license
Differential Power Analysis
$ time ./dpa 7
real 0m0.025s
user 0m0.024s
sys 0m0.000s
$ time ./dpa 6
real 0m0.086s
user 0m0.084s
sys 0m0.000s
int func (uint32_t k)
{
int i, res = 0;
for (i = 0; i < 10000000; i++)
if (1 == (k & 1))
res += k - 1;
else
{
double r;
r = sqrt ((double) k);
res += (int) r;
}
return res;
}
int main (int argc,
char *argv[])
{
return func (atoi (argv[1]));
}
Copyright © 2017 Embecosm. Freely available under a Creative Commons license
Differential Power Analysis
$ time ./dpa 7
real 0m0.025s
user 0m0.024s
sys 0m0.000s
$ time ./dpa 6
real 0m0.086s
user 0m0.084s
sys 0m0.000s
int func (uint32_t k)
{
int i, res = 0;
for (i = 0; i < 10000000; i++)
if (1 == (k & 1))
res += k - 1;
else
{
double r;
r = sqrt ((double) k);
res += (int) r;
}
return res;
}
int main (int argc,
char *argv[])
{
return func (atoi (argv[1]));
}
Copyright © 2017 Embecosm. Freely available under a Creative Commons license
8-Bit Processor Multiply Instruction
Heat Map
Image: Dr James Pallister, University of Bristol
Copyright © 2017 Embecosm. Freely available under a Creative Commons license
How To Get Involved
●
Contribute code to LLVM, GCC and others
●
Apply for PhD/RA vacancies with LADA
●
Attend compiler community events
●
Join the IoT Security Foundation
●
Talk to Embecosm about your compiler
Thank You
www.embecosm.com
jeremy.bennett@embecosm.com

Weitere Àhnliche Inhalte

Andere mochten auch

Choice Art Group Web Transformation Project
Choice Art Group Web Transformation ProjectChoice Art Group Web Transformation Project
Choice Art Group Web Transformation Project
Benjamin Berman
 
last version of cv
last version of cvlast version of cv
last version of cv
myallkoky
 
Challenges & Opportunitities for Digital TV In Africa
Challenges & Opportunitities for Digital TV In AfricaChallenges & Opportunitities for Digital TV In Africa
Challenges & Opportunitities for Digital TV In Africa
BSP Media Group
 
AIX_Administrator_Prerna Arvind_updated Resume
AIX_Administrator_Prerna Arvind_updated ResumeAIX_Administrator_Prerna Arvind_updated Resume
AIX_Administrator_Prerna Arvind_updated Resume
Prerna Arvind
 
Formalpresentation2
Formalpresentation2Formalpresentation2
Formalpresentation2
Laura Price
 
Audience theories
Audience theoriesAudience theories
Audience theories
lcfcball
 

Andere mochten auch (11)

Choice Art Group Web Transformation Project
Choice Art Group Web Transformation ProjectChoice Art Group Web Transformation Project
Choice Art Group Web Transformation Project
 
Small business
Small businessSmall business
Small business
 
last version of cv
last version of cvlast version of cv
last version of cv
 
The 10 Most Common Mistakes in Social Media Marketing and How to Avoid Them
The 10 Most Common Mistakes in Social Media Marketing and How to Avoid ThemThe 10 Most Common Mistakes in Social Media Marketing and How to Avoid Them
The 10 Most Common Mistakes in Social Media Marketing and How to Avoid Them
 
International sales training- English language in Hochiminh Vietnam
International sales training- English language in Hochiminh VietnamInternational sales training- English language in Hochiminh Vietnam
International sales training- English language in Hochiminh Vietnam
 
Pedagogic implications of wider purpose of HE
Pedagogic implications of wider purpose of HEPedagogic implications of wider purpose of HE
Pedagogic implications of wider purpose of HE
 
Challenges & Opportunitities for Digital TV In Africa
Challenges & Opportunitities for Digital TV In AfricaChallenges & Opportunitities for Digital TV In Africa
Challenges & Opportunitities for Digital TV In Africa
 
AIX_Administrator_Prerna Arvind_updated Resume
AIX_Administrator_Prerna Arvind_updated ResumeAIX_Administrator_Prerna Arvind_updated Resume
AIX_Administrator_Prerna Arvind_updated Resume
 
Dorkbot Flower Power!
Dorkbot Flower Power!Dorkbot Flower Power!
Dorkbot Flower Power!
 
Formalpresentation2
Formalpresentation2Formalpresentation2
Formalpresentation2
 
Audience theories
Audience theoriesAudience theories
Audience theories
 

KĂŒrzlich hochgeladen

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

KĂŒrzlich hochgeladen (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 

Iot london-2017-security-enhanced-compilers

  • 1. How Your Compiler Can Help You Write Secure Code for Your IoT Device Jeremy Bennett IoT London Meeting #63, 21 February 2017
  • 2. Copyright © 2017 Embecosm. Freely available under a Creative Commons license Why?
  • 3. Copyright © 2017 Embecosm. Freely available under a Creative Commons license Why the Compiler? C/C++ Java Assembler Scripts Raw machine code The compiler gets to look at (almost) all the code The compiler gets to look at (almost) all the code
  • 4. Copyright © 2017 Embecosm. Freely available under a Creative Commons license How The Compiler Can Help Warning of bad practice Advising the programmer when code appears to follow bad practice Providing heavy lifting Automating complex tasks to make them easier for the programmer
  • 5. Copyright © 2017 Embecosm. Freely available under a Creative Commons license Leakage Aware Design Automation The LADA Project ● EPSRC funded 4 year academic research project – supported by a team of RAs and PhD students ● Embecosm is the “industrial supporter” – providing summer PhD internships – writing open source implementations for GCC & LLVM Prof Elisabeth Oswald University of Bristol Dr Dan Page University of Bristol
  • 6. Copyright © 2017 Embecosm. Freely available under a Creative Commons license What is Information Leakage “Information leakage happens whenever a system that is designed to be closed to an eavesdropper reveals some information to unauthorized parties nonetheless.” Wikipedia
  • 7. Copyright © 2017 Embecosm. Freely available under a Creative Commons license Differential Power Analysis $ time ./dpa 7 real 0m0.025s user 0m0.024s sys 0m0.000s $ time ./dpa 6 real 0m0.086s user 0m0.084s sys 0m0.000s int func (uint32_t k) { int i, res = 0; for (i = 0; i < 10000000; i++) if (1 == (k & 1)) res += k - 1; else { double r; r = sqrt ((double) k); res += (int) r; } return res; } int main (int argc, char *argv[]) { return func (atoi (argv[1])); }
  • 8. Copyright © 2017 Embecosm. Freely available under a Creative Commons license Differential Power Analysis $ time ./dpa 7 real 0m0.025s user 0m0.024s sys 0m0.000s $ time ./dpa 6 real 0m0.086s user 0m0.084s sys 0m0.000s int func (uint32_t k) { int i, res = 0; for (i = 0; i < 10000000; i++) if (1 == (k & 1)) res += k - 1; else { double r; r = sqrt ((double) k); res += (int) r; } return res; } int main (int argc, char *argv[]) { return func (atoi (argv[1])); }
  • 9. Copyright © 2017 Embecosm. Freely available under a Creative Commons license 8-Bit Processor Multiply Instruction Heat Map Image: Dr James Pallister, University of Bristol
  • 10. Copyright © 2017 Embecosm. Freely available under a Creative Commons license How To Get Involved ● Contribute code to LLVM, GCC and others ● Apply for PhD/RA vacancies with LADA ● Attend compiler community events ● Join the IoT Security Foundation ● Talk to Embecosm about your compiler