Design of wireless code lock based on code hopping technology

0 Preface

Compared with the traditional mechanical lock system, the wireless electronic lock system has the advantages of non-contact, convenient, fast, and easy management. With the gradual reduction of the price of RF devices and the integration requirements of various numerical control systems, wireless electronic locks are obtained in more fields. Application. In the early wireless electronic lock system, the key sent to the lock was either a fixed password without encryption, or a password coded by an encoding chip such as PT2262, VD5026, etc. However, the passwords generated by these methods are all fixed content and have a short length ( Generally no more than 16 bits), as long as the intruder can use "copy retransmission" or "scan tracking" and other methods can be easily cracked, so such schemes are applied to occasions that do not require high security.

In order to meet the requirements for higher security, this paper proposes a wireless lock solution based on "code hopping". The so-called code hopping means that the password that the key sends to the lock each time is unique and random, and the intruder cannot predict, even if the original * password is recorded, it cannot be used for the next time *, so the security is extremely high.

1 Software implementation of code hopping

At present, the implementation of code hopping mostly depends on dedicated processor hardware, such as Microchip's HCSXXX series, American MACRSTAR's TR13XX, and ACM's ACM1330E series. These products are patented products, and internal algorithms are not disclosed to the public. To use these products, designers must learn new processors and pay a certain patent fee. Here is a complete software implementation of code hopping, which can be run using a suitable ordinary microcontroller.

The core of the realization of code skipping is a nonlinear encryption algorithm. The use of an encryption unit composed of a 32-bit nonlinear feedback shift register (NLFSR) and a 64-bit key can realize the encryption of the input 32-bit binary data, and the encrypted output is 32-bit Binary random number. There is a bit change in the input, and more than half of the bits in the encrypted output will change statistically, with a very high randomness. Figure 1 is a schematic diagram of code hopping encryption and decryption:

Note that for the same set of encryption systems, the 64-bit keys of the encryption unit and the decryption unit are the same and are not public. This is a typical private key encryption system.

1.1 Encryption unit

According to the figure above, when encrypting, store the 32-bit binary data X to be encrypted into a 32-bit shift register (SR), and select 1, 9, 20, 26, 31 and 32 fixed bits of the 32-bit SR The binary data OX3A5C742E constitutes the input of a nonlinear function (NLR), the output of NLR, the 0, 16 bits of SR, and the 0 bits after the shift of the 64-bit key shift register (key FSR). These bits are XOR (XOR) ) The 1bit data generated afterwards is regarded as 31 bits of 32-bit SR. After looping this operation for 528 rounds, the data in the 32-bit SR is the encrypted code-hopping data Y of X. Here is the implementation of the encryption algorithm using VC6.0:


Iphone Lightning Cable with Lightning Connector Sync and charge your iPhone, iPad, or iPod with faster speed.

The Iphone Charger Cable could meets your need for any place . Its length contains 3tf , 6ft , 10ft , etc .

Our customers and the media all agree on one thing: this cable is one of the best iPhone Lightning cables in the world.

This iPhone charger cable boasts increased durability, faster charging, faster data transfer and compatibility with almost all cases. Give your iPhone the treatment it deserves.

iPhone Lightning Cable compatible with IOS devices that have a Lightning port, including iPhone 8 /7 / 6 / 6s,iPhone 8 Plus / 7 Plus / 6 Plus / 6s Plus, iPhone 5 / 5C / 5S,  iPad with Retina display, For iPad mini,  iPad Air,  iPad Pro, iPod nano 7th Gen and  iPod touch 6th Generation.

The iPhone charger cable which with Original 8 Pin connector with a lightning end has lightning-fast data transfer , retro comfortable, soft and elastic,strong, durable ,dirt , no deformation.

We are committed to providing  professional, safe and stable mobile powers for our customers .

Iphone Lightning Cable

Iphone Lightning Cable,Iphone Charger Cable,Iphone 6 Charger Cable,Long Iphone Lightning Cable,Apple Iphone Charger Cable,Iphone Usb Cable

Hebei Baisiwei Import&Export Trade Co., LTD. , https://www.baisiweicable.com

This entry was posted in on