WO2018177206A1 - 信息加密方法和装置 - Google Patents

信息加密方法和装置 Download PDF

Info

Publication number
WO2018177206A1
WO2018177206A1 PCT/CN2018/080195 CN2018080195W WO2018177206A1 WO 2018177206 A1 WO2018177206 A1 WO 2018177206A1 CN 2018080195 W CN2018080195 W CN 2018080195W WO 2018177206 A1 WO2018177206 A1 WO 2018177206A1
Authority
WO
WIPO (PCT)
Prior art keywords
ciphertext
random salt
generate
current date
random
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.)
Ceased
Application number
PCT/CN2018/080195
Other languages
English (en)
French (fr)
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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information 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 Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to US16/490,003 priority Critical patent/US11194917B2/en
Publication of WO2018177206A1 publication Critical patent/WO2018177206A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6245Protecting personal data, e.g. for financial or medical purposes
    • G06F21/6254Protecting personal data, e.g. for financial or medical purposes by anonymising data, e.g. decorrelating personal data from the owner's identification
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09CCIPHERING OR DECIPHERING APPARATUS FOR CRYPTOGRAPHIC OR OTHER PURPOSES INVOLVING THE NEED FOR SECRECY
    • G09C1/00Apparatus or methods whereby a given sequence of signs, e.g. an intelligible text, is transformed into an unintelligible sequence of signs by transposing the signs or groups of signs or by replacing them by others according to a predetermined system
    • 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/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
    • 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/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/065Encryption by serially and continuously modifying data stream elements, e.g. stream cipher systems, RC4, SEAL or A5/3
    • 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/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
    • 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/0872Generation of secret information including derivation or calculation of cryptographic keys or passwords using geo-location information, e.g. location data, time, relative position or proximity to other entities
    • 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/12Transmitting and receiving encryption devices synchronised or initially set up in a particular manner
    • 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/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • H04L9/3239Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/12Details relating to cryptographic hardware or logic circuitry
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/42Anonymization, e.g. involving pseudonyms

Definitions

  • the present application relates to the field of computer technologies, and in particular, to the field of information encryption technologies, and in particular, to an information encryption method and apparatus.
  • Electronic face sheet has become a hub for logistics service providers to connect express orders, orders, merchants, commodities and other information.
  • Electronic face sheets are often referred to as thermal paper express labels, economical face sheets, two-dimensional code sheets, etc., generally roll-type or stacked three-layer thermal paper stickers, which generally print customer names on labels. , contact phone number, address and other information.
  • the purpose of the present application is to propose an improved information encryption method and apparatus to solve the technical problems mentioned in the background section above.
  • the embodiment of the present application provides an information encryption method, the method includes: acquiring customer information, where the customer information includes an item number and a phone number; and selecting, from a pre-generated random salt list, a current date Random salt, wherein the random salt list is used for storing dates and random salts; the irreversible encryption algorithm is used to encrypt the item number and the random salt corresponding to the current date to generate a first ciphertext; based on the first ciphertext, generate a number The second ciphertext of the type; the phone number is processed by the second ciphertext to generate a first encrypted phone number.
  • generating the second ciphertext of the digital type based on the first ciphertext includes: determining whether a letter exists in the first ciphertext; and replacing the letter in the first ciphertext in response to determining that the letter exists in the first ciphertext A preset number corresponding to the letter, and extracting the preset digit from the preset position of the replaced first ciphertext to generate a second ciphertext.
  • the method further includes: in response to determining that no letters are present in the first ciphertext, extracting the preset digits from the preset position of the first ciphertext to generate the second ciphertext.
  • processing the phone number with the second ciphertext to generate the first encrypted phone number includes: adding or subtracting the second ciphertext from the phone number to generate the first encrypted phone number.
  • the random salt list is further used to store the encoding; and the method further comprises: selecting an encoding corresponding to the current date from the random salt list; combining the encoding corresponding to the current date with the first encrypted telephone number , generating a second encrypted phone number.
  • the method further comprises the step of updating the random salt list, the step of updating the random salt list comprising: periodically determining whether there is a random salt in the random salt list corresponding to the current date and/or the future date; It is determined that there are no random salts corresponding to the current date and/or future date in the random salt list, random salts are generated and written in the row of the current date and/or future date in the random salt list.
  • the irreversible encryption algorithm is the fifth version of the message digest algorithm.
  • an embodiment of the present application provides an information encryption apparatus, where the apparatus includes: a customer information acquisition unit configured to acquire customer information, wherein the customer information includes an item number and a phone number; a random salt selection unit, configured And a random salt corresponding to the current date is selected from the pre-generated random salt list, wherein the random salt list is used for storing the date and the random salt; the first ciphertext generating unit is configured to use the irreversible encryption algorithm to the item list And the random salt corresponding to the current date is encrypted to generate a first ciphertext; the second ciphertext generating unit is configured to generate a second ciphertext of the digital type based on the first ciphertext; the first encrypted telephone number generating unit And configured to process the phone number with the second ciphertext to generate the first encrypted phone number.
  • the second ciphertext generating unit includes: a first ciphertext determining subunit configured to determine whether a letter exists in the first ciphertext; and a second ciphertext generating subunit configured to respond to determining the first A letter exists in the ciphertext, and the letter in the first ciphertext is replaced with a preset number corresponding to the letter, and the preset digit is extracted from the preset position of the replaced first ciphertext to generate a second ciphertext.
  • the second ciphertext generating subunit is further configured to: in response to determining that no letter exists in the first ciphertext, extract the preset digit from the preset position of the first ciphertext, and generate the second ciphertext .
  • the first encrypted telephone number generating unit is further configured to: add or subtract the second ciphertext from the telephone number to generate the first encrypted telephone number.
  • the random salt list is further used to store the encoding; and the apparatus further includes: an encoding selection unit configured to select an encoding corresponding to the current date from the random salt list; the second encrypted telephone number generating unit, The configuration is configured to combine the code corresponding to the current date and the first encrypted phone number to generate a second encrypted phone number.
  • the apparatus further comprises a random salt list update unit, a random salt list update unit comprising: a random salt determination subunit configured to periodically determine whether a random salt list exists with the current date and/or future a random salt corresponding to the date; a random salt generating subunit configured to generate a random salt and write the current date in the random salt list in response to determining that there is no random salt corresponding to the current date and/or future date in the random salt list And/or the line in which the future date is located.
  • a random salt list update unit comprising: a random salt determination subunit configured to periodically determine whether a random salt list exists with the current date and/or future a random salt corresponding to the date; a random salt generating subunit configured to generate a random salt and write the current date in the random salt list in response to determining that there is no random salt corresponding to the current date and/or future date in the random salt list And/or the line in which the future date is located.
  • the irreversible encryption algorithm is the fifth version of the message digest algorithm.
  • an embodiment of the present application provides an electronic device, where the electronic device includes: one or more processors; and a storage device, configured to store one or more programs, when one or more programs are one or more The processor executes such that one or more processors implement the method as described in any one of the first aspects.
  • the embodiment of the present application provides a computer readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the method described in any one of the first aspects is implemented.
  • the information encryption method and device provided by the embodiment of the present invention generates an first ciphertext by using an irreversible encryption algorithm to encrypt an item number in the customer information and a random salt corresponding to the current date; and then generate the first ciphertext based on the first ciphertext.
  • the second ciphertext of the digital type finally, the telephone number in the customer information is processed by the second ciphertext, thereby obtaining the first encrypted telephone number. Since the encrypted telephone number (ie, the first encrypted telephone number) is printed on the electronic face sheet, the leakage of the customer's private information is avoided.
  • FIG. 1 is an exemplary system architecture diagram in which an embodiment of the present application can be applied;
  • FIG. 2 is a flow chart of one embodiment of an information encryption method according to the present application.
  • FIG. 3 is a schematic diagram of an application scenario corresponding to the embodiment shown in FIG. 2;
  • FIG. 5 is a schematic diagram of an application scenario corresponding to the embodiment shown in FIG. 4;
  • FIG. 5 is a schematic diagram of an application scenario corresponding to the embodiment shown in FIG. 4;
  • FIG. 6 is a schematic structural diagram of an embodiment of an information encryption apparatus according to the present application.
  • FIG. 7 is a block diagram showing the structure of a computer system suitable for implementing the electronic device of the embodiment of the present application.
  • FIG. 1 illustrates an exemplary system architecture 100 of an embodiment of an information encryption method or information encryption apparatus to which embodiments of the present application may be applied.
  • system architecture 100 can include terminal device 101, printer 102, network 103, and server 104.
  • the network 103 is used to provide a medium for communication links between the terminal device 101, the printer 102, and the server 104.
  • Network 103 may include various types of connections, such as wired, wireless communication links, or fiber optic cables, to name a few.
  • the user can interact with the server 104 over the network 103 using the terminal device 101 to receive or transmit messages and the like.
  • Various software such as office software, printing software, and the like can be installed on the terminal device 101.
  • the terminal device 101 may be various electronic devices that support information browsing, including but not limited to smartphones, tablets, laptop portable computers, desktop computers, and the like.
  • the server 104 may be a server that provides various services, such as a background server that provides support for the terminal device 101 and the information displayed thereon.
  • the background server may perform processing such as analysis of the client information transmitted by the terminal device 101 and feed back the processing result (for example, the first encrypted telephone number) to the terminal device 101.
  • the printer 102 may be a printer for printing an electronic receipt including processing results (eg, a first encrypted telephone number).
  • the information encryption method provided by the embodiment of the present application is generally performed by the server 104. Accordingly, the information encryption apparatus is generally disposed in the server 104.
  • terminal devices, printers, networks, and servers in Figure 1 is merely illustrative. Depending on the implementation needs, there can be any number of terminal devices, printers, networks, and servers.
  • the information encryption method includes the following steps:
  • Step 201 Obtain customer information.
  • an electronic device e.g., server 104 shown in FIG. 1 on which the information encryption method operates may acquire customer information from a client (e.g., terminal device 101 shown in FIG. 1) communicatively coupled thereto.
  • the customer information may include the item number and the phone number.
  • the item number can also be referred to as the courier number, usually consisting of numbers and/or letters, and is the unique identification code for the courier package.
  • the courier company, the sender, and the recipient can track the courier package in real time through the item number.
  • Step 202 Select a random salt corresponding to the current date from the pre-generated random salt list.
  • the electronic device may select a random salt corresponding to the current date from the pre-generated random salt list.
  • the random salt is a randomly generated set of strings, which may include random uppercase and lowercase letters, numbers, characters, and the number of bits may be set as needed.
  • a random salt list can be used to store dates and random salts, which are generally different for different dates.
  • a random salt list may store dates and random salts in the form shown in Table 1:
  • the electronic device can obtain the random salt "F2DA9A9DC78F51D3B49AD6AD05E66465" corresponding to the current date by querying Table 1.
  • Step 203 Encrypt the item number and the random salt corresponding to the current date by using an irreversible encryption algorithm to generate a first ciphertext.
  • the electronic device may use an irreversible encryption algorithm to the item number and the random salt corresponding to the current date. Encryption is performed to generate the first ciphertext.
  • the item number and the random salt corresponding to the current date are plaintext, and the first ciphertext is a ciphertext corresponding to the item number and the random salt corresponding to the current date.
  • the feature of the irreversible encryption algorithm is that the key is not needed in the encryption process, and the plaintext is input and the system directly processes the ciphertext through the encryption algorithm. This encrypted data cannot be decrypted. It can only be decrypted if the plaintext is re-entered and processed again by the same irreversible encryption algorithm to obtain the same encrypted ciphertext and be re-recognized by the system.
  • the irreversible encryption algorithm is MD5 (Message Digest Algorithm MD5, message digest algorithm fifth edition).
  • MD5 is a hash function widely used in the field of computer security to provide message integrity protection.
  • the role of MD5 is to allow large amounts of information to be "compressed" into a secure format before signing the private key with the digital signature software, i.e., to convert a string of arbitrary length into a string of hexadecimal digits of a certain length.
  • the random salt corresponding to the current date is "F2DA9A9DC78F51D3B49AD6AD05E66465", and the electronic device uses MD5 to encrypt the item number and the random salt corresponding to the current date:
  • Vmd5 MD5("1198073208-1-2-7"+
  • the first ciphertext is "C2D8B4A40A5E3595D851ADFB6E384805".
  • Step 204 Generate a second ciphertext of a digital type based on the first ciphertext.
  • the electronic device can generate a second ciphertext of a digital type.
  • the first ciphertext obtained by the electronic device using the irreversible encryption algorithm is a hexadecimal string. Since the hexadecimal number is composed of 0-9 and A-F, letters usually exist in the first ciphertext. In this way, the electronic device is required to generate a second ciphertext of a letter-free digital type according to the first ciphertext.
  • the electronic device may convert the first ciphertext in hexadecimal to a decimal number, and use the converted decimal number as the second ciphertext.
  • the electronic device may first convert the first ciphertext in hexadecimal to a decimal number; and then extract the preset digit from the preset position of the converted decimal number ( For example, a tenth digit is extracted from the first digit of the converted decimal number as the second ciphertext.
  • the electronic device may determine whether a letter exists in the first ciphertext; and in response to determining that a letter exists in the first ciphertext, replace the letter in the first ciphertext with a preset correspondence with the letter The number will be replaced by the first ciphertext as the second ciphertext.
  • the first ciphertext is "C2D8B4A40A5E3595D851ADFB6E384805", and the electronic device can replace the letters in the first ciphertext with the numbers corresponding to the letters according to the letters AF corresponding to the numbers 1-6, respectively, to generate the replaced first ciphertext. "32482414015535954851146265384805" and use it as the second ciphertext.
  • the electronic device may determine whether a letter exists in the first ciphertext; and in response to determining that no letter exists in the first ciphertext, the first ciphertext is used as the second ciphertext.
  • the electronic device may determine whether a letter exists in the first ciphertext; and in response to determining that a letter exists in the first ciphertext, replace the letter in the first ciphertext with a preset correspondence with the letter And extracting a preset number from the preset position of the replaced first ciphertext (for example, extracting ten digits from the first digit of the replaced first ciphertext) to generate a second ciphertext.
  • the first ciphertext is "C2D8B4A40A5E3595D851ADFB6E384805"
  • the electronic device can replace the letters in the first ciphertext with the numbers corresponding to the letters according to the letters AF corresponding to the numbers 1-6, respectively, to generate the replaced first ciphertext.
  • the electronic device may determine whether a letter exists in the first ciphertext; and in response to determining that no letter exists in the first ciphertext, extracting the preset bit from the preset position of the first ciphertext The number (for example, extracting ten digits from the first digit of the first ciphertext) generates a second ciphertext.
  • Step 205 Process the phone number with the second ciphertext to generate the first encrypted phone number.
  • the electronic device can process the phone number with the second ciphertext to generate a first encrypted phone number.
  • the electronic device can perform a simple mathematical operation on the second ciphertext and the phone number, and use the result of the operation as the first encrypted phone number.
  • the electronic device may add or subtract the second ciphertext from the phone number to generate the first encrypted phone number.
  • the electronic device may add the second ciphertext and the phone number, and add the sum and the "20338382740" as the first encrypted phone. number.
  • the electronic device may also update the random salt list.
  • the electronic device can periodically determine whether there is a random salt corresponding to the current date and/or future date in the random salt list; generating a random in response to determining that there is no random salt corresponding to the current date and/or future date in the random salt list Salt is written to the current date and/or future date in the random salt list.
  • the electronic device may query the random salt list at the zero point of each day to determine whether there is a random salt corresponding to the current date in the random salt list and a random salt corresponding to the next 4 days, and if not, generate a random salt and write Random salt list; if it exists, the update process ends.
  • FIG. 3 is a schematic diagram of an application scenario corresponding to the embodiment shown in FIG. 2.
  • the client first sends client information to the server, wherein the client information includes the item number "1198073208-1-2-7" and the phone number "17090141339"; after that, the server generates a random salt from the pre-generation The random salt "F2DA9A9DC78F51D3B49AD6AD05E66465" corresponding to the current date "2017/1/1" is selected in the list; then, the server uses MD5 to encrypt the item number and the random salt corresponding to the current date to generate the first ciphertext "C2D8B4A40A5E3595D851ADFB6E384805"; Then, the server replaces the letters in the first ciphertext with the numbers corresponding to the letters according to the letters AF respectively corresponding to the numbers 1-6, and generates the replaced first ciphertext "3248241401553595485114
  • the server adds the second ciphertext and the phone number to obtain the first encrypted phone number "20338382740".
  • the client uses an electronic single-printer to print an electronic receipt with print time, origin, destination, encrypted customer information, customer signature, and payment method.
  • Figure 3 shows the electronic order sheet, in which the printing time is "2017-01-01 08:00:00", the origin is "Beijing", the destination is "Tianjin", and the customer information includes the recipient's name: "Wang **", the first encrypted telephone number: "20338382740", the address: "Wuxi Road Building, Wuxi Road, Hexi District, Tianjin", the payment method is "online payment”.
  • the delivery personnel needs to perform local analysis on the first encrypted telephone number in the process of distributing the articles, and obtain the telephone number before the customer is encrypted to complete the delivery of the articles.
  • the distribution personnel need to store a random salt list in advance on the handheld device; after that, the delivery personnel will print the date on the electronic receipt "2017-01-01", the item number "1198073208-1-2-7" and the An encrypted telephone number "20338382740" is input to the handheld device; then, the handheld device finds the random salt corresponding to the date "2017-01-01" from the pre-stored random salt list: "F2DA9A9DC78F51D3B49AD6AD05E66465", and uses the MD5 pair of items
  • the single number and the random salt corresponding to the date "2017-01-01” are encrypted to generate the first ciphertext "C2D8B4A40A5E3595D851ADFB6E384805"; then, the handheld device according to the letter AF corresponding to the number 1-6, the first ciphertext The letter
  • the information encryption method provided by the embodiment of the present application encrypts an item number in the customer information and a random salt corresponding to the current date by using an irreversible encryption algorithm to generate a first ciphertext; and then generates a digital type based on the first ciphertext.
  • the second ciphertext; finally, the second ciphertext is used to process the phone number in the customer information, thereby obtaining the first encrypted phone number. Since the encrypted phone number is printed on the electronic face sheet, the leakage of the customer's private information is avoided.
  • the process 400 of the information encryption method includes the following steps:
  • step 401 customer information is obtained.
  • an electronic device e.g., server 104 shown in FIG. 1 on which the information encryption method operates may acquire customer information from a client (e.g., terminal device 101 shown in FIG. 1) communicatively coupled thereto.
  • the customer information may include the item number and the phone number.
  • the item number can also be called a courier number, usually composed of numbers and/or letters, and is the unique identification code of the courier package.
  • the courier company, the sender, and the recipient can track the courier package in real time through the item number.
  • Step 402 Select a random salt corresponding to the current date from the pre-generated random salt list.
  • the electronic device may select a random salt corresponding to the current date from the pre-generated random salt list.
  • the random salt is a randomly generated set of strings, which may include random uppercase and lowercase letters, numbers, characters, and the number of bits may be set as needed.
  • a random salt list can be used to store dates and random salts, which are generally different for different dates.
  • Step 403 Encrypt the item number and the random salt corresponding to the current date by using an irreversible encryption algorithm to generate a first ciphertext.
  • the electronic device may use an irreversible encryption algorithm to use the item number and the random salt corresponding to the current date. Encryption is performed to generate the first ciphertext.
  • the item number and the random salt corresponding to the current date are plaintext, and the first ciphertext is a ciphertext corresponding to the item number and the random salt corresponding to the current date.
  • Step 404 Generate a second ciphertext of a digital type based on the first ciphertext.
  • the electronic device can generate a second ciphertext of a digital type.
  • Step 405 Process the phone number with the second ciphertext to generate the first encrypted phone number.
  • the electronic device can process the phone number with the second ciphertext to generate a first encrypted phone number.
  • the electronic device can perform a simple mathematical operation on the second ciphertext and the phone number, and use the result of the operation as the first encrypted phone number.
  • Step 406 Select an encoding corresponding to the current date from the random salt list.
  • the electronic device may select an encoding corresponding to the current date from the random salt list.
  • the random salt list can also be used to store the code.
  • the encoded field type is a number.
  • the random salts corresponding to the same code are the same, and the random salts corresponding to different codes are generally different.
  • the random salt list is also used to store the auto-increment primary key.
  • the field type of the self-incrementing primary key is a number, an increment, and is a primary key.
  • the primary key is the column whose field is not null.
  • the encoding can generally be obtained by taking the preset value by the self-incrementing primary key, so that the preset numerical random salt can also be recycled. As an example, the encoding can be obtained by taking the self-incrementing primary key pair 100.
  • the random salt list can be stored in the form shown in Table 2 for self-incrementing primary keys, codes, dates, and random salts:
  • Step 407 Combine the code corresponding to the current date with the first encrypted phone number to generate a second encrypted phone number.
  • the electronic device may combine the code corresponding to the current date with the first encrypted phone number. Generate a second encrypted phone number. As an example, if the first encrypted telephone number is "20338382740" and the code corresponding to the current date is "01", the electronic device may combine the code corresponding to the current date and the first encrypted telephone number to generate a second encrypted telephone. The number is "0120338382740".
  • FIG. 5 is a schematic diagram of an application scenario corresponding to the embodiment shown in FIG.
  • the client first sends client information to the server, wherein the client information includes the item number "1198073208-1-2-7" and the phone number "17090141339"; after that, the server generates a random salt from the pre-generation The random salt "F2DA9A9DC78F51D3B49AD6AD05E66465" corresponding to the current date "2017/1/1" is selected in the list; then, the server uses MD5 to encrypt the item number and the random salt corresponding to the current date to generate the first ciphertext "C2D8B4A40A5E3595D851ADFB6E384805"; Then, the server replaces the letters in the first ciphertext with the numbers corresponding to the letters according to the letters AF respectively corresponding to the numbers 1-6, and generates the replaced first ciphertext "324824140155359548511462
  • the server adds the second ciphertext and the phone number to obtain the first encrypted phone number "20338382740"; finally, the server selects the code "01" corresponding to the current date from the random salt list, and will correspond to the current date.
  • the code is combined with the first encrypted telephone number to generate a second encrypted telephone number "0120338382740".
  • the client uses an electronic printer to print an electronic receipt with the print time, origin, destination, encrypted customer information customer signature, and payment method.
  • Figure 5 shows the electronic face sheet, in which the printing time is "2017-01-01 08:00:00", the origin is “Beijing”, the destination is "Tianjin”, and the customer information includes the recipient's name: “Wang **”, the second encrypted telephone number: "0120338382740", the address: "Wuxi Road Building, Wuxi Road, Hexi District, Tianjin”, the payment method is "online payment”.
  • the delivery personnel need to perform local analysis on the second encrypted telephone number in the process of distributing the articles, and obtain the telephone number before the customer is encrypted to complete the delivery of the articles.
  • the distribution personnel need to pre-store a random salt list on the handheld device; after that, the delivery personnel will use the item number "1198073208-1-2-7" and the second encrypted telephone number "0120338382740" on the electronic form of Figure 5.
  • the handheld device parses the second encrypted phone number to obtain the first code "01” and the first encrypted phone number "20338382740"; then, the handheld device finds out from the pre-stored random salt list
  • the flow 400 of the information encryption method in the present embodiment adds steps 406 and 407 as compared with the embodiment corresponding to FIG.
  • the delivery personnel can input the print date, and the handheld device can be based on the second encrypted phone number.
  • the code finds the random salt corresponding to the code, so that the distribution personnel can decrypt the information more quickly.
  • the present application provides an embodiment of an information encryption apparatus, and the apparatus embodiment corresponds to the method embodiment shown in FIG. Used in a variety of electronic devices.
  • the information encryption apparatus 600 shown in this embodiment includes: a client information acquisition unit 601, a random salt selection unit 602, a first ciphertext generation unit 603, a second ciphertext generation unit 604, and a first encrypted telephone.
  • the customer information obtaining unit 601 is configured to acquire customer information, wherein the customer information includes an item number and a phone number
  • the random salt selecting unit 602 is configured to select, from the pre-generated random salt list, the current date.
  • the random salt list is used to store the date and the random salt
  • the first ciphertext generating unit 603 is configured to encrypt the item number and the random salt corresponding to the current date by using an irreversible encryption algorithm to generate the first
  • the second ciphertext generating unit 604 is configured to generate a second ciphertext of the digital type based on the first ciphertext
  • the first encrypted telephone number generating unit 605 is configured to perform the second ciphertext on the telephone number Processing, generating a first encrypted phone number.
  • the information encryption device 600 the client information acquisition unit 601, the random salt selection unit 602, the first ciphertext generation unit 603, the second ciphertext generation unit 604, and the first encrypted phone number generation unit 605 are specific
  • the client information acquisition unit 601 the random salt selection unit 602
  • the first ciphertext generation unit 603, the second ciphertext generation unit 604, and the first encrypted phone number generation unit 605 are specific
  • the second ciphertext generating unit 604 includes: a first ciphertext determining subunit (not shown) configured to determine whether a letter exists in the first ciphertext; a second ciphertext generating subunit (not shown) configured to replace the letter in the first ciphertext with a preset number corresponding to the letter in response to determining that a letter exists in the first ciphertext, and from the replaced The preset position of the first ciphertext starts to extract the preset digits to generate a second ciphertext.
  • the second ciphertext generating subunit (not shown) is further configured to: in response to determining that no letter exists in the first ciphertext, from the first ciphertext pre Set the position to start extracting the preset digits to generate the second ciphertext.
  • the first encrypted phone number generating unit 605 is further configured to: add or subtract the second ciphertext from the phone number to generate the first encrypted phone number.
  • the random salt list is further used to store the encoding; and the information encryption apparatus 600 further includes: an encoding selection unit (not shown) configured to select from the random salt list An encoding corresponding to the current date; a second encrypted telephone number generating unit (not shown) configured to combine the encoding corresponding to the current date with the first encrypted telephone number to generate a second encrypted telephone number.
  • the information encryption apparatus 600 further includes a random salt list update unit (not shown), and a random salt list update unit (not shown), including: random salt determination. a subunit (not shown) configured to periodically determine whether there is a random salt corresponding to the current date and/or future date in the random salt list; a random salt generating subunit (not shown), configured In response to determining that there is no random salt corresponding to the current date and/or future date in the random salt list, a random salt is generated and written into the row of the current date and/or future date in the random salt list.
  • the irreversible encryption algorithm is the fifth version of the message digest algorithm.
  • FIG. 7 a block diagram of a computer system 700 suitable for use in implementing the electronic device of the embodiments of the present application is shown.
  • the electronic device shown in FIG. 7 is merely an example, and should not impose any limitation on the function and scope of use of the embodiments of the present application.
  • computer system 700 includes a central processing unit (CPU) 701 that can be loaded into a program in random access memory (RAM) 703 according to a program stored in read only memory (ROM) 702 or from storage portion 708. And perform various appropriate actions and processes.
  • RAM random access memory
  • ROM read only memory
  • RAM 703 various programs and data required for the operation of the system 700 are also stored.
  • the CPU 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704.
  • An input/output (I/O) interface 705 is also coupled to bus 704.
  • the following components are connected to the I/O interface 705: an input portion 706 including a keyboard, a mouse, etc.; an output portion 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), and the like, and a speaker; a storage portion 708 including a hard disk or the like And a communication portion 709 including a network interface card such as a LAN card, a modem, or the like.
  • the communication section 709 performs communication processing via a network such as the Internet.
  • Driver 710 is also connected to I/O interface 705 as needed.
  • a removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory or the like, is mounted on the drive 710 as needed so that a computer program read therefrom is installed into the storage portion 708 as needed.
  • an embodiment of the present disclosure includes a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for executing the method illustrated in the flowchart.
  • the computer program can be downloaded and installed from the network via communication portion 709, and/or installed from removable media 711.
  • the central processing unit (CPU) 701 the above-described functions defined in the method of the present application are performed.
  • the computer readable medium described above may be a computer readable signal medium or a computer readable storage medium or any combination of the two.
  • the computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of computer readable storage media may include, but are not limited to, electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable Programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the foregoing.
  • a computer readable storage medium may be any tangible medium that can contain or store a program, which can be used by or in connection with an instruction execution system, apparatus or device.
  • a computer readable signal medium may include a data signal that is propagated in the baseband or as part of a carrier, carrying computer readable program code. Such propagated data signals can take a variety of forms including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • the computer readable signal medium can also be any computer readable medium other than a computer readable storage medium, which can transmit, propagate, or transport a program for use by or in connection with the instruction execution system, apparatus, or device.
  • Program code embodied on a computer readable medium can be transmitted by any suitable medium, including but not limited to wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
  • each block of the flowchart or block diagram can represent a module, a program segment, or a portion of code that includes one or more of the logic functions for implementing the specified.
  • Executable instructions can also occur in a different order than that illustrated in the drawings. For example, two successively represented blocks may in fact be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the block diagrams and/or flowcharts, and combinations of blocks in the block diagrams and/or flowcharts can be implemented in a dedicated hardware-based system that performs the specified function or operation. Or it can be implemented by a combination of dedicated hardware and computer instructions.
  • the units involved in the embodiments of the present application may be implemented by software or by hardware.
  • the described unit may also be disposed in the processor, for example, as a processor including a client information acquisition unit, a random salt selection unit, a first ciphertext generation unit, a second ciphertext generation unit, and a first encryption. Phone number generation unit.
  • the name of these units does not constitute a limitation on the unit itself in some cases.
  • the customer information obtaining unit may also be described as “a unit that acquires customer information”.
  • the present application further provides a computer readable medium, which may be included in an electronic device described in the above embodiments, or may be separately present without being assembled into the electronic device.
  • the computer readable medium carries one or more programs, when the one or more programs are executed by the electronic device, causing the electronic device to: obtain customer information, wherein the customer information includes an item number and a phone number;
  • the random salt list corresponding to the current date is selected from the generated random salt list, wherein the random salt list is used for storing the date and the random salt;
  • the irreversible encryption algorithm is used to encrypt the item number and the random salt corresponding to the current date to generate the first a ciphertext; generating a digital second ciphertext based on the first ciphertext; processing the phone number with the second ciphertext to generate a first encrypted telephone number.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Medical Informatics (AREA)
  • Databases & Information Systems (AREA)
  • Telephonic Communication Services (AREA)
  • Storage Device Security (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Telephone Function (AREA)

Abstract

本申请公开了信息加密方法和装置。该方法的一具体实施方式包括:获取客户信息,其中,客户信息包括物品单号和电话号码;从预先生成的随机盐列表中选取出与当前日期对应的随机盐,其中,随机盐列表用于存储日期和随机盐;采用不可逆加密算法对物品单号和与当前日期对应的随机盐进行加密,生成第一密文;基于第一密文,生成数字型的第二密文;用第二密文对电话号码进行处理,生成第一加密电话号码。该实施方式避免了客户隐私信息的泄露。

Description

信息加密方法和装置
本专利申请要求于2017年3月31日提交的、申请号为201710208832.6、申请人为北京京东世纪贸易有限公司和北京京东尚科信息技术有限公司、发明名称为“信息加密方法和装置”的中国专利申请的优先权,该申请的全文以引用的方式并入本申请中。
技术领域
本申请涉及计算机技术领域,具体涉及信息加密技术领域,尤其涉及信息加密方法和装置。
背景技术
随着电子商务平台和物流信息化的飞速发展,电子面单已经成为物流服务商串联快递单、订单、商家、商品等各种信息的枢纽。电子面单通常又被称为热敏纸快递标签、经济型面单,二维码面单等,一般为卷式或层叠式三层热敏纸不干胶标签,标签上一般会打印客户姓名、联系电话、地址等信息。
电子面单因其打印效率高、人工成本低等优势,已经在国内外物流行业被成功运用多年。然而,电子面单上打印有客户联系电话等隐私信息,一旦丢失,就会导致客户隐私信息的泄露。
发明内容
本申请的目的在于提出一种改进的信息加密方法和装置,来解决以上背景技术部分提到的技术问题。
第一方面,本申请实施例提供了一种信息加密方法,该方法包括:获取客户信息,其中,客户信息包括物品单号和电话号码;从预先生成的随机盐列表中选取出与当前日期对应的随机盐,其中,随机盐列表用于存储日期和随机盐;采用不可逆加密算法对物品单号和与当前 日期对应的随机盐进行加密,生成第一密文;基于第一密文,生成数字型的第二密文;用第二密文对电话号码进行处理,生成第一加密电话号码。
在一些实施例中,基于第一密文,生成数字型的第二密文,包括:确定第一密文中是否存在字母;响应于确定第一密文中存在字母,将第一密文中的字母替换成预设的与字母对应的数字,并从替换后的第一密文的预设位置开始抽取预设位数字,生成第二密文。
在一些实施例中,该方法还包括:响应于确定第一密文中不存在字母,从第一密文的预设位置开始抽取预设位数字,生成第二密文。
在一些实施例中,用第二密文对电话号码进行处理,生成第一加密电话号码,包括:将第二密文与电话号码相加或相减,生成第一加密电话号码。
在一些实施例中,随机盐列表还用于存储编码;以及该方法还包括:从随机盐列表中选取出与当前日期对应的编码;将与当前日期对应的编码和第一加密电话号码进行组合,生成第二加密电话号码。
在一些实施例中,该方法还包括更新随机盐列表的步骤,更新随机盐列表的步骤包括:周期性地确定随机盐列表中是否存在与当前日期和/或未来日期对应的随机盐;响应于确定随机盐列表中不存在与当前日期和/或未来日期对应的随机盐,生成随机盐并写入随机盐列表中的当前日期和/或未来日期所在的行中。
在一些实施例中,不可逆加密算法是消息摘要算法第五版。
第二方面,本申请实施例提供了一种信息加密装置,该装置包括:客户信息获取单元,配置用于获取客户信息,其中,客户信息包括物品单号和电话号码;随机盐选取单元,配置用于从预先生成的随机盐列表中选取出与当前日期对应的随机盐,其中,随机盐列表用于存储日期和随机盐;第一密文生成单元,配置用于采用不可逆加密算法对物品单号和与当前日期对应的随机盐进行加密,生成第一密文;第二密文生成单元,配置用于基于第一密文,生成数字型的第二密文;第一加密电话号码生成单元,配置用于用第二密文对电话号码进行处理,生成第一加密电话号码。
在一些实施例中,第二密文生成单元包括:第一密文确定子单元,配置用于确定第一密文中是否存在字母;第二密文生成子单元,配置用于响应于确定第一密文中存在字母,将第一密文中的字母替换成预设的与字母对应的数字,并从替换后的第一密文的预设位置开始抽取预设位数字,生成第二密文。
在一些实施例中,第二密文生成子单元还配置用于:响应于确定第一密文中不存在字母,从第一密文的预设位置开始抽取预设位数字,生成第二密文。
在一些实施例中,第一加密电话号码生成单元进一步配置用于:将第二密文与电话号码相加或相减,生成第一加密电话号码。
在一些实施例中,随机盐列表还用于存储编码;以及该装置还包括:编码选取单元,配置用于从随机盐列表中选取出与当前日期对应的编码;第二加密电话号码生成单元,配置用于将与当前日期对应的编码和第一加密电话号码进行组合,生成第二加密电话号码。
在一些实施例中,该装置还包括随机盐列表更新单元,随机盐列表更新单元,包括:随机盐确定子单元,配置用于周期性地确定随机盐列表中是否存在与当前日期和/或未来日期对应的随机盐;随机盐生成子单元,配置用于响应于确定随机盐列表中不存在与当前日期和/或未来日期对应的随机盐,生成随机盐并写入随机盐列表中的当前日期和/或未来日期所在的行中。
在一些实施例中,不可逆加密算法是消息摘要算法第五版。
第三方面,本申请实施例提供了一种电子设备,该电子设备包括:一个或多个处理器;存储装置,用于存储一个或多个程序,当一个或多个程序被一个或多个处理器执行,使得一个或多个处理器实现如第一方面中任一实现方式描述的方法。
第四方面,本申请实施例提供了一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现如第一方面中任一实现方式描述的方法。
本申请实施例提供的信息加密方法和装置,通过采用不可逆加密算法对客户信息中的物品单号和与当前日期对应的随机盐进行加密, 生成第一密文;然后基于第一密文,生成数字型的第二密文;最后用第二密文对客户信息中的电话号码进行处理,从而得到第一加密电话号码。由于电子面单上打印的是加密后的电话号码(即第一加密电话号码),避免了客户隐私信息的泄露。
附图说明
通过阅读参照以下附图所作的对非限制性实施例所作的详细描述,本申请的其它特征、目的和优点将会变得更明显:
图1是本申请实施例可以应用于其中的示例性系统架构图;
图2是根据本申请的信息加密方法的一个实施例的流程图;
图3是图2所示的实施例对应的一个应用场景的示意图;
图4是根据本申请的信息加密方法的又一个实施例的流程图;
图5是图4所示的实施例对应的一个应用场景的示意图;
图6是根据本申请的信息加密装置的一个实施例的结构示意图;
图7是适于用来实现本申请实施例的电子设备的计算机系统的结构示意图。
具体实施方式
下面结合附图和实施例对本申请作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释相关发明,而非对该发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与有关发明相关的部分。
需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本申请。
图1示出了可以应用本申请实施例的信息加密方法或信息加密装置的实施例的示例性系统架构100。
如图1所示,系统架构100可以包括终端设备101、打印机102、网络103和服务器104。网络103用以在终端设备101、打印机102和服务器104之间提供通信链路的介质。网络103可以包括各种连接 类型,例如有线、无线通信链路或者光纤电缆等等。
用户可以使用终端设备101通过网络103与服务器104交互,以接收或发送消息等。终端设备101上可以安装有各种软件,例如办公软件、打印软件等等。
终端设备101可以是支持信息浏览的各种电子设备,包括但不限于智能手机、平板电脑、膝上型便携计算机和台式计算机等等。
服务器104可以是提供各种服务的服务器,例如对终端设备101、上显示的信息提供支持的后台服务器。后台服务器可以对终端设备101发送的客户信息进行分析等处理并将处理结果(例如第一加密电话号码)反馈给终端设备101。
打印机102可以是用于打印包括处理结果(例如第一加密电话号码)的电子面单的打印机。
需要说明的是,本申请实施例所提供的信息加密方法一般由服务器104执行,相应地,信息加密装置一般设置于服务器104中。
应该理解,图1中的终端设备、打印机、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、打印机、网络和服务器。
继续参考图2,示出了根据本申请的信息加密方法的一个实施例的流程200。该信息加密方法,包括以下步骤:
步骤201,获取客户信息。
在本实施例中,信息加密方法运行于其上的电子设备(例如图1所示的服务器104)可以从与其通信连接的客户端(例如图1所示的终端设备101)获取客户信息。其中,客户信息可以包括物品单号和电话号码。物品单号又可以被称为快递单号,通常由数字和/或字母组成,是快递包裹的唯一标识代码。快递公司、发件人以及收件人可以通过物品单号对快递包裹进行实时跟踪。
步骤202,从预先生成的随机盐列表中选取出与当前日期对应的随机盐。
在本实施例中,电子设备可以从预先生成的随机盐列表中选取出与当前日期对应的随机盐。其中,随机盐是随机生成的一组字符串, 可以包括随机的大小写字母、数字、字符,其位数可以根据需要而设置。随机盐列表可以用于存储日期和随机盐,不同的日期对应的随机盐一般不同。
作为示例,随机盐列表可以采用如表1所示的形式对日期和随机盐进行存储:
日期 随机盐
2017/1/1 F2DA9A9DC78F51D3B49AD6AD05E66465
2017/1/2 3118C00E769827C4528D3DAD453A8E55
2017/1/3 0765ECEBDFD669179ABC6CB4EFD499B9
…… ……
2017/12/30 9EC1124DBA808065D31AC69545B66B1A
2017/12/31 7416F7F8335378B18567E0E51890ED37
表1
若当前日期是“2017/1/1”,电子设备可以通过查询表1获取与当前日期对应的随机盐“F2DA9A9DC78F51D3B49AD6AD05E66465”。
步骤203,采用不可逆加密算法对物品单号和与当前日期对应的随机盐进行加密,生成第一密文。
在本实施例中,基于步骤201中获取到的物品单号和步骤202中选取出的与当前日期对应的随机盐,电子设备可以采用不可逆加密算法对物品单号和与当前日期对应的随机盐进行加密,生成第一密文。其中,物品单号和与当前日期对应的随机盐是明文,第一密文是与物品单号和与当前日期对应的随机盐对应的密文。
在这里,不可逆加密算法的特征是加密过程中不需要使用密钥,输入明文后由系统直接经过加密算法处理成密文。这种加密后的数据是无法被解密的,只有重新输入明文,并再次经过同样不可逆的加密算法处理,得到相同的加密密文并被系统重新识别后,才能真正解密。
在本实施例的一些可选的实现方式中,不可逆加密算法是MD5(Message Digest Algorithm MD5,消息摘要算法第五版)。其中,MD5为计算机安全领域广泛使用的一种散列函数,用以提供消息的完整性保护。MD5的作用是让大容量信息在用数字签名软件签署私人密钥前被“压缩”成一种保密的格式,即把一个任意长度的字节串变换成一 定长的十六进制数字串。
作为示例,若物品单号是“1198073208-1-2-7”,与当前日期对应的随机盐是“F2DA9A9DC78F51D3B49AD6AD05E66465”,电子设备采用MD5对物品单号和与当前日期对应的随机盐进行加密:
Vmd5=MD5(“1198073208-1-2-7”+
“F2DA9A9DC78F51D3B49AD6AD05E66465”)
=C2D8B4A40A5E3595D851ADFB6E384805。
其中,第一密文即为“C2D8B4A40A5E3595D851ADFB6E384805”。
步骤204,基于第一密文,生成数字型的第二密文。
在本实施例中,基于步骤203中生成的第一密文,电子设备可以生成数字型的第二密文。
通常情况下,电子设备采用不可逆加密算法得到的第一密文是一个十六进制的字符串。由于十六进制数是由0-9、A-F组成的,第一密文中通常会存在字母。这样就需要电子设备根据第一密文生成不含字母的数字型的第二密文。
在本实施例的一些可选的实现方式中,电子设备可以将十六进制的第一密文转换成十进制数,将转换成的十进制数作为第二密文。
在本实施例的一些可选的实现方式中,电子设备可以首先将十六进制的第一密文转换成十进制数;然后从转换成的十进制数的预设位置开始抽取预设位数字(例如,从转换成的十进制数的首位数字开始抽取十位数字)作为第二密文。
在本实施例的一些可选的实现方式中,电子设备可以确定第一密文中是否存在字母;响应于确定第一密文中存在字母,将第一密文中的字母替换成预设的与字母对应的数字,并将替换后的第一密文作为第二密文。作为示例,第一密文是“C2D8B4A40A5E3595D851ADFB6E384805”,电子设备可以按照字母A-F分别对应数字1-6的方式,将第一密文中的字母替换成与字母对应的数字,生成替换后的第一密文“32482414015535954851146265384805”,并将其作为第二密文。
在本实施例的一些可选的实现方式中,电子设备可以确定第一密 文中是否存在字母;响应于确定第一密文中不存在字母,将第一密文作为第二密文。
在本实施例的一些可选的实现方式中,电子设备可以确定第一密文中是否存在字母;响应于确定第一密文中存在字母,将第一密文中的字母替换成预设的与字母对应的数字,并从替换后的第一密文的预设位置开始抽取预设位数字(例如,从替换后的第一密文的首位数字开始抽取十位数字),生成第二密文。作为示例,第一密文是“C2D8B4A40A5E3595D851ADFB6E384805”,电子设备可以按照字母A-F分别对应数字1-6的方式,将第一密文中的字母替换成与字母对应的数字,生成替换后的第一密文“32482414015535954851146265384805”,并从替换后的第一密文的首位数字开始抽取十位数字得到“3248241401”,并将其作为第二密文。
在本实施例的一些可选的实现方式中,电子设备可以确定第一密文中是否存在字母;响应于确定第一密文中不存在字母,从第一密文的预设位置开始抽取预设位数字(例如,从第一密文的首位数字开始抽取十位数字),生成第二密文。
步骤205,用第二密文对电话号码进行处理,生成第一加密电话号码
在本实施例中,基于步骤204中生成的第二密文和步骤201中获取到的电话号码,电子设备可以用第二密文对电话号码进行处理,生成第一加密电话号码。作为示例,电子设备可以对第二密文和电话号码进行简单的数学运算,并将运算结果作为第一加密电话号码。
在本实施例的一些可选的实现方式中,电子设备可以将第二密文与电话号码相加或相减,生成第一加密电话号码。作为示例,若第二密文是“3248241401”,电话号码是“17090141339”,电子设备可以将第二密文和电话号码相加,并将相加后得到的和“20338382740”作为第一加密电话号码。
在本实施例的一些可选的实现方式中,电子设备还可以更新随机盐列表。电子设备可以周期性地确定随机盐列表中是否存在与当前日期和/或未来日期对应的随机盐;响应于确定随机盐列表中不存在与当 前日期和/或未来日期对应的随机盐,生成随机盐并写入随机盐列表中的当前日期和/或未来日期所在的行中。作为示例,电子设备可以在每天的零点查询随机盐列表,确定随机盐列表中是否存在与当前日期对应的随机盐以及与未来4天对应的随机盐,若不存在,则生成随机盐并写入随机盐列表中;若存在,则结束更新流程。
继续参见图3,图3是图2所示的实施例对应的一个应用场景的示意图。在图3的应用场景中,客户端首先向服务器发送客户信息,其中,客户信息包括物品单号“1198073208-1-2-7”和电话号码“17090141339”;之后,服务器从预先生成的随机盐列表中选取出与当前日期“2017/1/1”对应的随机盐“F2DA9A9DC78F51D3B49AD6AD05E66465”;而后,服务器采用MD5对物品单号和与当前日期对应的随机盐进行加密生成第一密文“C2D8B4A40A5E3595D851ADFB6E384805”;然后,服务器按照字母A-F分别对应数字1-6的方式,将第一密文中的字母替换成与字母对应的数字,生成替换后的第一密文“32482414015535954851146265384805”,并从替换后的第一密文的首位数字开始抽取十个数字得到“3248241401”,并将其作为第二密文。最后,服务器将第二密文和电话号码相加,得到第一加密电话号码“20338382740”。客户端采用电子面单打印机打印出具有打印时间、始发地、目的地、加密后的客户信息、客户签字以及支付方式的电子面单。图3示出了电子面单,其中,打印时间为“2017-01-01 08:00:00”,始发地为“北京”,目的地为“天津”,客户信息包括收件人姓名:“王**”、第一加密电话号码:“20338382740”、地址:“天津市河西区无锡道大楼**栋**楼”,支付方式为“在线支付”。
在这里,配送人员在配送物品的过程中需要对第一加密电话号码进行本地解析,获取客户加密前的电话号码,以完成物品的配送。首先,配送人员的手持设备上需要预先存储有随机盐列表;之后,配送人员将电子面单上的打印日期“2017-01-01”、物品单号“1198073208-1-2-7”和第一加密电话号码“20338382740”输入到手持设备中;而后,手持设备从预先存储的随机盐列表中查找出与日期 “2017-01-01”对应的随机盐:“F2DA9A9DC78F51D3B49AD6AD05E66465”,并采用MD5对物品单号和与日期“2017-01-01”对应的随机盐进行加密,生成第一密文“C2D8B4A40A5E3595D851ADFB6E384805”;然后,手持设备按照字母A-F分别对应数字1-6的方式,将第一密文中的字母替换成与字母对应的数字,生成替换后的第一密文“32482414015535954851146265384805”,并从替换后的第一密文的首位数字开始抽取十个数字得到“3248241401”,并将其作为第二密文;最后,手持设备将第一加密电话号码与第二密文相减,即可得到加密前的电话号码“17090141339”。
本申请实施例提供的信息加密方法通过采用不可逆加密算法对客户信息中的物品单号和与当前日期对应的随机盐进行加密,生成第一密文;然后基于第一密文,生成数字型的第二密文;最后用第二密文对客户信息中的电话号码进行处理,从而得到第一加密电话号码。由于电子面单上打印的是加密后的电话号码,避免了客户隐私信息的泄露。
进一步参考图4,其示出了信息加密方法的又一个实施例的流程400。该信息加密方法的流程400,包括以下步骤:
步骤401,获取客户信息。
在本实施例中,信息加密方法运行于其上的电子设备(例如图1所示的服务器104)可以从与其通信连接的客户端(例如图1所示的终端设备101)获取客户信息。其中,客户信息可以包括物品单号和电话号码。物品单号又可以称为快递单号,通常由数字和/或字母组成,是快递包裹的唯一标识代码。快递公司、发件人以及收件人可以通过物品单号对快递包裹进行实时跟踪。
步骤402,从预先生成的随机盐列表中选取出与当前日期对应的随机盐。
在本实施例中,电子设备可以从预先生成的随机盐列表中选取出与当前日期对应的随机盐。其中,随机盐是随机生成的一组字符串,可以包括随机的大小写字母、数字、字符,其位数可以根据需要而设 置。随机盐列表可以用于存储日期和随机盐,不同的日期对应的随机盐一般不同。
步骤403,采用不可逆加密算法对物品单号和与当前日期对应的随机盐进行加密,生成第一密文。
在本实施例中,基于步骤401中获取到的物品单号和步骤402中选取出的与当前日期对应的随机盐,电子设备可以采用不可逆加密算法对物品单号和与当前日期对应的随机盐进行加密,生成第一密文。其中,物品单号和与当前日期对应的随机盐是明文,第一密文是与物品单号和与当前日期对应的随机盐对应的密文。
步骤404,基于第一密文,生成数字型的第二密文。
在本实施例中,基于步骤403中生成的第一密文,电子设备可以生成数字型的第二密文。
步骤405,用第二密文对电话号码进行处理,生成第一加密电话号码
在本实施例中,基于步骤404中生成的第二密文和步骤401中获取到的电话号码,电子设备可以用第二密文对电话号码进行处理,生成第一加密电话号码。作为示例,电子设备可以对第二密文和电话号码进行简单的数学运算,并将运算结果作为第一加密电话号码。
步骤406,从随机盐列表中选取出与当前日期对应的编码。
在本实施例中,电子设备可以从随机盐列表中选取出与当前日期对应的编码。其中,随机盐列表还可以用于存储编码。编码的字段类型为数字。相同的编码对应的随机盐相同,不同的编码对应的随机盐一般不同。
通常情况下,随机盐列表还用于存储自增主键。其中,自增主键的字段类型为数字、自增、并且是主键。主键是字段唯一不为空值的列。编码一般可以通过自增主键对预设的数值进行取余而得到,这样,预设的数值个随机盐还能被循环利用。作为示例,编码可以通过自增主键对100进行取余而得到。这样,随机盐列表可以采用如表2所示的形式对自增主键、编码、日期和随机盐进行存储:
Figure PCTCN2018080195-appb-000001
Figure PCTCN2018080195-appb-000002
表2
步骤407,将与当前日期对应的编码和第一加密电话号码进行组合,生成第二加密电话号码。
在本实施例中,基于步骤405中生成的第一加密电话号码和步骤406中选取出的与当前日期对应的编码,电子设备可以将与当前日期对应的编码和第一加密电话号码进行组合,生成第二加密电话号码。作为示例,若第一加密电话号码是“20338382740”,与当前日期对应的编码是“01”,则电子设备可以将与当前日期对应的编码和第一加密电话号码进行组合,生成第二加密电话号码“0120338382740”。
继续参见图5,图5是图4所示的实施例对应的一个应用场景的示意图。在图5的应用场景中,客户端首先向服务器发送客户信息,其中,客户信息包括物品单号“1198073208-1-2-7”和电话号码“17090141339”;之后,服务器从预先生成的随机盐列表中选取出与当前日期“2017/1/1”对应的随机盐“F2DA9A9DC78F51D3B49AD6AD05E66465”;而后,服务器采用MD5对物品单号和与当前日期对应的随机盐进行加密生成第一密文“C2D8B4A40A5E3595D851ADFB6E384805”;再后,服务器按照字母A-F分别对应数字1-6的方式,将第一密文中的字母替换成与字母对应的数字,生成替换后的第一密文“32482414015535954851146265384805”,并从替换后的第一密文的首位数字开始抽取十个数字得到“3248241401”,并将其作为第二密文。然后,服务器将第二密文和电话号码相加,得到第一加密电话号码“20338382740”;最后,服务器从随机盐列表中选取出与当前日期对应的编码“01”,并将与当前日期对应的编码和第一加密电话号码进行组合,生成第二加密电话号码“0120338382740”。客户端采用电子面 单打印机打印出具有打印时间、始发地、目的地、加密后的客户信息客户签字以及支付方式的电子面单。图5示出了电子面单,其中,打印时间为“2017-01-01 08:00:00”,始发地为“北京”,目的地为“天津”,客户信息包括收件人姓名:“王**”、第二加密电话号码:“0120338382740”、地址:“天津市河西区无锡道大楼**栋**楼”,支付方式为“在线支付”。
在这里,配送人员在配送物品的过程中需要对第二加密电话号码进行本地解析,获取客户加密前的电话号码,以完成物品的配送。首先,配送人员的手持设备上需要预先存储有随机盐列表;之后,配送人员将图5的电子面单上的物品单号“1198073208-1-2-7”和第二加密电话号码“0120338382740”输入到手持设备中;之后,手持设备对第二加密电话号码进行解析,获取第编码“01”和第一加密电话号码“20338382740”;而后,手持设备从预先存储的随机盐列表中查找出与编码“01”对应的随机盐:“F2DA9A9DC78F51D3B49AD6AD05E66465”,并采用MD5对物品单号和与编码“01”对应的随机盐进行加密,生成第一密文“C2D8B4A40A5E3595D851ADFB6E384805”;然后,手持设备按照字母A-F分别对应数字1-6的方式,将第一密文中的字母替换成与字母对应的数字,生成替换后的第一密文“32482414015535954851146265384805”,并从替换后的第一密文的首位数字开始抽取十个数字得到“3248241401”,并将其作为第二密文;最后,手持设备将第一加密电话号码与第二密文相减,即可得到加密前的电话号码“17090141339”。
从图4中可以看出,与图2对应的实施例相比,本实施例中的信息加密方法的流程400增加了步骤406和步骤407。由此,本实施例描述的方案的第二加密电话号码中存在编码,在对第二加密电话号码进行本地解析时,配送人员不用输入打印日期,手持设备即可根据第二加密电话号码中的编码查找到与编码对应的随机盐,从而实现配送人员更加快速地进行信息解密。
进一步参考图6,作为对上述各图所示方法的实现,本申请提供 了一种信息加密装置的一个实施例,该装置实施例与图2所示的方法实施例相对应,该装置具体可以应用于各种电子设备中。
如图6所示,本实施例所示的信息加密装置600包括:客户信息获取单元601、随机盐选取单元602、第一密文生成单元603、第二密文生成单元604和第一加密电话号码生成单元605。其中,客户信息获取单元601,配置用于获取客户信息,其中,客户信息包括物品单号和电话号码;随机盐选取单元602,配置用于从预先生成的随机盐列表中选取出与当前日期对应的随机盐,其中,随机盐列表用于存储日期和随机盐;第一密文生成单元603,配置用于采用不可逆加密算法对物品单号和与当前日期对应的随机盐进行加密,生成第一密文;第二密文生成单元604,配置用于基于第一密文,生成数字型的第二密文;第一加密电话号码生成单元605,配置用于用第二密文对电话号码进行处理,生成第一加密电话号码。
在本实施例中,信息加密装置600中:客户信息获取单元601、随机盐选取单元602、第一密文生成单元603、第二密文生成单元604和第一加密电话号码生成单元605的具体处理及其所带来的技术效果可分别参考图2对应实施例中的步骤201、步骤202、步骤203、步骤204和步骤205的相关说明,在此不再赘述。
在本实施例的一些可选的实现方式中,第二密文生成单元604包括:第一密文确定子单元(图中未示出),配置用于确定第一密文中是否存在字母;第二密文生成子单元(图中未示出),配置用于响应于确定第一密文中存在字母,将第一密文中的字母替换成预设的与字母对应的数字,并从替换后的第一密文的预设位置开始抽取预设位数字,生成第二密文。
在本实施例的一些可选的实现方式中,第二密文生成子单元(图中未示出)还配置用于:响应于确定第一密文中不存在字母,从第一密文的预设位置开始抽取预设位数字,生成第二密文。
在本实施例的一些可选的实现方式中,第一加密电话号码生成单元605进一步配置用于:将第二密文与电话号码相加或相减,生成第一加密电话号码。
在本实施例的一些可选的实现方式中,随机盐列表还用于存储编码;以及信息加密装置600还包括:编码选取单元(图中未示出),配置用于从随机盐列表中选取出与当前日期对应的编码;第二加密电话号码生成单元(图中未示出),配置用于将与当前日期对应的编码和第一加密电话号码进行组合,生成第二加密电话号码。
在本实施例的一些可选的实现方式中,信息加密装置600还包括随机盐列表更新单元(图中未示出),随机盐列表更新单元(图中未示出),包括:随机盐确定子单元(图中未示出),配置用于周期性地确定随机盐列表中是否存在与当前日期和/或未来日期对应的随机盐;随机盐生成子单元(图中未示出),配置用于响应于确定随机盐列表中不存在与当前日期和/或未来日期对应的随机盐,生成随机盐并写入随机盐列表中的当前日期和/或未来日期所在的行中。
在本实施例的一些可选的实现方式中,不可逆加密算法是消息摘要算法第五版。
下面参考图7,其示出了适于用来实现本申请实施例的电子设备的计算机系统700的结构示意图。图7示出的电子设备仅仅是一个示例,不应对本申请实施例的功能和使用范围带来任何限制。
如图7所示,计算机系统700包括中央处理单元(CPU)701,其可以根据存储在只读存储器(ROM)702中的程序或者从存储部分708加载到随机访问存储器(RAM)703中的程序而执行各种适当的动作和处理。在RAM 703中,还存储有系统700操作所需的各种程序和数据。CPU 701、ROM 702以及RAM 703通过总线704彼此相连。输入/输出(I/O)接口705也连接至总线704。
以下部件连接至I/O接口705:包括键盘、鼠标等的输入部分706;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分707;包括硬盘等的存储部分708;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分709。通信部分709经由诸如因特网的网络执行通信处理。驱动器710也根据需要连接至I/O接口705。可拆卸介质711,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器710上,以便于从其上读出的计算机程序根据 需要被安装入存储部分708。
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分709从网络上被下载和安装,和/或从可拆卸介质711被安装。在该计算机程序被中央处理单元(CPU)701执行时,执行本申请的方法中限定的上述功能。
需要说明的是,本申请上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本申请中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本申请中,计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:无线、电线、光缆、RF等等,或者上述的任意合适的组合。
附图中的流程图和框图,图示了按照本申请各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码 的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本申请实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的单元也可以设置在处理器中,例如,可以描述为:一种处理器包括客户信息获取单元、随机盐选取单元、第一密文生成单元、第二密文生成单元和第一加密电话号码生成单元。其中,这些单元的名称在某种情况下并不构成对该单元本身的限定,例如,客户信息获取单元还可以被描述为“获取客户信息的单元”。
作为另一方面,本申请还提供了一种计算机可读介质,该计算机可读介质可以是上述实施例中描述的电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:获取客户信息,其中,客户信息包括物品单号和电话号码;从预先生成的随机盐列表中选取出与当前日期对应的随机盐,其中,随机盐列表用于存储日期和随机盐;采用不可逆加密算法对物品单号和与当前日期对应的随机盐进行加密,生成第一密文;基于第一密文,生成数字型的第二密文;用第二密文对电话号码进行处理,生成第一加密电话号码。
以上描述仅为本申请的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本申请中所涉及的发明范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述发明构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本申请中公开的(但不限于) 具有类似功能的技术特征进行互相替换而形成的技术方案。

Claims (10)

  1. 一种信息加密方法,其特征在于,所述方法包括:
    获取客户信息,其中,所述客户信息包括物品单号和电话号码;
    从预先生成的随机盐列表中选取出与当前日期对应的随机盐,其中,所述随机盐列表用于存储日期和随机盐;
    采用不可逆加密算法对所述物品单号和所述与当前日期对应的随机盐进行加密,生成第一密文;
    基于所述第一密文,生成数字型的第二密文;
    用所述第二密文对所述电话号码进行处理,生成第一加密电话号码。
  2. 根据权利要求1所述的方法,其特征在于,所述基于所述第一密文,生成数字型的第二密文,包括:
    确定所述第一密文中是否存在字母;
    响应于确定所述第一密文中存在字母,将所述第一密文中的字母替换成预设的与字母对应的数字,并从替换后的第一密文的预设位置开始抽取预设位数字,生成第二密文。
  3. 根据权利要求2所述的方法,其特征在于,所述方法还包括:
    响应于确定所述第一密文中不存在字母,从所述第一密文的预设位置开始抽取预设位数字,生成第二密文。
  4. 根据权利要求1所述的方法,其特征在于,所述用所述第二密文对所述电话号码进行处理,生成第一加密电话号码,包括:
    将所述第二密文与所述电话号码相加或相减,生成第一加密电话号码。
  5. 根据权利要求1所述的方法,其特征在于,所述随机盐列表还用于存储编码;以及
    所述方法还包括:
    从所述随机盐列表中选取出与当前日期对应的编码;
    将所述与当前日期对应的编码和所述第一加密电话号码进行组合,生成第二加密电话号码。
  6. 根据权利要求1所述的方法,其特征在于,所述方法还包括更新随机盐列表的步骤,所述更新随机盐列表的步骤包括:
    周期性地确定随机盐列表中是否存在与当前日期和/或未来日期对应的随机盐;
    响应于确定所述随机盐列表中不存在与当前日期和/或未来日期对应的随机盐,生成随机盐并写入所述随机盐列表中的当前日期和/或未来日期所在的行中。
  7. 根据权利要求1-6之一所述的方法,其特征在于,所述不可逆加密算法是消息摘要算法第五版。
  8. 一种信息加密装置,其特征在于,所述装置包括:
    客户信息获取单元,配置用于获取客户信息,其中,所述客户信息包括物品单号和电话号码;
    随机盐选取单元,配置用于从预先生成的随机盐列表中选取出与当前日期对应的随机盐,其中,所述随机盐列表用于存储日期和随机盐;
    第一密文生成单元,配置用于采用不可逆加密算法对所述物品单号和所述与当前日期对应的随机盐进行加密,生成第一密文;
    第二密文生成单元,配置用于基于所述第一密文,生成数字型的第二密文;
    第一加密电话号码生成单元,配置用于用所述第二密文对所述电话号码进行处理,生成第一加密电话号码。
  9. 一种电子设备,其特征在于,所述电子设备包括:
    一个或多个处理器;
    存储装置,用于存储一个或多个程序;
    当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-7中任一所述的方法。
  10. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1-7中任一所述的方法。
PCT/CN2018/080195 2017-03-31 2018-03-23 信息加密方法和装置 Ceased WO2018177206A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US16/490,003 US11194917B2 (en) 2017-03-31 2018-03-23 Information encryption method and device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710208832.6 2017-03-31
CN201710208832.6A CN108664798B (zh) 2017-03-31 2017-03-31 信息加密方法和装置

Publications (1)

Publication Number Publication Date
WO2018177206A1 true WO2018177206A1 (zh) 2018-10-04

Family

ID=63674206

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/080195 Ceased WO2018177206A1 (zh) 2017-03-31 2018-03-23 信息加密方法和装置

Country Status (3)

Country Link
US (1) US11194917B2 (zh)
CN (1) CN108664798B (zh)
WO (1) WO2018177206A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11194917B2 (en) 2017-03-31 2021-12-07 Beijing Jingdong Shangke Information Technology Co., Ltd. Information encryption method and device

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109544819A (zh) * 2018-11-26 2019-03-29 深圳市速易宝智能科技有限公司 一种存取货物的方法及系统
CN113965648B (zh) * 2020-07-21 2024-05-07 中国移动通信集团山东有限公司 一种信息隐藏方法、装置和电子设备
CN112052458B (zh) * 2020-07-28 2024-02-23 华控清交信息科技(北京)有限公司 信息处理方法、装置、设备及介质
CN112202729B (zh) * 2020-09-11 2023-04-14 微梦创科网络科技(中国)有限公司 动态混淆加密、解密方法及装置
CN112597524B (zh) * 2021-03-03 2021-05-18 支付宝(杭州)信息技术有限公司 隐私求交的方法及装置
CN113517978A (zh) * 2021-07-16 2021-10-19 安徽伊普诺康生物技术股份有限公司 一种体外诊断设备试剂卡的安全防护与重用方法
CN115955307B (zh) * 2023-03-10 2023-05-23 江西曼荼罗软件有限公司 用户密码加盐保护方法、装置、可读存储介质及电子设备
CN117272356A (zh) * 2023-11-22 2023-12-22 江西科技学院 计算机的加密方法、系统及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103475463A (zh) * 2013-08-19 2013-12-25 华为技术有限公司 加密实现方法及装置
CN103802528A (zh) * 2014-01-27 2014-05-21 辛红 一种保密快递单及其使用方法
CN105281897A (zh) * 2014-07-22 2016-01-27 中兴通讯股份有限公司 一种文件加密方法、解密方法及装置
CN105721390A (zh) * 2014-12-01 2016-06-29 阿里巴巴集团控股有限公司 一种加密存储方法和装置

Family Cites Families (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000293590A (ja) * 1999-04-12 2000-10-20 Sony Corp 情報処理装置および方法、並びに提供媒体
US7200227B2 (en) * 2001-07-30 2007-04-03 Phillip Rogaway Method and apparatus for facilitating efficient authenticated encryption
US7664486B2 (en) * 2004-06-09 2010-02-16 Fujifilm Corporation Server, mobile terminal, and service method
JP4739000B2 (ja) * 2005-12-07 2011-08-03 富士通株式会社 電子文書管理プログラム、電子文書管理システム及び電子文書管理方法
US8204213B2 (en) * 2006-03-29 2012-06-19 International Business Machines Corporation System and method for performing a similarity measure of anonymized data
CN100476844C (zh) * 2006-08-14 2009-04-08 北京握奇数据系统有限公司 电子钥匙与计算机之间实现绑定功能的方法
CN101378542A (zh) * 2007-08-29 2009-03-04 北京三星通信技术研究有限公司 电话号码加密方法
CN101860525B (zh) * 2009-09-25 2012-11-14 深圳市安捷信联科技有限公司 电子授权状实现方法、智能终端、授权系统及验证终端
US20110078779A1 (en) * 2009-09-25 2011-03-31 Song Liu Anonymous Preservation of a Relationship and Its Application in Account System Management
CN102780674A (zh) * 2011-05-09 2012-11-14 同方股份有限公司 一种具有多因素认证方法的网络业务处理方法及系统
CN102638447B (zh) * 2012-02-10 2014-08-06 宗祥后 基于用户自主产生的动态口令对系统登录的方法和装置
CN103428691A (zh) * 2012-05-24 2013-12-04 希姆通信息技术(上海)有限公司 手机银行安全认证方法及系统
CN104915816A (zh) * 2015-05-20 2015-09-16 深圳深若科技有限公司 一种基于统一编码的打印快递单的方法及系统
CN104933371B (zh) * 2015-06-04 2018-06-22 南京邮电大学 基于多层加密二维码的物流个人信息隐私保护系统
US9571475B2 (en) * 2015-06-09 2017-02-14 Verizon Patent And Licensing Inc. Call encryption systems and methods
CN105138585B (zh) * 2015-07-31 2018-04-10 福建天晴数码有限公司 数据库加密字段部分匹配查询方法及系统
CN105966111A (zh) * 2016-05-11 2016-09-28 上海理工大学 一种快递隐私信息保护面单
CN106302472B (zh) * 2016-08-09 2019-12-24 厦门乐享新网络科技有限公司 信息的隐藏方法及装置
CN106453268B (zh) * 2016-09-21 2019-06-07 四川大学 一种在物流过程中实现快递隐私保护的方法
CN108664798B (zh) 2017-03-31 2021-06-29 北京京东尚科信息技术有限公司 信息加密方法和装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103475463A (zh) * 2013-08-19 2013-12-25 华为技术有限公司 加密实现方法及装置
CN103802528A (zh) * 2014-01-27 2014-05-21 辛红 一种保密快递单及其使用方法
CN105281897A (zh) * 2014-07-22 2016-01-27 中兴通讯股份有限公司 一种文件加密方法、解密方法及装置
CN105721390A (zh) * 2014-12-01 2016-06-29 阿里巴巴集团控股有限公司 一种加密存储方法和装置

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11194917B2 (en) 2017-03-31 2021-12-07 Beijing Jingdong Shangke Information Technology Co., Ltd. Information encryption method and device

Also Published As

Publication number Publication date
CN108664798B (zh) 2021-06-29
US20200013316A1 (en) 2020-01-09
US11194917B2 (en) 2021-12-07
CN108664798A (zh) 2018-10-16

Similar Documents

Publication Publication Date Title
CN108664798B (zh) 信息加密方法和装置
CN109325812B (zh) 关于电子票据的数据处理方法、装置、存储介质和设备
CN111656730A (zh) 解耦和更新移动设备上的锁定证书
CN109766134A (zh) 系统启动方法、装置、电子设备及存储介质
US10268938B2 (en) Managing privacy of information during shipments
CN105787682A (zh) 一种物流业务信息处理方法及相关设备与系统
CN114500093B (zh) 报文信息的安全交互方法及系统
WO2018196523A1 (zh) 电子签收方法和装置
CN104463647A (zh) 基于电子发票的电子化入账方法和系统及电子发票客户端
CN104992119A (zh) 一种敏感信息防窃取的安全传输方法及系统
CN108763937B (zh) 一种配送单据生成、配送及推广信息处理方法及装置
CN109905351A (zh) 用于存储数据的方法和装置
CN108805640A (zh) 用于确定权限的方法、系统和装置
US20170026348A1 (en) Message encryption
US20250321978A1 (en) Systems and Methods for Distributed Entity Tracking
Shahariar et al. A secure land record management system using blockchain technology
CN113961956B (zh) 标签化网络信息服务生成及应用方法、装置、设备、介质
CN108377319A (zh) 图片传输方法及装置
CN113904865A (zh) 一种基于非对称算法的日志传输方法及装置
US20180309579A1 (en) Secure representation via a format preserving hash function
CN114742017B (zh) 一种产品防伪码的生成方法、装置、设备及存储介质
US11218453B2 (en) Exchanging encrypted messages among multiple agents
CN111416788A (zh) 防止传输数据被篡改的方法和装置
CN106415588A (zh) 数据记录方法、装置和系统、计算机存储介质
EP3291125B1 (en) Server device, information management system, information management method, and computer program

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18778100

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 07/02/2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18778100

Country of ref document: EP

Kind code of ref document: A1