| With the development of modern electronic technologies such as computer technology and communication technology,instrumentation is controlled in many application scenarios by using remote wireless control commands(e.g.,remote control of drones and robots),and the use of commands has the advantages of easy operation,simplicity and speed.As there may be replay attacks during the transmission of commands,the security of using plaintext commands for the above operations can no longer be guaranteed,which requires encryption of the control commands used and measures to resist replay attacks to ensure the security of the control command transmission.To this end,the following work is accomplished in this paper:(1)To address the problem that using short numbers as control instructions is vulnerable to replay attacks.We first use the extended problem "3n+k" of the 3n+1problem,which is reasonably modified to become an encryption instruction scheme,and give the encryption principle and encryption and decryption algorithms of the scheme,in which each encryption instruction to generate a ciphertext requires the initial value,the key and plaintext instruction.Then,through theoretical analysis and experiments,the results show an approximate exponential relationship between the cycle period of the generated new initial value and the key length,which verifies the security of the scheme.Finally,a method to reduce the computation time of encryption and decryption in practical use is given.(2)In order to study the actual encryption effect and anti-replay attack effect of the scheme,a general self-synchronous encryption command transmission system is constructed using an embedded development platform and combined with a wireless communication module.The scheme is utilized as a two-way authentication scheme in the system,where the initial value of the reply signal generated by the previous ciphertext is used as the initial value required for the current encryption and decryption by both the transmitter and the receiver,i.e.,self-synchronization,and the initial value is also used as a freshness factor to resist replay attacks.The experimental results show that the scheme is resistant to replay attacks and does not require timestamp and sequence number as freshness factors against replay attacks.The scheme has faster encryption and decryption speed when the range of values of instructions is small.The scheme can also be used in resource-constrained embedded platforms,and the key length can be chosen reasonably according to the actual security requirements.The encrypted instruction transmission system designed in this paper is a general-purpose system applied in application scenarios where the number of transmitted instructions is small and real-time requirements are high,and the system provides a new scheme for instruction encryption. |