{"title":"PLCrypto: A Symmetric Cryptographic Library for Programmable Logic Controllers","authors":"Zheng Yang, Zhiting Bao, Chenglu Jin, Zhe Liu, Jianying Zhou","doi":"10.46586/tosc.v2021.i3.170-217","DOIUrl":null,"url":null,"abstract":"Programmable Logic Controllers (PLCs) are control devices widely used in industrial automation. They can be found in critical infrastructures like power grids, water systems, nuclear plants, manufacturing systems, etc. This paper introduces PLCrypto, a software cryptographic library that implements lightweight symmetric cryptographic algorithms for PLCs using a standard PLC programming language called structured text (ST). To the best of our knowledge, PLCrypto is the first ST-based cryptographic library that is executable on commercial off-the-shelf PLCs. PLCrypto includes a wide range of commonly used algorithms, totaling ten algorithms, including one-way functions, message authentication codes, hash functions, block ciphers, and pseudo-random functions/generators. PLCrypto can be used to protect the confidentiality and integrity of data on PLCs without additional hardware or firmware modification. This paper also presents general optimization methodologies and techniques used in PLCrypto for implementing primitive operations like bit-shifting/rotation, substitution, and permutation. The optimization tricks we distilled from our practice can also guide future implementation of other computationheavy programs on PLCs. To demonstrate a use case of PLCrypto in practice, we further realize a cryptographic protocol called proof of aliveness as a case study. We benchmarked the algorithms and protocols in PLCrypto on a commercial PLC, Allen Bradley ControlLogix 5571, which is widely used in the real world. Also, we make our source codes publicly available, so plant operators can freely deploy our library in practice.","PeriodicalId":37077,"journal":{"name":"IACR Transactions on Symmetric Cryptology","volume":"61 1","pages":"170-217"},"PeriodicalIF":1.7000,"publicationDate":"2021-09-17","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"3","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"IACR Transactions on Symmetric Cryptology","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.46586/tosc.v2021.i3.170-217","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"COMPUTER SCIENCE, SOFTWARE ENGINEERING","Score":null,"Total":0}
引用次数: 3
Abstract
Programmable Logic Controllers (PLCs) are control devices widely used in industrial automation. They can be found in critical infrastructures like power grids, water systems, nuclear plants, manufacturing systems, etc. This paper introduces PLCrypto, a software cryptographic library that implements lightweight symmetric cryptographic algorithms for PLCs using a standard PLC programming language called structured text (ST). To the best of our knowledge, PLCrypto is the first ST-based cryptographic library that is executable on commercial off-the-shelf PLCs. PLCrypto includes a wide range of commonly used algorithms, totaling ten algorithms, including one-way functions, message authentication codes, hash functions, block ciphers, and pseudo-random functions/generators. PLCrypto can be used to protect the confidentiality and integrity of data on PLCs without additional hardware or firmware modification. This paper also presents general optimization methodologies and techniques used in PLCrypto for implementing primitive operations like bit-shifting/rotation, substitution, and permutation. The optimization tricks we distilled from our practice can also guide future implementation of other computationheavy programs on PLCs. To demonstrate a use case of PLCrypto in practice, we further realize a cryptographic protocol called proof of aliveness as a case study. We benchmarked the algorithms and protocols in PLCrypto on a commercial PLC, Allen Bradley ControlLogix 5571, which is widely used in the real world. Also, we make our source codes publicly available, so plant operators can freely deploy our library in practice.
可编程逻辑控制器(plc)是广泛应用于工业自动化的控制装置。它们可以在电网、供水系统、核电站、制造系统等关键基础设施中找到。本文介绍了PLCrypto,这是一个软件加密库,它使用称为结构化文本(ST)的标准PLC编程语言为PLC实现轻量级对称加密算法。据我们所知,PLCrypto是第一个基于st的加密库,可在商用现成的plc上执行。PLCrypto包括广泛的常用算法,共计十种算法,包括单向函数、消息认证码、哈希函数、分组密码和伪随机函数/生成器。PLCrypto可用于保护plc上数据的机密性和完整性,而无需额外的硬件或固件修改。本文还介绍了PLCrypto中用于实现基本操作(如位移动/旋转,替换和排列)的一般优化方法和技术。我们从实践中提炼出的优化技巧也可以指导未来在plc上实现其他计算繁重的程序。为了在实践中演示PLCrypto的用例,我们进一步实现了一种称为活体证明的加密协议作为案例研究。我们在商用PLC Allen Bradley ControlLogix 5571上对PLCrypto中的算法和协议进行了基准测试,该PLC在现实世界中广泛使用。此外,我们将源代码公开,因此工厂操作员可以在实践中自由地部署我们的库。