Cyber-Physical Systems Security pp 111-134 | Cite as

# Parallel Programming in Cyber-Physical Systems

## Abstract

The growing diffusion of heterogeneous Cyber-Physical Systems (CPSs) poses a problem of security. The employment of cryptographic strategies and techniques is a fundamental part in the attempt of finding a solution to it. Cryptographic algorithms, however, need to increase their security level due to the growing computational power in the hands of potential attackers. To avoid a consequent performance worsening and keep CPSs functioning and secure, these cryptographic techniques must be implemented so to exploit the aggregate computational power that modern parallel architectures provide. In this chapter we investigate the possibility to parallelize two very common basic operations in cryptography: modular exponentiation and Karatsuba multiplication. For the former, we propose two different techniques (*m*-ary and *exponent slicing*) that reduce calculation time of 30/40%. For the latter, we show various implementations of a three-thread parallelization scheme that provides up to 60% better performance with respect to a sequential implementation.

## References

- 1.G.R. Blakley, A computer algorithm for the product AB modulo M. IEEE Trans. Comput.
**32**(5), 497–500 (1983)CrossRefGoogle Scholar - 2.B. Dally, Efficiency and parallelism: the challenges of future computing. Tech. rep., Nvidia Research, Stanford University, 2014Google Scholar
- 3.Q.D. Elaine Barker, Recommendation for key management, part 3: application-specific key management guidance. Tech. rep., National Institute of Standards and Technology (NIST), 2015Google Scholar
- 4.J.L. Hennessy, D.A. Patterson,
*Computer Architecture, Fifth Edition: A Quantitative Approach*, 5th edn. (Morgan Kaufmann Publishers Inc., San Francisco, 2011)Google Scholar - 5.ISO,
*ISO/IEC 14882:2011 – Information technology – Programming languages – C++*(Standard, International Organization for Standardization, Geneva, 2011)Google Scholar - 6.J. Kelsey, B. Schneier, D. Wagner, C. Hall, Side channel cryptanalysis of product ciphers, in
*Proceedings of the 5th European Symposium on Research in Computer Security, ESORICS ’98*(Springer, London, 1998), pp 97–110. http://dl.acm.org/citation.cfm?id=646647.699203Google Scholar - 7.D.E. Knuth,
*The Art of Computer Programming: Seminumerical Algorithms*, vol. 2, 3rd edn. (Addison-Wesley Longman Publishing Co., Inc., Boston, 1997)Google Scholar - 8.Ç.K. Koç, High-speed RSA implementation. Tech. rep., RSA Laboratories, 1994Google Scholar
- 9.P.C. Kocher, Timing attacks on implementations of Diffie-Hellman, RSA, DSS, and other systems, in
*Proceedings of the 16th Annual International Cryptology Conference on Advances in Cryptology, CRYPTO ’96*(Springer, London, 1996), pp. 104–113. http://dl.acm.org/citation.cfm?id=646761.706156zbMATHGoogle Scholar - 10.P. Lara, F. Borges, R. Portugal, N. Nedjah, Parallel modular exponentiation using load balancing without precomputation. J. Comput. Syst. Sci.
**78**(2), 575–582 (2012)MathSciNetCrossRefGoogle Scholar - 11.G. Loukas,
*Cyber-Physical Attacks: A Growing Invisible Threat*, 1st edn. (Butterworth-Heinemann, Newton, 2015)Google Scholar - 12.M.M. Michael, M.L. Scott, Simple, fast, and practical non-blocking and blocking concurrent queue algorithms, in
*Proceedings of the Fifteenth Annual ACM Symposium on Principles of Distributed Computing, PODC ’96*(ACM, New York, 1996), pp. 267–275Google Scholar - 13.P.L. Montgomery, Modular multiplication without trial division. Math. Comput.
**44**(170), 519–521 (1985)MathSciNetCrossRefGoogle Scholar - 14.D. Page, Theoretical use of cache memory as a cryptanalytic side-channel, 2002Google Scholar
- 15.R.L. Rivest, A. Shamir, L. Adleman, A method for obtaining digital signatures and public-key cryptosystems. Commun. ACM
**21**(2), 120–126 (1978)MathSciNetCrossRefGoogle Scholar - 16.H. Sutter, The free lunch is over: a fundamental turn toward concurrency in software. Dr Dobb’s J.
**30**(3), 202–210 (2005)Google Scholar - 17.G. Torbjörn, GNU MP - the GNU multiple precision arithmetic library (2016). https://gmplib.org/gmp-man-6.1.2.pdf. Accessed 28 Feb 2018
- 18.D.M. Tullsen, S.J. Eggers, H.M. Levy, Simultaneous multithreading: maximizing on-chip parallelism, in
*Proceedings of the 22nd Annual International Symposium on Computer Architecture, ISCA ’95*(ACM, New York, 1995), pp. 392–403Google Scholar - 19.M. Wolf, D. Serpanos, Safety and security in cyber-physical systems and internet-of-things systems. Proc. IEEE
**106**(1), 9–20 (2018)CrossRefGoogle Scholar