Log encryption method and device and log decryption method and device

An encryption algorithm and log technology, applied in the computer field, can solve problems such as low security

Active Publication Date: 2020-01-07
WUHAN DOUYU NETWORK TECH CO LTD
View PDF6 Cites 7 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] The embodiment of the present invention provides a log encryption method, decryption and device to solve the technical problem of low security in the prior art that the client and the server use the same key for encryption and decryption every time

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Log encryption method and device and log decryption method and device
  • Log encryption method and device and log decryption method and device
  • Log encryption method and device and log decryption method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0059] It should be noted that the method provided in this embodiment is applied to the client, and the client and the server are connected through the network to realize communication; in the specific implementation process, the client includes but not limited to mobile terminal equipment (such as mobile phones, tablet ), fixed terminal devices (such as desktop computers), etc., there are not too many restrictions here.

[0060] This embodiment provides a log encryption method, such as figure 1 As shown, the method includes:

[0061] Step S101, when the client starts, generate a first private key based on a random function.

[0062] Specifically, the random number function can be rand, srand(), etc., and the specific algorithm can be set according to the actual situation, such as rounding, remainder, logical operation, etc.

[0063] Step S102, generating a first public key paired with the first private key based on an asymmetric encryption algorithm.

[0064] Asymmetric en...

Embodiment 2

[0110] This embodiment provides a log decryption method, such as figure 2 As shown, the method is applied to the server, and the method includes:

[0111] S201. When a client logs in to the server, generate a second private key according to the device ID of the client and the device type of the client sent by the client.

[0112] S202. Generate a second public key paired with the second private key based on an asymmetric encryption algorithm.

[0113] S203. Send the second public key to the client.

[0114] Specifically, sending the second public key to the client, so that the client generates a first shared key according to the asymmetric encryption algorithm, the first private key, and the second public key, and the The first private key is generated by the client based on a random function.

[0115] S204. Receive a log file including the first public key and encrypted log content sent by the client.

[0116] Specifically, the encrypted log content is generated by the c...

Embodiment 3

[0124] This embodiment provides a log encryption device, the device is applied to the client, such as image 3 As shown, the above-mentioned devices include:

[0125] The first generating unit 301 is configured to generate a first private key based on a random function when the client is started;

[0126] The second generating unit 302 is configured to generate a first public key paired with the first private key based on an asymmetric encryption algorithm;

[0127] A first writing unit 303, configured to write the first public key into a log file;

[0128] A receiving unit 304, configured to receive a second public key sent by the server when the client logs in to the server, the second public key is generated by the server based on the asymmetric encryption algorithm and the second private key , the second private key is generated by the server according to the device ID of the client and the device type of the client sent by the client;

[0129] A third generating unit 305...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The embodiment of the invention provides a log encryption method and device and a log decryption method and device. The encryption method comprises the following steps: encrypting; client startup, generating a first private key based on the random function, generating a first public key paired with the first private key based on an asymmetric encryption algorithm, generating a first shared key according to an asymmetric encryption algorithm, the first private key and the second public key; and encrypting the original log content based on the first shared key and a preset encryption algorithm to obtain encrypted log content, writing the encrypted log content and the first public key into a log file, and sending the log file to the server, so that the server generates a second shared key based on the first public key, and decrypts the original log content based on the second shared key to obtain the original log content. The first shared key and the second shared key are changeable, so that the protection degree of the log file can be improved, and the safety is improved.

Description

technical field [0001] The invention relates to the field of computer technology, in particular to a log encryption method, decryption method and device. Background technique [0002] With the development of computer technology, various client softwares have emerged. Usually, the client software has the function of generating logs. The logs can be used to store information such as various states, operating data, and abnormal conditions when the program is running. The client will regularly upload the generated logs to the server, and use the server to count the running conditions of the client and locate the problems of the client, etc. In addition, for various problems of the client software reported by users, the client software developer can also use the log To locate specific problems and find out the reasons, so as to improve the efficiency of development. [0003] Since the log content also contains some sensitive information, such as the user's name, geographical loc...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): H04L29/06H04L12/24
CPCH04L63/0442H04L41/069
Inventor 周志刚陈少杰张文明
Owner WUHAN DOUYU NETWORK TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products