Method for generating a digital digest and related apparatus
By generating digital digests through grouping and multiple updates of the string to be processed, the problem of easy cracking of digital digests in existing technologies is solved, achieving higher security and reliability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-14
- Publication Date
- 2026-03-27
AI Technical Summary
Existing digital digest generation methods suffer from insufficient security and reliability, are easily cracked, and cannot effectively guarantee the integrity of sensitive data.
By grouping the string to be processed and updating the preset parameters multiple times using multiple groups, the final digital digest is generated, which increases the complexity of the digital digest and makes it more difficult to crack.
It improves the security and reliability of digital digests, enhances the protection of sensitive data, and prevents tampering and damage.
Smart Images

Figure CN119129000B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer information security, in particular to a digital digest generation method and related device. BACKGROUND
[0002] With the rapid development of information technology, computer and internet technology has been applied to all walks of life and all aspects of life, which has brought great convenience to people's work and life, but at the same time there is a certain security risk. Some application systems usually need to transmit and store a large amount of sensitive data during operation, such as personal identity information, user name, financial data, medical records, website login password, credit card, etc. The damage or tampering of sensitive data may lead to serious consequences, including personal privacy leakage, financial fraud, identity theft, etc.
[0003] Digital digest technology is a commonly used data integrity verification method. By generating a digital digest of sensitive data using digital digest technology, the damage or tampering of sensitive data can be detected in time by comparing the digital digests of two sets of sensitive data, so as to prevent problems from occurring.
[0004] How to generate a safe and reliable digital digest is a technical problem to be solved by those skilled in the art. SUMMARY
[0005] The purpose of the present application is to provide a digital digest generation method and related device, which can increase the complexity of digital digest generation and increase the difficulty of digital digest cracking, effectively ensuring the safety and reliability of digital digest.
[0006] Embodiments of the present application can be implemented as follows:
[0007] In a first aspect, the present application provides a digital digest generation method, which comprises:
[0008] obtaining a to-be-processed string;
[0009] dividing the to-be-processed string into a plurality of groups;
[0010] updating a preset parameter a plurality of times using the plurality of groups, and taking the preset parameter after the last update as a final parameter, wherein when the group is the first group, the preset parameter is an original parameter, and when the group is not the first group, the preset parameter is the preset parameter after the last update;
[0011] generating a digital digest of the to-be-processed string according to the final parameter.
[0012] In an optional embodiment, the step of obtaining a to-be-processed string comprises:
[0013] obtaining an original string;
[0014] adding a randomly generated string salt to the original string to obtain a salted string;
[0015] if the length of the salted string is less than a preset length, padding the salted string with bit positions to obtain a padded string with the preset length, otherwise taking the salted string as the padded string;
[0016] continuing to pad the padded string with bit positions to obtain a to-be-processed string with a length meeting a set requirement.
[0017] In an optional embodiment, the step of updating the preset parameter multiple times using the multiple groups and taking the preset parameter updated last time as the final parameter comprises:
[0018] taking a first group as a current group and taking the original parameter as a current parameter;
[0019] splitting the current group into multiple data blocks;
[0020] updating the current parameter multiple times using the multiple data blocks of the current group to obtain the current parameter updated by a last data block of the current group, wherein when the current group is the first group and the data block is a first data block, the current parameter is the original parameter, otherwise, the current parameter is the current parameter updated last time;
[0021] taking the current parameter updated by the last data block of the current group as a new current parameter and taking a next group of the current group as a new current group, repeating the step of updating the current parameter multiple times using the multiple data blocks of the current group to obtain the current parameter updated by the last data block of the current group, and taking the current parameter updated by the last data block of the last group as the final parameter.
[0022] In an optional embodiment, the step of updating the current parameter multiple times using the multiple data blocks of the current group to obtain the current parameter updated by a last data block of the current group comprises:
[0023] taking a first data block of the current group as a current data block;
[0024] updating the current parameter according to the current data block to obtain an updated current parameter;
[0025] repeating the step of updating the current parameter according to the current data block to obtain an updated current parameter until an updated current parameter of a last data block of the current group is obtained, with a next data block of the current data block as a new current data block and the updated current parameter as a new current parameter.
[0026] In an optional implementation, the current parameter is a plurality of, each of the current parameters corresponds to a preset indefinite number, and the step of updating the current parameter according to the current data block to obtain an updated current parameter includes:
[0027] adjusting the arrangement order of the plurality of current parameters, taking a first parameter in the plurality of current parameters after the arrangement as the first parameter, and taking the rest of the parameters except the first parameter as the second parameters;
[0028] performing nonlinear operation on all the second parameters to obtain an operation result;
[0029] obtaining the number of operations of the current group after the nonlinear operation is completed;
[0030] calculating an updated first parameter according to the operation result, the current data block, the preset indefinite number corresponding to the first parameter, and the number of operations;
[0031] wherein the updated current parameter includes the updated first parameter and each of the second parameters.
[0032] In an optional implementation, the step of calculating an updated first parameter according to the operation result, the current data block, the preset indefinite number corresponding to the first parameter, and the number of operations of the nonlinear operation of the current group includes:
[0033] determining a constant according to the number of operations;
[0034] summing the first parameter, the operation result, and the constant to obtain a first intermediate result;
[0035] performing a cyclic shift operation of the preset indefinite number on the first intermediate result to obtain a second intermediate result;
[0036] taking the sum of the second intermediate result and the second parameter adjacent to the first parameter as the updated first parameter.
[0037] In an optional implementation, the preset parameter is a plurality of, each of the preset parameters obtains a final parameter after being updated multiple times, and the step of generating the digital digest of the to-be-processed string according to the final parameter includes:
[0038] Splicing all the final parameters to obtain an initial abstract;
[0039] Randomly generating a hash string;
[0040] Replacing a string with a preset position in the initial abstract as a start and a length of the hash string as a length with the hash string to obtain a replacement string;
[0041] Performing at least one hash calculation on the replacement string to obtain the digital abstract.
[0042] In a second aspect, the present application provides a digital abstract generation device, the device comprising:
[0043] An acquisition module for acquiring a to-be-processed string;
[0044] A division module for dividing the to-be-processed string into multiple groups;
[0045] An update module for updating a preset parameter multiple times by using the multiple groups, and taking the preset parameter after the last update as a final parameter, wherein the preset parameter is an original parameter when the group is a first group, and the preset parameter is a preset parameter after the last update when the group is not the first group;
[0046] A generation module for generating a digital abstract of the to-be-processed string according to the final parameter.
[0047] In a third aspect, the present application provides a client comprising a processor and a memory, wherein the memory is used for storing a program, and the processor is used for implementing the digital abstract generation method according to any one of the preceding embodiments when executing the program.
[0048] In a fourth aspect, the present application provides a computer readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the digital abstract generation method according to any one of the preceding embodiments.
[0049] Compared with the prior art, the present application groups the to-be-processed string, updates the preset parameter multiple times by using the multiple groups to obtain a final parameter, and then generates a digital abstract of the to-be-processed string by using the final parameter, so that the complexity of generating the digital abstract is improved, the difficulty of cracking the digital abstract is increased, and the safety and reliability of the digital abstract are effectively ensured. BRIEF DESCRIPTION OF DRAWINGS
[0050] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments. It should be understood that the following drawings only show some of the embodiments of the present application, and therefore should not be regarded as a limitation on the scope, and for those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.
[0051] Figure 1 The example diagram of the application scenario provided for the present embodiment.
[0052] Figure 2 The example diagram of the flow of the digital summary generation method provided for the present embodiment.
[0053] Figure 3 The example diagram of the generation process of the to-be-processed string provided for the present embodiment.
[0054] Figure 4 The example diagram of the parameter update provided for the present embodiment.
[0055] Figure 5 The block example diagram of the digital summary generation device provided for the present embodiment.
[0056] Figure 6 The block example diagram of the client provided for the present embodiment.
[0057] Icon: 10-client; 11-processor; 12-memory; 13-bus; 20-server; 30-storage system; 100-digital summary generation device; 110-acquisition module; 120-division module; 130-update module; 140-generation module. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical solutions and advantages of the embodiments of the present application more clear, the following will combine the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are some of the embodiments of the present application, not all of the embodiments. The components of the embodiments of the present application described and shown in the drawings can be arranged and designed in various different configurations.
[0059] Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0060] It should be noted that like reference numerals and characters refer to like elements throughout the several views of the drawings, and that, unless otherwise indicated, like reference numerals and characters in different figures indicate like elements.
[0061] In the description of the present application, it should be noted that the terms "upper", "lower", "inner", "outer" and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, or the orientation or positional relationship in which the product of the present application is usually placed, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as limiting the present application.
[0062] In addition, the terms "first", "second", and the like only serve to distinguish the description and cannot be understood as indicating or implying relative importance.
[0063] It should be noted that the features in the embodiments of the present application can be combined with each other without conflict.
[0064] Before introducing the digital summary generation method and related device provided by the present embodiment, in order to facilitate understanding, the present embodiment first introduces the abbreviations and key terms related to the present embodiment.
[0065] Sensitive data: refers to data that may cause serious harm or significant loss to society, organization or individual after being leaked. Sensitive data includes personal privacy data such as name, ID number, address, telephone, bank account, email, password, medical information, educational background, etc.; also includes data that is not suitable for public disclosure by enterprises or social institutions, such as business situation of enterprises, network structure of enterprises, IP address list, etc. There are many methods to protect the security of sensitive data, such as data desensitization, data encryption, access control, etc.
[0066] Plaintext: refers to the text (string) without encryption, which can usually be understood and understood by people.
[0067] Ciphertext: encrypted text. If the plaintext is the text before encryption, then the ciphertext is the text after encryption of the plaintext.
[0068] Encryption: English for Encryption, changes the plaintext information into ciphertext content that is difficult to read, so that it cannot be read. Only the object that has the decryption method can restore the ciphertext to normal readable content through the decryption process. There are mainly three kinds of common encryption algorithms: symmetric encryption algorithm, asymmetric encryption algorithm and digital digest algorithm.
[0069] Symmetric encryption: symmetric encryption has only one key, and all parties use the same key. Encryption and decryption use the same key, which is easy to crack; faster than asymmetric encryption algorithm; data transmission process is not secure.
[0070] Asymmetric encryption: there are two keys, one for encryption and one for decryption. Although the encryption key is public, the decryption key is private. Better security eliminates the need for users to exchange keys; algorithm strength is complex and security is strong; slower than symmetric encryption algorithm.
[0071] Digital digest algorithm: any length of message into a fixed length of short message. Using one-way Hash function to "digest" the plaintext to be encrypted into a fixed length of ciphertext. Information is of arbitrary length, and digest is of fixed length; digest algorithm is anti-collision, that is, two information with the same digest result cannot be found; digest result is irreversible, that is, the original information content cannot be restored by digest. Common digest algorithms include MD5, SHA-1, SHA-2, etc. Currently, MD5 and SHA-1 have been proven to be crackable. Generally used for file integrity check, interface interaction data integrity check, login password verification, etc.
[0072] Hash function: any length of data is converted into a fixed length of unique hash value. Hash function has irreversibility, that is, the original data cannot be restored from the hash value. Hash function is often used to verify the integrity of data and prevent tampering, such as using hash function to encrypt and verify users in password storage.
[0073] MD5: Message-Digest Algorithm 5, which is a hash algorithm. Any length of message is operated to get a fixed length of 128-bit message digest.
[0074] SHA2: Secure Hash Algorithm 2, which is the second generation of secure hash algorithm, which can be divided into SHA-256, SHA-384 and SHA-512 according to the length of the digest (bit).
[0075] Please refer to Figure 1 , Figure 1 The example diagram of the application scenario provided in this embodiment, Figure 1 In the example diagram, the client 10 and the server 20 are in communication connection, and the server 20 and the storage system 30 are in communication connection.
[0076] The functions of the client 10 mainly include: receiving the login request of the user, and checking the identity and permission information of the user; temporarily storing the encryption / decryption key and algorithm; encrypting / decrypting sensitive data and generating a digital digest hash of the user password; storing application information, including the user password, digital digest hash generation related information, and ciphertext element information.
[0077] As a specific implementation, the client 10 can split the functions implemented by it into multiple modules for execution, including a login module, a cache management module, and an encryption / decryption module.
[0078] The functions of the login module include: collecting user-specific information of the access device or system; receiving the login request of the user; user identity verification, permission management, and the like.
[0079] The functions of the cache management module include: locally temporarily storing the encryption / decryption key and algorithm, and managing the cache expiration time.
[0080] The functions of the encryption / decryption module include: encrypting / decrypting sensitive data and generating a digital digest hash of the user password.
[0081] The functions of the database include: storing client application information, including the user password, digital digest hash generation related information, and ciphertext element information.
[0082] The functions of the server 20 mainly include: obtaining the key; transmitting the key to the client 10; and receiving the key application of the client 10. In order to guarantee high availability of the system, the server 20 can be set to 2-3.
[0083] The server 20 can split the functions implemented by it into multiple modules for execution, including a key service module and a key management module.
[0084] The functions of the key service module include: transmitting the key to the client 10; and receiving the key application of the client 10.
[0085] The functions of the key management module include: being responsible for the generation and storage of the key, and the selection of the encryption / decryption algorithm. The key management module adopts multiple roles such as a key applicant, a key manager, and a key visitor to apply for, update, review, and view the key, so as to guarantee the security of the key management and transmission.
[0086] The role of the storage system 30 mainly includes: storing the fragmented key data; and storing the key meta information (fragmentation information and storage location). As an implementation manner, the storage system 30 can be built in the server 20, and the server 20 provides the function of the storage system 30. As another implementation manner, the storage system 30 can be independent of the server 20. In a specific implementation, the storage system 30 can include at least one file server. In order to guarantee high availability of the system, generally, 2-3 file servers are used, and the file server is used to store the fragmented key data. The storage system 30 further includes at least one database server. In order to guarantee high availability of the system, generally, 2-3 database servers are used, and the database server stores the key meta information (fragmentation information and storage location).
[0087] Based on the application scenario of Figure 1 In order to guarantee secure transmission and storage of sensitive data, the processing procedure is as follows:
[0088] 1) User login. After the visitor opens the client application, the assigned or created username and login password are input, so that the sensitive data can be accessed through the client 10 after successful login of the client.
[0089] 2) User judgment. The client 10 queries the local database according to the username of the visitor, and judges whether the user is a first-time login. If it is a first-time login, the digest hash value of the user password is calculated by using the digital digest algorithm, and the related information required for calculating the digest hash value and the calculated digest hash value are stored in the database. If it is a re-login, the related information for generating the digest hash is obtained from the database according to the username of the login user, and the digital digest hash calculation process is executed again. The obtained digital digest hash is compared with the digital digest hash recorded in the database. If they are equal, the login is successful, otherwise the login fails.
[0090] 3) User identity authentication. After the user successfully logs in, the client 10 starts to analyze and authenticate the user's permission. Different user roles and user level rules are set in the embodiment. A strict access permission control mechanism is established to limit that only authorized users can access the sensitive data of the corresponding level, ensure that the access permission of the access user is consistent with the responsibility, prevent unauthorized access and abuse, and protect the sensitive data.
[0091] 4) Mode judgment. After the user permission is determined, the user permission, that is, the sensitive data storage and sensitive data viewing mode, is determined. Different permissions of the user have different access modes, that is, the user with query permission does not have sensitive data storage permission, and can only view the sensitive level data within the permission range; the storage permission user can set the sensitive data within the range.
[0092] 5) Sensitive data level determination. According to the preset sensitive data level rules, the sensitive data is classified into extremely sensitive level, sensitive level, relatively sensitive level and low sensitive level, so as to better manage the user data and protect the user privacy. The sensitive level label is set for the data. The encryption and decryption module of the client 10 selects the corresponding encryption algorithm according to the sensitive level of the data.
[0093] 6) Obtaining encryption key. The client 10 first checks whether there is an encrypted key and an encryption algorithm in the local cache. If there is a cache, the algorithm and the key are directly used for encryption. If there is no cache of the encryption key and the algorithm in the local, the encryption key and the decryption algorithm are requested from the server 20. After receiving the request, the key management module of the server 20 accesses the database server to check the meta information of the encryption key and the algorithm of the user. The database server returns the meta information including the sharding information and the storage location of the key. The key management module of the server 20 accesses the file server and the database server to obtain the key shards and combine them into a complete key through the key service module, and returns the key to the encryption and decryption module of the client 10 and saves it in the local process memory.
[0094] The key shards are responsible for the key management module of the server 20. After obtaining the user key application, if it is the first time for the user to log in, a new key (encryption and decryption key) is generated. Then, according to the key sharding mechanism, the key is sharded according to the number of key management personnel, and stored on the same or multiple file servers to realize the physical isolation of the sharding. Specifically, the original key is first divided into n segments (n administrators), then each segment is sent to the file server (one or more), then the start cutting position of each segment, the segment length, the storage location information (file server directory address, file database query id) of the original key are stored in the database server, and finally the user identification, the encryption and decryption algorithm information, and the key meta information are bound and written into the database server. When the user needs to decrypt the data and needs to apply for a decryption key, the key meta information is obtained by applying to the key management module, and each segment key management personnel is applied. After passing, the key management module receives each segment and completes the combination to realize the exchange management of the key.
[0095] 7) Data encryption. After the client 10 obtains the encryption key, the encryption and decryption module is used to encrypt the sensitive data to obtain the ciphertext. The ciphertext can be stored locally or transmitted to other devices or systems.
[0096] 8) Ciphertext storage. The ciphertext is stored by slicing and segmenting, and the database of the client 10 saves the ciphertext meta information (username, key cache information, encryption and decryption algorithm, ciphertext sharding information, etc.).
[0097] 9) Retrieving database. In the data query mode of sensitive data, after the user logs in the client 10 and selects the sensitive data to be viewed, the local database ciphertext meta information is queried according to the username and sensitive data alias, and the ciphertext meta information of the sensitive data is obtained, that is, the shard storage location of the ciphertext, the key cache information, the encryption / decryption algorithm, etc.
[0098] 10) Obtaining decryption key. If it is a sensitive data query mode, first check whether the decryption key and decryption algorithm are cached in the key cache in the local ciphertext meta information of the client 10, if the cache is available, directly use the algorithm and the key for decryption; if the local does not cache the decryption key and the algorithm, request the decryption key and the decryption algorithm from the server 20; the key management module on the server 20 receives the request, accesses the database server, and checks the meta information of the decryption key and the algorithm of the user; the database server returns the meta information including the shard information and the storage location of the key; the key management module accesses the file server and the database server, obtains the key shards, and combines them into a complete key through the key service module, and returns it to the encryption / decryption module of the client 10, and saves it in the local process memory.
[0099] 11) Data decryption. According to the user's sensitive data query requirements, the shard information and storage location of the ciphertext, the decryption key, the algorithm, etc. in the ciphertext meta information, the encryption / decryption module of the client 10 is used to complete the decryption of the data, so that the user can view the sensitive data within the permission range.
[0100] 12) Clear text display. The user displays the clear text of the sensitive data queried in the client 10.
[0101] In order to further improve the information security, reliable and effective verification of the user in the above process, the embodiment provides a digital digest generation method, so that in the above user judgment, the generated digital digest of the user is safer and more reliable, and of course if a digital digest needs to be generated in other steps, the method provided in the embodiment can also be used to generate a digital digest, which will be described in detail below.
[0102] Please refer to Figure 2 , Figure 2 The flowchart of the digital digest generation method provided in the embodiment, which comprises the following steps:
[0103] Step S101, obtaining a to-be-processed string.
[0104] In the embodiment, the to-be-processed string can be generated according to the username and / or login password of the user, and the generation method can be directly using the username or login password string, or directly splicing the two, or splicing first and then filling additional information to the spliced string to increase the complexity of the to-be-processed string.
[0105] Step S102, the to-be-processed string is divided into multiple groups.
[0106] In this embodiment, the to-be-processed string can be divided into groups in a fixed length of bit, for example, the to-be-processed string is divided into a group every 512 bits.
[0107] Step S103, the preset parameter is updated multiple times by using multiple groups, and the preset parameter after the last update is taken as the final parameter. When the group is the first group, the preset parameter is the original parameter, and when the group is not the first group, the preset parameter is the preset parameter after the last update.
[0108] In this embodiment, the original parameter can be one or multiple, and correspondingly, the preset parameter is also one or multiple. When the preset parameter is multiple, the multiple preset parameters are updated by each group to obtain multiple updated preset parameters. The updated preset parameter of the current group is taken as the preset parameter to be updated by the next group. For example, the initial parameters are A0, B0, C0 and D0, there are three groups in total, the first group updates A0, B0, C0 and D0 to obtain the preset parameters A1, B1, C1 and D1, the second group updates A1, B1, C1 and D1 to obtain the preset parameters A2, B2, C2 and D2, and the third group updates A2, B2, C2 and D2 to obtain the preset parameters A3, B3, C3 and D3. A3, B3, C3 and D3 are the final parameters.
[0109] Step S104, the digital digest of the to-be-processed string is generated according to the final parameter.
[0110] In this embodiment, the final parameter can be one or multiple. When the final parameter is one, the final parameter can be hashed multiple times to obtain the digital digest of the to-be-processed string. When the final parameter is multiple, the multiple final parameters can be spliced first, and then the spliced result can be hashed multiple times to obtain the digital digest of the to-be-processed string. Alternatively, in order to further improve the security, the substring of a preset position and a preset length in the spliced result can be replaced first, and then the replaced string can be hashed multiple times to obtain the digital digest of the to-be-processed string.
[0111] The above method provided in this embodiment divides the to-be-processed string into groups, updates the preset parameter multiple times by using multiple groups to obtain the final parameter, and then generates the digital digest of the to-be-processed string by using the final parameter. The complexity of the generation of the digital digest is improved, the difficulty of cracking the digital digest is increased, and the safety and reliability of the digital digest are effectively ensured.
[0112] In an optional embodiment, in order to improve the complexity of the to-be-processed string and to simplify the implementation of subsequent grouping, the embodiment provides a manner of obtaining the to-be-processed string:
[0113] Firstly, an original string is obtained;
[0114] The original string can be at least one of a username and a password, or can be determined according to actual scene requirements, for example, an IP address, a device identifier, and the like.
[0115] Secondly, a randomly generated string salt is added to the original string to obtain a salted string;
[0116] The string salt can be one or more, and the length of the string salt is a pre-set fixed length. Taking two string salts as an example, the original string is str_ori, the two string salts are salt1 and salt2, and the three are spliced as salt1+str_ori+salt2 to obtain the salted string.
[0117] It should be noted that the splicing manner can be salt1+salt2+str_ori or str_ori+salt1+salt2 in addition to salt1+str_ori+salt2.
[0118] Thirdly, if the length of the salted string is less than a preset length, bit positions are filled in the salted string to obtain a filled string with the preset length, otherwise the salted string is taken as the filled string;
[0119] The preset length is a preset length for facilitating subsequent grouping, for example, when 512-bit grouping is performed, the preset length L (in bit) satisfies the following condition: L mod 512 = 448, where mod is a modulo operation.
[0120] Fourthly, bit positions are continuously filled in the filled string to obtain a to-be-processed string with a length meeting a set requirement.
[0121] The length meeting the set requirement can be determined according to actual grouping requirements, for example, when 512-bit grouping is performed, the length meeting the set requirement means that the length of the to-be-processed string is an integer multiple of 512 bits. The bit positions can be filled in the filled string, for example, the filled string is 448 bits, the length of the original string is represented by 64 bits, and then the to-be-processed string is 448 bits+64 bits = 512 bits. Please refer to Figure 3 , Figure 3 An example diagram of a to-be-processed string generation process provided by the embodiment is shown in the following figure.
[0122] In an optional embodiment, in order to further increase the complexity of updating the preset parameter by one group, the embodiment provides an implementation manner when the preset parameter is updated by multiple groups for multiple times.
[0123] Firstly, the first group is taken as the current group and the original parameter is taken as the current parameter.
[0124] Secondly, the current group is divided into multiple data blocks.
[0125] The length of the data block is a pre-set fixed length, for example, the length of the data block is 32 bits, i.e. 4 bytes.
[0126] Thirdly, the current parameter is updated by multiple data blocks of the current group for multiple times to obtain the current parameter updated by the last data block of the current group. When the current group is the first group and the data block is the first data block, the current parameter is the original parameter, otherwise, the current parameter is the current parameter updated last time.
[0127] In the embodiment, each data block of the current group updates the current parameter. If the data block is the first data block of the first group, the original parameter is updated. If the current data block is the first data block of the non-first group, the current parameter updated by the last data block of the last group is updated. If the current data block is the non-first data block of the non-first group, the current parameter updated by the last data block of the current group is updated.
[0128] Fourthly, the current parameter updated by the last data block of the current group is taken as the new current parameter and the next group of the current group is taken as the new current group. The step of repeatedly updating the current parameter by multiple data blocks of the current group for multiple times to obtain the current parameter updated by the last data block of the current group is repeated until the last data block of the last group is updated to obtain the final parameter.
[0129] In an optional embodiment, the manner of updating the current parameter by multiple data blocks of the current group for multiple times is as follows:
[0130] The first data block of the current group is taken as the current data block.
[0131] The current parameter is updated according to the current data block to obtain the updated current parameter.
[0132] The next data block of the current data block is taken as a new current data block, and the updated current parameter is taken as a new current parameter, and the step of updating the current parameter according to the current data block to obtain the updated current parameter is repeated until the last data block of the current group is obtained.
[0133] To more clearly illustrate the groups and the process of updating the parameters of each group, please refer to Figure 4 , Figure 4 The example diagram of the parameter updating provided by the embodiment is as follows, Figure 4 In the example diagram, the string to be processed is divided into two groups: group 1 and group 2, and each group is divided into four data blocks: group 1 is divided into block 11, block 12, block 13 and block 14, and group 2 is divided into block 21, block 22, block 23 and block 24. Block 11 updates the original parameter, block 12 updates the current parameter updated by block 11, block 13 and block 14 are similar to block 12, block 21 updates the current parameter updated by block 14, and block 22, block 23 and block 24 are similar to block 12.
[0134] In an optional embodiment, when the current parameters are multiple, an implementation of updating the current parameters according to the current data block is as follows:
[0135] First, the arrangement order of the multiple current parameters is adjusted, and the first parameter in the sorted multiple current parameters is taken as a first parameter, and the remaining parameters except the first parameter are taken as second parameters;
[0136] In the embodiment, in order to fully update each current parameter by using the data block, the multiple current parameters are arranged in order, and different current parameters are updated according to the arrangement order. For example, the current parameters are A, B, C and D, and the arrangement order can be adjusted in a cyclic manner as follows: (A, B, C, D), (D, A, B, C), (C, D, A, B), (B, C, D, A), and then the cyclic adjustment is performed again from (A, B, C, D). For example, the arrangement order of the current parameters is (A, B, C, D), A is the first parameter, and B, C and D are the second parameters.
[0137] Secondly, the nonlinear operation is performed on all the second parameters to obtain an operation result.
[0138] In the embodiment, the nonlinear operation can be implemented by using a nonlinear function, and when the second parameters are three, the nonlinear function can be at least one of the following functions:
[0139]
[0140] H(X,Y,Z) = X OR Y OR Z;
[0141]
[0142] wherein & is a logical AND operation, | is a logical OR operation, is a logical NOT operation, and is an exclusive OR operation.
[0143] Thirdly, obtaining an operation number of the nonlinear operation completed by the current group;
[0144] Fourthly, calculating an updated first parameter according to the operation result, the current data block, a preset indefinite number corresponding to the first parameter, and the operation number; wherein the updated current parameter comprises the updated first parameter and each second parameter.
[0145] In the embodiment, the preset indefinite number corresponding to the first parameter can be determined in advance, for example, when the current parameter is A, B, C, and D, the preset indefinite number is 7 when A is the first parameter, the preset indefinite number is 12 when B is the first parameter, the preset indefinite number is 17 when C is the first parameter, and the preset indefinite number is 22 when D is the first parameter.
[0146] In the embodiment, a manner of calculating the updated first parameter is as follows:
[0147] Firstly, determining a constant according to the operation number;
[0148] wherein the constant can be calculated by the following formula: constant ti = 4294967296 * abs(sin(i)), wherein i is the operation number + 1, in radians, 4294967296 is 2 raised to the power of 32, sin() is a sine function, and abs() is an absolute value function.
[0149] Secondly, summing the first parameter, the operation result, and the constant to obtain a first intermediate result;
[0150] Thirdly, performing a cyclic shift operation on the first intermediate result by the preset indefinite number to obtain a second intermediate result;
[0151] Fourthly, taking a sum of the second intermediate result and a second parameter adjacent to the first parameter as the updated first parameter.
[0152] In the embodiment, the nonlinear function is different, and the formula for updating the first parameter is also different. Taking the order of the current parameters as (A, B, C, D) for example, A is the first parameter, and B, C, and D are the second parameters. The formula for updating the first parameter corresponding to each nonlinear function is as follows:
[0153] FF(A,B,C,D,M,s,ti) represents A' = B + ((A + F(B,C,D) + M + ti) « s)
[0154] GG(A,B,C,D,M,s,ti) represents A' = B + ((A + G(B,C,D) + M + ti) « s)
[0155] HH(A,B,C,D,M,s,ti) represents A' = B + ((A + H(B,C,D) + M + ti) « s)
[0156] II(A,B,C,D,M,s,ti) represents A' = B + ((A + I(B,C,D) + M + ti) « s)
[0157] Wherein, A' is the updated first parameter, A is the first parameter, B, C, D are the second parameters, M is the current data block, ti is a constant, s is a preset indefinite number.
[0158] It should be noted that for all data blocks, any nonlinear function corresponding formula can be used to update the first parameter according to each data block in turn, which is called a round of update, and multiple rounds of update can also be performed. For all data blocks, different nonlinear functions corresponding to the formula are used for updating in each round, and the preset indefinite number corresponding to the first parameter in each round can be different.
[0159] For example, for any group, if the group is divided into 16 data blocks: M0-M15, the four variables A, B, C, D are copied to variables a, b, c, d respectively, the first nonlinear operation in the first round, the value of i used in the calculation of ti is 0+1=1, the last nonlinear operation in the first round, the value of i used in the calculation of ti is 16, the first nonlinear operation in the second round, the value of i used in the calculation of ti is 17, and the last nonlinear operation in the fourth round, the value of i used in the calculation of ti is 64. The four rounds of update are:
[0160] First round
[0161] FF(a,b,c,d,M0,7,0xd76aa478)
[0162] FF(d,a,b,c,M1,12,0xe8c7b756)
[0163] FF(c,d,a,b,M2,17,0x242070db)
[0164] FF(b,c,d,a,M3,22,0xc1bdceee)
[0165] FF (a, b, c, d, M4, 7, 0xf57c0faf)
[0166] FF (d, a, b, c, M5, 12, 0x4787c62a)
[0167] FF (c, d, a, b, M6, 17, 0xa8304613)
[0168] FF (b, c, d, a, M7, 22, 0xfd469501)
[0169] FF (a, b, c, d, M8, 7, 0x698098d8)
[0170] FF (d, a, b, c, M9, 12, 0x8b44f7af)
[0171] FF (c, d, a, b, M10, 17, 0xffff5bb1)
[0172] FF (b, c, d, a, M11, 22, 0x895cd7be)
[0173] FF (a, b, c, d, M12, 7, 0x6b901122)
[0174] FF (d, a, b, c, M13, 12, 0xfd987193) FF (c, d, a, b, M14, 17, 0xa679438e) FF (b, c, d, a, M15, 22, 0x49b40821) Second Round
[0175] GG(a,b,c,d,M1,5,0xf61e2562) GG(d,a,b,c,M6,9,0xc040b340) GG(c,d,a,b,M11,14,0x265e5a51) GG(b,c,d,a,M0,20,0xe9b6c7aa) GG(a,b,c,d,M5,5,0xd62f105d) GG(d,a,b,c,M10,9,0x02441453) GG(c,d,a,b,M15,14,0xd8a1e681) GG(b,c,d,a,M4,20,0xe7d3fbc8) GG(a,b,c,d,M9,5,0x21e1cde6) GG(d,a,b,c,M14,9,0xc33707d6) GG(c,d,a,b,M3,14,0xf4d50d87) GG(b,c,d,a,M8,20,0x455a14ed) GG(a,b,c,d,M13,5,0xa9e3e905) GG(d,a,b,c,M2,9,0xfcefa3f8) GG(c,d,a,b,M7,14,0x676f02d9) GG(b,c,d,a,M12,20,0x8d2a4c8a) Third Round
[0176] HH(a,b,c,d,M5,4,0xfffa3942) HH(d,a,b,c,M8,11,0x8771f681) HH(c,d,a,b,M11,16,0x6d9d6122) HH(b,c,d,a,M14,23,0xfde5380c) HH(a,b,c,d,M1,4,0xa4beea44) HH(d,a,b,c,M4,11,0x4bdecfa9) HH(c,d,a,b,M7,16,0xf6bb4b60) HH(b,c,d,a,M10,23,0xbebfbc70) HH(a,b,c,d,M13,4,0x289b7ec6) HH(d,a,b,c,M0,11,0xeaa127fa) HH(c,d,a,b,M3,16,0xd4ef3085) HH(b,c,d,a,M6,23,0x04881d05) HH(a,b,c,d,M9,4,0xd9d4d039) HH(d,a,b,c,M12,11,0xe6db99e5) HH(c,d,a,b,M15,16,0x1fa27cf8) HH(b,c,d,a,M2,23,0xc4ac5665) Fourth Round
[0177] II (a, b, c, d, M0, 6, 0xf4292244) II (d, a, b, c, M7, 10, 0x432aff97) II (c, d, a, b, M14, 15, 0xab9423a7) II (b, c, d, a, M5, 21, 0xfc93a039) II (a, b, c, d, M12, 6, 0x655b59c3) II (d, a, b, c, M3, 10, 0x8f0ccc92) II (c, d, a, b, M10, 15, 0xffeff47d)
[0178] II (b, c, d, a, M1, 21, 0x85845dd1)
[0179] II (a, b, c, d, M8, 6, 0x6fa87e4f)
[0180] II (d, a, b, c, M15, 10, 0xfe2ce6e0)
[0181] II (c, d, a, b, M6, 15, 0xa3014314)
[0182] II (b, c, d, a, M13, 21, 0x4e0811a1)
[0183] II (a, b, c, d, M4, 6, 0xf7537e82)
[0184] II (d, a, b, c, M11, 10, 0xbd3af235)
[0185] II (c, d, a, b, M2, 15, 0x2ad7d2bb)
[0186] II (b, c, d, a, M9, 21, 0xeb86d391)
[0187] When the groups are multiple, each group is sequentially subjected to the above four rounds of updating, and the last parameter update of the last group obtains the final parameter corresponding to each parameter. The embodiment further provides an implementation manner of generating a digital digest when the final parameters are multiple:
[0188] First, all the final parameters are spliced to obtain an initial digest;
[0189] For example, the final parameters are A, B, C, and D, the splicing manner can be that A is the low bit and D is the high bit, for example, A=0Xbfcbfgce, B=0Xc4105a80, C=0X02599277, and D=0X5c099ee2, and the initial digest hash_md5 obtained by splicing is: hash_md5=cefgcbbf805a10c477925202e29e095c.
[0190] Secondly, a hash string is randomly generated.
[0191] Thirdly, a replacement string is obtained by replacing a string with a length of the hash string in the initial digest from a preset position.
[0192] The hash string str_replace with a length of len is generated by using a random function, the value with the start index start_index as the start and the length of len in hash_md5 is intercepted and replaced by using the intercept function, and the replacement string hash_modified after replacement is obtained.
[0193] Fourthly, the replacement string is subjected to at least one hash calculation to obtain a digital digest.
[0194] The algorithm for the hash calculation includes, but is not limited to, SHA-256, SHA-384, and SHA-512, etc.
[0195] It should be noted that the string salt (for example, salt1 and salt2), the hash string str_replace, and the start index start_index in the above digital digest generation method can be used as the digital digest hash generation related information in the Figure 1 After the digital digest is generated when the user logs in, the related information is saved to the local database of the client, so that when the user logs in again next time, the digital digest is generated by using the same way, the digital digest generated this time is compared with the digital digest of the user stored in the local database, and the user is subjected to validity verification.
[0196] In order to execute the corresponding steps in the above embodiments and various possible implementation manners, an implementation manner of a digital digest generation device 100 is given below. Please refer to Figure 5 , Figure 5 The block schematic diagram of the digital digest generation device provided in the embodiment is given, and it should be noted that the basic principle and the generated technical effects of the digital digest generation device 100 provided by the present application are the same as those of the above embodiments, and for brief description, part of the embodiment is not mentioned.
[0197] The digital digest generation apparatus 100 comprises an acquisition module 110, a division module 120, an updating module 130 and a generation module 140.
[0198] The acquisition module 110 is configured to acquire a to-be-processed string.
[0199] The division module 120 is configured to divide the to-be-processed string into a plurality of groups.
[0200] The updating module 130 is configured to update a preset parameter a plurality of times by using the plurality of groups, and take the preset parameter after the last update as a final parameter, wherein when the group is a first group, the preset parameter is an original parameter, and when the group is not the first group, the preset parameter is the preset parameter after the last update.
[0201] The generation module 140 is configured to generate a digital digest of the to-be-processed string according to the final parameter.
[0202] In an optional implementation, the acquisition module 110 is specifically configured to:
[0203] acquire an original string;
[0204] add a randomly generated string salt to the original string to obtain a salted string;
[0205] if a length of the salted string is less than a preset length, fill bit positions in the salted string to obtain a padding string with the preset length, or otherwise take the salted string as the padding string;
[0206] continue to fill bit positions in the padding string to obtain the to-be-processed string with a length meeting a set requirement.
[0207] In an optional implementation, the updating module 130 is specifically configured to:
[0208] take the first group as a current group and take the original parameter as a current parameter;
[0209] divide the current group into a plurality of data blocks;
[0210] update the current parameter a plurality of times by using the plurality of data blocks of the current group to obtain the current parameter after the last update of the last data block of the current group, wherein when the current group is the first group and the data block is a first data block, the current parameter is the original parameter, or otherwise, the current parameter is the current parameter after the last update;
[0211] updating the current parameter by using the first data block of the current group as the current data block, and updating the current parameter by using the current data block to obtain an updated current parameter, and repeating the step of updating the current parameter by using the current data block to obtain an updated current parameter until the current parameter after being updated by the last data block of the current group is obtained.
[0212] In an optional implementation, when the updating module 130 is used to update the current parameter by using the multiple data blocks of the current group to obtain the current parameter after being updated by the last data block of the current group, the updating module 130 is specifically configured to:
[0213] updating the current parameter by using the first data block of the current group as the current data block, and updating the current parameter by using the current data block to obtain an updated current parameter, and repeating the step of updating the current parameter by using the current data block to obtain an updated current parameter until the current parameter after being updated by the last data block of the current group is obtained.
[0214] updating the current parameter by using the first data block of the current group as the current data block, and updating the current parameter by using the current data block to obtain an updated current parameter, and repeating the step of updating the current parameter by using the current data block to obtain an updated current parameter until the current parameter after being updated by the last data block of the current group is obtained.
[0215] updating the current parameter by using the first data block of the current group as the current data block, and updating the current parameter by using the current data block to obtain an updated current parameter, and repeating the step of updating the current parameter by using the current data block to obtain an updated current parameter until the current parameter after being updated by the last data block of the current group is obtained.
[0216] In an optional implementation, the current parameter is multiple, and each current parameter corresponds to a preset indeterminate number. When the updating module 130 is used to update the current parameter by using the current data block to obtain an updated current parameter, the updating module 130 is specifically configured to:
[0217] adjusting the arrangement order of the multiple current parameters, and taking the first parameter in the multiple current parameters after being sorted as a first parameter, and taking the remaining parameters except the first parameter as second parameters;
[0218] performing a nonlinear operation on all the second parameters to obtain an operation result;
[0219] obtaining the number of operations of the current group after being subjected to the nonlinear operation;
[0220] calculating an updated first parameter according to the operation result, the current data block, the preset indeterminate number corresponding to the first parameter, and the number of operations;
[0221] wherein the updated current parameter includes the updated first parameter and each second parameter.
[0222] In an optional implementation, when the updating module 130 is used to calculate an updated first parameter according to the operation result, the current data block, the preset indeterminate number corresponding to the first parameter, and the number of operations of the current group after being subjected to the nonlinear operation, the updating module 130 is specifically configured to:
[0223] a constant determined according to the number of operations;
[0224] summing the first parameter, the operation result and the constant to obtain a first intermediate result;
[0225] performing a cyclic shift operation on the first intermediate result by a preset indefinite number to obtain a second intermediate result;
[0226] taking the sum of the second intermediate result and a second parameter adjacent to the first parameter as an updated first parameter.
[0227] In an optional embodiment, a plurality of preset parameters are provided, and each of the preset parameters is updated a plurality of times to obtain a final parameter, and the generation module 140 is specifically configured to:
[0228] splicing all the final parameters to obtain an initial digest;
[0229] randomly generating a hash string;
[0230] replacing a string in the initial digest, which starts at a preset position and has a length equal to that of the hash string, with the hash string to obtain a replacement string;
[0231] performing at least one hash calculation on the replacement string to obtain a digital digest.
[0232] The embodiment of the present application also provides a block schematic diagram of a client 10, which implements the digital digest generation method of the foregoing embodiment, and please refer to Figure 6 , Figure 6 The block schematic diagram of the client 10 provided in the embodiment, the client 10 includes a processor 11, a memory 12 and a bus 13, and the processor 11 and the memory 12 are connected through the bus 13.
[0233] The processor 11 can be an integrated circuit chip with signal processing capability. In the implementation process, the steps of the digital digest generation method of the above embodiments can be completed by the integrated logic circuit of hardware in the processor 11 or the instructions in the form of software. The processor 11 described above can be a general-purpose processor, including a CPU (Central Processing Unit, central processor), an NP (Network Processor, network processor), etc.; can also be a DSP (Digital Signal Processor, digital signal processor), an ASIC (Application Specific Integrated Circuit, application specific integrated circuit), an FPGA (Field Programmable Logic Gate Array, field programmable logic gate array) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component.
[0234] The memory 12 is used to store the program for implementing the digital digest generation method, which can be a software function module stored in the memory 12 in the form of software or firmware or solidified in the OS (Operating System, operating system) of the client 10.
[0235] After receiving the execution instruction, the processor 11 executes the program to implement the digital digest generation method of the above embodiments.
[0236] The embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the digital digest generation method according to any one of the preceding embodiments.
[0237] In summary, the embodiment of the present application provides a digital digest generation method and related device, the method comprising: obtaining a to-be-processed string; dividing the to-be-processed string into multiple groups; updating a preset parameter multiple times by using the multiple groups, and taking the preset parameter after the last update as a final parameter, wherein when the group is the first group, the preset parameter is an original parameter, and when the group is not the first group, the preset parameter is the preset parameter after the last update; and generating a digital digest of the to-be-processed string according to the final parameter. Compared with the prior art, the embodiment has at least the following advantages: (1) the to-be-processed string is grouped, the preset parameter is updated multiple times by using the multiple groups, the final parameter is obtained, and then the final parameter is used to generate the digital digest of the to-be-processed string, so that the complexity of generating the digital digest is improved, the cracking difficulty of the digital digest is increased, and the safety and reliability of the digital digest are effectively ensured; (2) the cracking difficulty of MD5 is further improved and the safety and reliability of the algorithm are further improved through salting, string replacement, and multiple hash operations; (3) centralized, fragmented key storage and multi-role permission management are adopted to ensure the safety and easy management of the key. The key is stored in a heterogeneous and physically isolated storage server in fragments, and key storage meta-information is saved in a database. Multi-role management such as key applicant, key manager, and key visitor is adopted to ensure the safety of key management and transmission. In a scenario requiring key exchange, each person managing the key can only see a fragment, and all parties need to hand over to complete a key exchange, thereby ensuring the safety of the key; and (4) the C / S (client / server) architecture is adopted, high-availability backup is performed on the server, the database, and the file server, that is, 2-3 servers are deployed to build a cluster server, and the client accesses the server machine through load balancing. If a server is found to be down, failover is performed, and the database and the file server are also backed up as master and slave. The encryption and decryption service is ensured to be reliable and stable.
[0238] The above merely describes specific embodiments of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method of generating a digital digest, characterized by, The method comprises: acquiring a to-be-processed string; dividing the to-be-processed string into multiple groups; taking a first group as a current group and taking an original parameter as a current parameter; splitting the current group into multiple data blocks; taking a first data block of the current group as a current data block; updating the current parameter according to the current data block to obtain an updated current parameter; taking a next data block of the current data block as a new current data block and taking the updated current parameter as a new current parameter, repeating the step of updating the current parameter according to the current data block to obtain an updated current parameter until the last data block of the current group is obtained, when the current group is the first group and the data block is the first data block, the current parameter is the original parameter, otherwise, the current parameter is the current parameter updated last time; taking the last data block of the current group updated as a new current parameter and taking a next group of the current group as a new current group, repeating the step of taking the first data block of the current group as a current data block, and taking the last data block of the last group updated as a final parameter; generating a digital digest of the to-be-processed string according to the final parameter.
2. The digital digest generation method of claim 1, wherein, The step of acquiring a to-be-processed string comprises: acquiring an original string; adding a randomly generated string salt to the original string to obtain a salted string; if the length of the salted string is less than a preset length, filling the salted string with bit positions to obtain a filled string with a length of the preset length, otherwise, taking the salted string as the filled string; continuing to fill the filled string with bit positions to obtain a to-be-processed string with a length meeting the set requirements.
3. The digital digest generation method of claim 1, wherein, The current parameter is multiple, each current parameter corresponds to a preset indefinite number, and the step of updating the current parameter according to the current data block to obtain an updated current parameter comprises: adjusting the arrangement order of multiple current parameters, and taking the first parameter of the sorted multiple current parameters as a first parameter and the remaining parameters except the first parameter as second parameters; performing nonlinear operation on all second parameters to obtain an operation result; acquiring the number of operation times of the current group that have completed nonlinear operation; calculating an updated first parameter according to the operation result, the current data block, the preset indefinite number corresponding to the first parameter, and the number of operation times; wherein the updated current parameter comprises the updated first parameter and each second parameter.
4. The digital digest generation method of claim 3, wherein, The step of calculating an updated first parameter according to the operation result, the current data block, the preset indefinite number corresponding to the first parameter, and the number of operation times of the current group performing nonlinear operation comprises: determining a constant according to the number of operation times; summing the first parameter, the operation result, and the constant to obtain a first intermediate result; The first intermediate result is subjected to a cyclic shift operation of the preset indeterminate number to obtain a second intermediate result; The second intermediate result and the sum of a second parameter adjacent to the first parameter are taken as the updated first parameter.
5. The digital digest generation method of claim 1, wherein, The current parameter is multiple, and each current parameter is updated multiple times to obtain a final parameter. The step of generating the digital digest of the to-be-processed string according to the final parameter comprises: Splicing all the final parameters to obtain an initial digest; Randomly generating a hash string; Replacing a string starting from a preset position in the initial digest and having a length equal to the length of the hash string with the hash string to obtain a replacement string; Performing at least one hash calculation on the replacement string to obtain the digital digest.
6. A digital digest generating apparatus characterized by comprising: The apparatus comprises: An acquisition module configured to acquire a to-be-processed string; A division module configured to divide the to-be-processed string into multiple groups; An update module configured to: take a first group as a current group and take an original parameter as a current parameter; divide the current group into multiple data blocks; take a first data block of the current group as a current data block; update the current parameter according to the current data block to obtain an updated current parameter; take a next data block of the current data block as a new current data block and take the updated current parameter as a new current parameter, and repeat the step of updating the current parameter according to the current data block to obtain an updated current parameter until an updated current parameter of a last data block of the current group is obtained, wherein when the current group is the first group and the data block is the first data block, the current parameter is the original parameter, otherwise, the current parameter is the current parameter updated last time; take the updated current parameter of the last data block of the current group as a new current parameter and take a next group of the current group as a new current group, and repeat the step of taking the first data block of the current group as the current data block, and take the updated current parameter of the last data block of the last group as a final parameter; A generation module configured to generate a digital digest of the to-be-processed string according to the final parameter.
7. A client, characterized in that, The apparatus comprises a processor and a memory, wherein the memory is configured to store a program, and the processor is configured to implement the digital digest generation method according to any one of claims 1-5 when executing the program.
8. A computer-readable storage medium, characterized in that, A computer program is stored thereon, and the computer program is executed by a processor to implement the digital digest generation method according to any one of claims 1-5.
Citation Information
Patent Citations
Grouped multiple-key encryption method and grouped multiple-key encryption device
CN103716157A
Text abstract generation method and related device
CN112463955A