Original URL: http://www.theregister.co.uk/2008/04/04/side_channel_application_security/
Keyless entry systems are ubiquitous, from locking your car to accessing the restricted corridors of government and corporate power. It's therefore troubling to learn (http://www.theregister.co.uk/2008/04/03/keeloq_master_key_found/) Wikipedia reading egg heads have cracked the encryption of a device widely used in a variety of keyless entry systems. There goes the girlfriend's VW, you thought you'd locked.
Side-channel attacks (http://www.research.ibm.com/intsec/side-channel.html) - where criminals glean the information from such systems in order to breach them simply by measuring the power consumption of a chip or by monitoring processor timings - are a growing threat not just to keyless entry systems, though.
Embedded devices such as smart phones and laptops are also in the firing line. And, according to the managing director of security specialist Riscure (http://www.riscure.com/), Harko Robroch, application developers need to adopt new coding strategies to fight such attacks.
"Side-channel attacks are well known in the smartcard industry and although not yet mainstream, the growth of embedded systems with built in security functions is making them a target for this method of attack," he told Reg Dev ahead of his presentation at next week's RSA (https://cm.rsaconference.com/US08/catalog/controller/catalog) conference in San Francisco, California.
Robroch's presentation (https://cm.rsaconference.com/US08/catalog/profile.do?SESSION_ID=3406&form=searchform&ts=1207316026701) will focus on practical coding strategies that developers can use for protection.
Robroch said that while side-channel attacks demand considerable technical knowledge, criminals are resorting to them because successful security strategies had shut down many other avenues of attack.
"A lot of the new chip sets have strong security embedded in them which protects them from many traditional vulnerabilities. But they are not protected from side-channel attacks because it is very difficult. Based on our experiences with smartcards we have drawn up a set of guidelines to help developers build more secure applications for embedded systems," Robroch explained.
One simple trick is to vary password verification routines. "When you do a string compare to check a password, for example, to make it efficient you usually start with the first character and work through in sequence. If you hit a wrong character you throw it out. By measuring the time taken to do the check, a side-channel scan can identify which characters have been accepted. So you can protect the password by not checking it in sequence," he said.
Robroch added that the same principle can be applied to key parity checks. "In most implementations of GNU, for example, key parity checking is done sequentially so it is possible to detect the length of the key through side-channel attack. Either don't do key parity checks or make sure they are not done sequentially."
Robroch acknowledged that there are downsides to coding to protect from side channel attacks. "The awkward thing for developers is that the sort of code you produce is going to be less easy to follow and probably less efficient.
"Another problem is that if you use smart optimizing language compilers you can end up losing the protection you have built in. Things like double checking data fields or deliberately writing inefficient code to randomize timing will often be removed in the optimization process."
On the upside, more complex chip architectures - such as multi-core processors - make side channel attacks more difficult but not impossible. "A lot of devices are protected by their complexity - but even with multi-core processors it is possible to isolate activity and measure it," Robroch said.®
Teapot backdoor probed by German telescope boffins (21 May 2008)
http://www.theregister.co.uk/2008/05/21/teapot_backdoor_fingered/
Security experts warn against Web 2.0 charlatans and 'premature AJAXulation' (14 April 2008)
http://www.theregister.co.uk/2008/04/14/ajax_charlatans_old_school_attack/
Microsoft deploys protocol defense for IE (11 April 2008)
http://www.theregister.co.uk/2008/04/11/internet_explorer_generic_analyzers/
Old people can sabotage software too (10 April 2008)
http://www.theregister.co.uk/2008/04/10/software_project_sabotage/
DHS chief goes nuclear on cyber security (9 April 2008)
http://www.theregister.co.uk/2008/04/09/chertoff_cyber_security/
Microsoft preaches togetherness for online security (8 April 2008)
http://www.theregister.co.uk/2008/04/08/mundie_windows_interoperability/
Stay focused on fuzzy tests, warn security experts (7 April 2008)
http://www.theregister.co.uk/2008/04/07/fuzzing_advice/
Wikipedia-reading boffins jimmy keyless door to entire universe (3 April 2008)
http://www.theregister.co.uk/2008/04/03/keeloq_master_key_found/
Get your German interior minister's fingerprint here (30 March 2008)
http://www.theregister.co.uk/2008/03/30/german_interior_minister_fingerprint_appropriated/
Ex-MS staffer to demo Vista smart card hack (18 March 2008)
http://www.theregister.co.uk/2008/03/18/vista_smartcard_hack/
Spooks want to go fishing in Oyster database (17 March 2008)
http://www.theregister.co.uk/2008/03/17/spooks_want_oyster/
Microscope-wielding boffins crack Tube smartcard (12 March 2008)
http://www.theregister.co.uk/2008/03/12/mifare_classic_smartcard_crack/
RSA crypto attack poses threat to DRM (23 November 2006)
http://www.theregister.co.uk/2006/11/23/rsa_side-channel_crypto_attack/
Is SSL safe? (21 March 2003)
http://www.theregister.co.uk/2003/03/21/is_ssl_safe/
Attack of the clones (9 May 2002)
http://www.theregister.co.uk/2002/05/09/attack_of_the_clones/
© Copyright 2008