OBAKE Cryptanalysis: Power Analysis


spa1
spa2
spa3

Although simple, it requires implementation effort: physical access to the computer is needed in order to measure and "log" (write a historical information file) such voltage and current variations in the CPU during thousands of operations. However, in recent years we have seen tiny devices that can be placed inside computers without arousing any suspicion and take care of this job, even transmitting (via WiFi) the data to a nearby receiver or via a router to an Internet address. This is why it is so difficult to protect oneself properly against this type of attack, which, although specialized, does not require large investments or resources to perform statistical analysis afterwards in order for the attacker to succeed.


Today we see two types of practical power analysis:


  • Simple Power: A first type of power attacks is based on Simple Power Analysis (SPA). For example, when applied to an unprotected implementation of an RSA public key encryption scheme, such an attack may recover the whole private key (i.e., signing or decryption key) from a single power trace.

  • Differential Power: Basically the purpose of DPA is to magnify the effect of a single bit inside a machine word. The most famous method is due to Paul Kocher et al. and it is based on a statistical analysis. With information leakage models in mind, it is possible to designstatistical methods in order to analyse the data leakage. They require a large amount of power traces assigned to many executions of the samecode with varying data, generally at random, and make use of statistical estimators such as averages, variances and correlations.

However, some measures are quite effective in terms of programming code if we keep this attack in mind. The goal: to try to make the code give no clues that allow us to identify, through electrical consumption, what results are being generated. In this regard, some measures have been taken, both in OBAKE application (during the creation/check of keys) and in the OBAKE-512 algorithm (more often in code):


  • Comparisons without Escape: the most usual way to execute a conditional LOOP is to provide the output according to some "true" or "false" condition, and this condition enables and facilitates this kind of attack. OBAKE, within the possible and feasible and in the critical routines, performs LOOPs without such conditions, criticizing at the end an established numeric result for true. This way, we always guarantee the same execution time, not giving the attacker the opportunity to know if a certain condition (or value) was reached.

  • Parallel processing: OBAKE-512 works fundamentally in "multithread" mode and using parallelism (using CPU cores in parallel), causing deep and random changes in the parameters that are monitored in this type of attack. In other words, this makes this attack impossible during the generation and/or application of the keys, since the parallel mode generates time differences in the running blocks that may indicate a "false-positive".

  • Ghost-Code: OBAKE application and its algorithm OBAKE-512 utilize a lot of portions of code and variables that have no practical use and aim only to confuse disassemblers and monitoring tools based on time and energy (like this attack), without concrete damage to performance and reliability. These codes are randomly executed, significantly impacting this attack and others derived from it.

  • Virtual Code: in essence, the "virtual code" is a piece of code indexed to many ASM memonics, translated at the runtime only. Interesting notice that the "translation" procedure may cause a lot of "false positives" without any useful meaning about this monitoring attack.

Even thought we have not performed this attack in practice, we are certain that the above procedures can protect the application and algorithm against this type of attack.

Bibliographic references


H.C.A. Tilborg et al., "Encyclopedia of Cryptography and Security", H. C. A. v. Tilborg Ed., SpringerScience+Business Media LLC, 2011.

T.S. Messerges, E.A. Dabbish, R.H. Sloan, Examining smart-card security under the threat of power analysis attacks. IEEE Transactions on Computers, 51 (5), 2002

T.S. Messerges, Using Second-order Power analysis to attack DPA resistant software, Cryptographic Hardware and Embedded SystemsCHES 2000, Lecture Notes in Computer Science, vol. 1965, eds. C¸ .K. Koc¸ and C. Paar. SpringerVerlag, Berlin, 2000

P. Kocher, J. Jaffe, B. Jun, Differential Power Analysis Advances in CryptologyCRYPTO99, Lecture Notes in Computer Science, vol. 1666, ed. M. Wiener. SpringerVerlag, Berlin, 1999

Study of Power Analysis and the AES - https://pdfs.semanticscholar.org/e8ee/eca036bdbcf17339bf2ea5a292fabd1a6b9b.pdf

Breaking Smartcards using Power Analysis - https://www.cl.cam.ac.uk/~osc22/docs/smartcards.pdf

Rambus DPA Platform - https://www.rambus.com/security/dpa-countermeasures/dpa-workstation-platform/