CN110086618B - Lamp control system communication protocol encryption method - Google Patents

Lamp control system communication protocol encryption method Download PDF

Info

Publication number
CN110086618B
CN110086618B CN201910506794.1A CN201910506794A CN110086618B CN 110086618 B CN110086618 B CN 110086618B CN 201910506794 A CN201910506794 A CN 201910506794A CN 110086618 B CN110086618 B CN 110086618B
Authority
CN
China
Prior art keywords
key
key parameter
sending
receiving
iii
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910506794.1A
Other languages
Chinese (zh)
Other versions
CN110086618A (en
Inventor
王新宇
时磊
黎亚宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Grandsberg Network Technology Co ltd
Original Assignee
Nanjing Grandsberg Network Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing Grandsberg Network Technology Co ltd filed Critical Nanjing Grandsberg Network Technology Co ltd
Priority to CN201910506794.1A priority Critical patent/CN110086618B/en
Publication of CN110086618A publication Critical patent/CN110086618A/en
Application granted granted Critical
Publication of CN110086618B publication Critical patent/CN110086618B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0863Generation of secret information including derivation or calculation of cryptographic keys or passwords involving passwords or one-time passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0891Revocation or update of secret information, e.g. encryption key update or rekeying

Abstract

The invention relates to a lamp control system communication protocol encryption method, and belongs to the field of computers. The method adopts a method that the receiving end and the transmitting end dynamically generate a secret key for encryption; the sending end extracts a key parameter I dynamically generated by the data frame information of the sending end, and ensures that the sending key is different every time; the private password set by the user is used as a key parameter II to participate in the generation of the key, so that the security is higher; and the key parameter III of the next transmission is contained in the data frame sent this time, and the receiving end is informed to update the key parameter III. And in the first transmission, the key parameter III adopts a preset initial value to generate a key, and the key parameter III is updated at the transmitting end and the receiving end after the transmitting and receiving processes are completed each time. The invention can reduce the message of special key distribution. In addition, the private password set by each user is used as a key parameter to participate in generating the key, so that the security can be improved.

Description

Lamp control system communication protocol encryption method
Technical Field
The invention belongs to the field of computers, and relates to a lamp control system communication protocol encryption method.
Background
In the existing communication protocol of the lamp control system, the existing dynamic encryption method needs to regularly generate a dynamic key, encrypt the dynamic key by a public key and then send the encrypted dynamic key to a receiving end. Transmission of the encrypted data then takes place. After a certain time, the sending end sends a message again to update the dynamic key.
Compared with static key encryption, the dynamic key encryption mode has higher security and is difficult to intercept and crack, but each dynamic key needs to send a special message to distribute the dynamic key to a receiving end, thereby increasing the burden of a network.
Disclosure of Invention
In view of the above, the present invention is directed to a lamp control system communication protocol encryption method.
In order to achieve the purpose, the invention provides the following technical scheme:
the lamp control system communication protocol encryption method comprises the following steps:
s1: the sending end and the receiving end are both provided with key generators with the same configuration; simultaneously, the receiving and transmitting ends both locally store user passwords set by the user;
s2: extracting a key parameter I dynamically generated by a data frame number of a sending end when data is sent each time;
s3: reading a password set by a user and stored locally as a key parameter II;
s4: the sending end sends a key generated according to a preset key parameter III for the first time, and the subsequent sending data generates a key according to a random number generated at the last time as the key parameter III;
s5: inputting the key parameter I, the key parameter II and the key parameter III into a local key generator to generate a sending key; the key encrypts and transmits the original data;
s6: after receiving the data, the receiving end extracts an Apkey according to the received data to generate a key parameter I, and meanwhile, according to a password which is locally stored and set by a user and serves as a key parameter II and a key parameter III transmitted last time, the three key parameters are sent to a key generator of the receiving end to generate a receiving key and recover encrypted data;
s7: and after the transmitting and receiving ends complete the transmission process, updating the key parameter III.
Further, in the method, a method of dynamically generating a secret key encryption at the transmitting end and the receiving end is adopted.
Further, in the method, a sending end extracts a key parameter I dynamically generated by data frame information of the sending end, and the sending key is ensured to be different every time;
further, in the method, a private password set by a user is used as a key parameter II to participate in the generation of the key, so that the security is higher;
further, in the method, the key parameter III for the next transmission is included in the data frame sent this time, the receiving end is notified to update the key parameter III, the key parameter III for the first transmission generates a key by using a preset initial value, and the key parameter III is updated at both the transmitting and receiving ends after the transmitting and receiving processes are completed each time.
A computer arrangement comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method according to when executing the computer program.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to.
The invention has the beneficial effects that:
1) the dynamic key does not need to be specially transmitted regularly;
2) the transmission key changes every time, and is not easy to crack;
3) the secret code which is private to the user is used as one of the key parameters to participate in generating the key, so that the security of the transmission process is higher.
The invention can reduce the message of special key distribution. In addition, the private password set by each user is used as a key parameter to participate in generating the key, so that the security can be improved.
Additional advantages, objects, and features of the invention will be set forth in part in the description which follows and in part will become apparent to those having ordinary skill in the art upon examination of the following or may be learned from practice of the invention. The objectives and other advantages of the invention may be realized and attained by the means of the instrumentalities and combinations particularly pointed out hereinafter.
Drawings
For the purposes of promoting a better understanding of the objects, aspects and advantages of the invention, reference will now be made to the following detailed description taken in conjunction with the accompanying drawings in which:
FIG. 1 is a flow chart of the present invention.
Detailed Description
The embodiments of the present invention are described below with reference to specific embodiments, and other advantages and effects of the present invention will be easily understood by those skilled in the art from the disclosure of the present specification. The invention is capable of other and different embodiments and of being practiced or of being carried out in various ways, and its several details are capable of modification in various respects, all without departing from the spirit and scope of the present invention. It should be noted that the drawings provided in the following embodiments are only for illustrating the basic idea of the present invention in a schematic way, and the features in the following embodiments and examples may be combined with each other without conflict.
Wherein the showings are for the purpose of illustrating the invention only and not for the purpose of limiting the same, and in which there is shown by way of illustration only and not in the drawings in which there is no intention to limit the invention thereto; to better illustrate the embodiments of the present invention, some parts of the drawings may be omitted, enlarged or reduced, and do not represent the size of an actual product; it will be understood by those skilled in the art that certain well-known structures in the drawings and descriptions thereof may be omitted.
The same or similar reference numerals in the drawings of the embodiments of the present invention correspond to the same or similar components; in the description of the present invention, it should be understood that if there is an orientation or positional relationship indicated by terms such as "upper", "lower", "left", "right", "front", "rear", etc., based on the orientation or positional relationship shown in the drawings, it is only for convenience of description and simplification of description, but it is not an indication or suggestion that the referred device or element must have a specific orientation, be constructed in a specific orientation, and be operated, and therefore, the terms describing the positional relationship in the drawings are only used for illustrative purposes, and are not to be construed as limiting the present invention, and the specific meaning of the terms may be understood by those skilled in the art according to specific situations.
Referring to fig. 1, a method for encrypting a communication protocol of a lamp control system includes the following steps:
s1: the sending end and the receiving end are both provided with the same key generator. And simultaneously, the receiving and transmitting ends both locally store user passwords set by the user.
S2: and extracting the key parameter I dynamically generated by the data frame number of the sending end when the data is sent every time.
S3: and reading a password which is stored locally and set by a user as a key parameter II.
S4: the sending end sends the key generated according to the preset key parameter III for the first time, and the subsequent sending data generates the key according to the random number generated at the last time as the key parameter III.
S5: and inputting the key parameter I, the key parameter II and the key parameter III into a local key generator to generate a sending key. The key encrypts the original data and then sends the encrypted data.
S6: after receiving the data, the receiving end extracts the Apkey according to the received data to generate a key parameter I, and meanwhile, according to a password which is stored locally and set by a user as a key parameter II and a key parameter III transmitted last time, the three key parameters are sent to a key generator of the receiving end to generate a receiving key, and encrypted data is recovered.
S7: and after the transmitting and receiving ends complete the transmission process, updating the key parameter III.
In the method, (1) a method of dynamically generating key encryption at the transmitting end and the receiving end is adopted;
(2) the sending end extracts a key parameter I dynamically generated by the data frame information of the sending end, and ensures that the sending key is different every time;
(3) the private password set by the user is used as a key parameter II to participate in the generation of the key, so that the security is higher;
(4) and the key parameter III of the next transmission is contained in the data frame sent this time, the receiving end is informed to update the key parameter III, the key parameter III adopts a preset initial value to generate a key in the first transmission, and the key parameter III is updated at the receiving end and the transmitting end after the transmitting and receiving processes are finished each time.
Example (b):
1. a user sets a password for each lamp in the network, and the password is stored locally;
2. when a sending end needs to send data, framing according to a protocol;
3. generating a key parameter I with 8 bits according to the sent frame information;
4. reading a locally stored 16-bit user password as a key parameter II;
5. the first sending is to read the preset 8bit key parameter III, and the non-first sending is to read the updated key parameter III
6. The three key parameters are combined into a 16-bit number, and the 16-bit number is sent to a local key generator to generate a sending key;
7. encrypting data to be transmitted and the head of a part of frames by using a sending key, adding a key parameter I with 8 bits at the head and adding a CRC check bit with 16 bits at the tail to form a data frame, and sending the data frame to a receiving end;
8. after receiving the data, the receiving end obtains a key parameter I according to the top 8 bit;
9. reading a locally stored 16-bit user password as a key parameter II;
10. reading the key parameter III updated last time;
11. synthesizing 16bit number by three key parameters, sending the number into a local key generator, and generating an acceptance key;
12. is the data recovered with the generated key, is the CRC passed, if so, is the user password attached to the data frame verified to be locally consistent? If so, the data recovery is successful, otherwise, the data is not processed.
It should be recognized that embodiments of the present invention can be realized and implemented by computer hardware, a combination of hardware and software, or by computer instructions stored in a non-transitory computer readable memory. The methods may be implemented in a computer program using standard programming techniques, including a non-transitory computer-readable storage medium configured with the computer program, where the storage medium so configured causes a computer to operate in a specific and predefined manner, according to the methods and figures described in the detailed description. Each program may be implemented in a high level procedural or object oriented programming language to communicate with a computer system. However, the program(s) can be implemented in assembly or machine language, if desired. In any case, the language may be a compiled or interpreted language. Furthermore, the program can be run on a programmed application specific integrated circuit for this purpose.
Further, the operations of processes described herein can be performed in any suitable order unless otherwise indicated herein or otherwise clearly contradicted by context. The processes described herein (or variations and/or combinations thereof) may be performed under the control of one or more computer systems configured with executable instructions, and may be implemented as code (e.g., executable instructions, one or more computer programs, or one or more applications) collectively executed on one or more processors, by hardware, or combinations thereof. The computer program includes a plurality of instructions executable by one or more processors.
Further, the method may be implemented in any type of computing platform operatively connected to a suitable interface, including but not limited to a personal computer, mini computer, mainframe, workstation, networked or distributed computing environment, separate or integrated computer platform, or in communication with a charged particle tool or other imaging device, and the like. Aspects of the invention may be embodied in machine-readable code stored on a non-transitory storage medium or device, whether removable or integrated into a computing platform, such as a hard disk, optically read and/or write storage medium, RAM, ROM, or the like, such that it may be read by a programmable computer, which when read by the storage medium or device, is operative to configure and operate the computer to perform the procedures described herein. Further, the machine-readable code, or portions thereof, may be transmitted over a wired or wireless network. The invention described herein includes these and other different types of non-transitory computer-readable storage media when such media include instructions or programs that implement the steps described above in conjunction with a microprocessor or other data processor. When programmed according to the lamp control system communication protocol encryption method and technique of the invention, the invention also includes the computer itself.
A computer program can be applied to input data to perform the functions described herein to transform the input data to generate output data that is stored to non-volatile memory. The output information may also be applied to one or more output devices, such as a display. In a preferred embodiment of the invention, the transformed data represents physical and tangible objects, including particular visual depictions of physical and tangible objects produced on a display.
Finally, the above embodiments are only intended to illustrate the technical solutions of the present invention and not to limit the present invention, and although the present invention has been described in detail with reference to the preferred embodiments, it will be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions, and all of them should be covered by the claims of the present invention.

Claims (3)

1. The lamp control system communication protocol encryption method is characterized in that: the method comprises the following steps:
s1: the sending end and the receiving end are both provided with key generators with the same configuration; meanwhile, the receiving and sending ends both store the passwords set by the user locally;
s2: extracting a key parameter I dynamically generated by a data frame number of a sending end when data is sent each time;
s3: reading a password set by a user and stored locally as a key parameter II;
s4: the sending end uses a preset initial value as a key parameter III in the first transmission, and uses a random number generated in the last transmission as the key parameter III in the subsequent transmission;
s5: inputting the key parameter I, the key parameter II and the key parameter III into a local key generator to generate a sending key; encrypting the original data by using the sending key and then sending the encrypted original data; the transmitted data frame comprises the random number;
s6: after receiving the data, the receiving end extracts an Apkey according to the received data to generate a key parameter I, meanwhile, a password which is stored locally and set by a user is used as a key parameter II, if the password is transmitted for the first time, a preset initial value is used as a key parameter III, if the password is not transmitted for the first time, the key parameter III which is updated after the last transmission is completed is read, the key parameter I, the key parameter II and the key parameter III are sent to a key generator of the receiving end to generate a receiving key, and original data are restored;
s7: after the transmitting and receiving ends finish the transmission process, the transmitting and receiving ends use the random number in the data frame transmitted this time to update the key parameter III;
in the method, a method for dynamically generating a secret key encryption at a transmitting end and a receiving end is adopted;
in the method, a sending end extracts a key parameter I dynamically generated by a sending end data frame number, and ensures that a sending key is different every time;
in the method, the password set by the user is used as the key parameter II to participate in the generation of the key, so that the security is higher.
2. A computer apparatus comprising a memory, a processor, and a computer program stored on the memory and capable of running on the processor, wherein: the processor, when executing the computer program, implements the method of claim 1.
3. A computer-readable storage medium having stored thereon a computer program, characterized in that: the computer program, when executed by a processor, implements the method of claim 1.
CN201910506794.1A 2019-06-12 2019-06-12 Lamp control system communication protocol encryption method Active CN110086618B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910506794.1A CN110086618B (en) 2019-06-12 2019-06-12 Lamp control system communication protocol encryption method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910506794.1A CN110086618B (en) 2019-06-12 2019-06-12 Lamp control system communication protocol encryption method

Publications (2)

Publication Number Publication Date
CN110086618A CN110086618A (en) 2019-08-02
CN110086618B true CN110086618B (en) 2021-02-09

Family

ID=67424119

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910506794.1A Active CN110086618B (en) 2019-06-12 2019-06-12 Lamp control system communication protocol encryption method

Country Status (1)

Country Link
CN (1) CN110086618B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113098860B (en) * 2021-03-30 2023-04-07 三一汽车起重机械有限公司 CAN bus encryption method and device, engineering machinery and storage medium
CN114978746A (en) * 2022-06-10 2022-08-30 中国电信股份有限公司 Data encryption transmission method and device, and electronic equipment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101227275A (en) * 2008-02-13 2008-07-23 刘海云 Enciphering method for combining accidental enciphering and exhaust algorithm decipher
CN102546603B (en) * 2011-12-22 2015-01-07 洛阳元煜自控工程有限公司 Communication protocol dynamic encryption method of remote street lamp control system
CN105071927B (en) * 2015-07-17 2018-12-28 上海众人网络安全技术有限公司 Method is locally stored in a kind of mobile device data
GB2561256A (en) * 2017-04-05 2018-10-10 Stmicroelectronics Grenoble2 Sas Apparatus for use in a can system

Also Published As

Publication number Publication date
CN110086618A (en) 2019-08-02

Similar Documents

Publication Publication Date Title
CN103546576B (en) A kind of embedded device remote automatic upgrading method and system
KR102079626B1 (en) System for hiding information using lightweight mutual authentication based on biometric in mobile environment, method thereof and computer recordable medium storing program to perform the method
US20210224407A1 (en) Information processing device, information processing method, and distributed component
CN102045333B (en) Method for generating safety message process key
BR102018015221B1 (en) method for secure information sharing and related system
WO2018090763A1 (en) Method and device for configuring terminal master key
CN108989309B (en) Encryption communication method and encryption communication device based on narrow-band Internet of things
CN110889123B (en) Authentication method, key pair processing method, device and readable storage medium
CN110086618B (en) Lamp control system communication protocol encryption method
CN108734015A (en) Storage device and access authority control method thereof
CN108667784B (en) System and method for protecting internet identity card verification information
CN106778285A (en) For method, the device upgraded to equipment
CN113890728A (en) Key processing method, system, equipment and medium based on FPGA encryption card
CN107155184B (en) WIFI module with secure encryption chip and communication method thereof
CN104767766A (en) Web Service interface verification method, Web Service server and client side
CN110635900B (en) Key management method and system suitable for Internet of things system
CN104618380A (en) Secret key update method suitable for internet of things
WO2019085659A1 (en) Information interaction method and device
CN114024711A (en) Data transmission method and device and computer readable storage medium
CN105825135A (en) Encryption chip, encryption system, encryption method and decryption method
KR102067425B1 (en) Apparatus for storing device data in internet of things environment and method for the same
CN210515295U (en) Security authentication system and information processing device based on security chip
CN108629192B (en) Authorization data processing method and device
CN110837373A (en) Continuous integration and continuous delivery method, device, computer equipment and storage medium
CN109426727B (en) Data encryption method, data decryption method, data encryption system and data decryption system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant