IP Library Granted Patent US 11,335,213
Granted Patent B2
US 11,335,213 · App. 17/025,061 · Granted May 17, 2022

Method and apparatus for encrypting data, method and apparatus for decrypting data

Inventors: Yuepeng Liu (Beijing, CN); Peng Yun (Beijing, CN)
Assignee: APOLLO INTELLIGENT DRIVING (BEIJING) TECHNOLOGY CO., LTD.
G09C1/00H04L9/0625H04L9/0637H04L9/0643H04L9/3239
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,335,213
App. No.
17/025,061
Granted
May 17, 2022
Kind
B2
Abstract

The disclosure discloses a method and apparatus for encrypting data, and a method and apparatus for decrypting data. The method for encrypting data includes: acquiring a to-be-encrypted data block; executing a first encryption on the to-be-encrypted data block to obtain a data ciphertext; executing a hash operation on the to-be-encrypted data block to obtain an index key; designating a last ciphertext block as a first target ciphertext block, and decrypting the first target ciphertext block to acquire an index value of the first target ciphertext block; executing a preset operation on the index value of the first target ciphertext block to obtain the index value of the to-be-encrypted data block, and executing a second encryption on the index value of the to-be-encrypted data block based on the index key to generate an index ciphertext; and combining the data ciphertext and the index ciphertext to generate a ciphertext block.

Claims (41)

1. A method for decrypting data, comprising:

acquiring a to-be-decrypted ciphertext block;

executing a first decryption on the to-be-decrypted ciphertext block using a preset security key to obtain a data plaintext and an index ciphertext of the to-be-decrypted ciphertext block;

executing a hash operation on the data plaintext of the to-be-decrypted ciphertext block to obtain an index key of the to-be-decrypted ciphertext block;

executing a second decryption on the index ciphertext of the to-be-decrypted ciphertext block using the index key of the to-be-decrypted ciphertext block to obtain an index value of the to-be-decrypted ciphertext block;

designating a ciphertext block immediately prior to the to-be-decrypted ciphertext block in a ciphertext block sequence as a second target ciphertext block, and decrypting the second target ciphertext block to acquire the index value of the second target ciphertext block; and

determining whether the index value of the to-be-decrypted ciphertext block and the index value of the second target ciphertext block meet a preset condition, to ascertain whether the data plaintext and the index value of the to-be-decrypted ciphertext block are valid data.

2. The method according to claim 1 , wherein the designating a ciphertext block immediately prior to the to-be-decrypted ciphertext block in a ciphertext block sequence as a second target ciphertext block, and decrypting the second target ciphertext block to acquire the index value of the second target ciphertext block comprises:

executing the first decryption on the second target ciphertext block using the preset security key to obtain the data plaintext and the index ciphertext of the second target ciphertext block;

executing the hash operation on the data plaintext of the second target ciphertext block to obtain the index key of the second target ciphertext block; and

executing the second decryption on the index ciphertext of the second target ciphertext block using the index key of the second target ciphertext block to obtain the index value of the second target ciphertext block.

3. The method according to claim 1 , wherein the determining whether the index value of the to-be-decrypted ciphertext block and the index value of the second target ciphertext block meet a preset condition, to ascertain whether the data plaintext and the index value of the to-be-decrypted ciphertext block are valid data comprises:

ascertaining, if the index value of the to-be-decrypted ciphertext block and the index value of the second target ciphertext block meet the preset condition, the data plaintext and the index value of the to-be-decrypted ciphertext block being valid data.

4. An apparatus for decrypting data, comprising:

at least one processor; and

a memory storing instructions, the instructions when executed by the at least one processor, cause the at least one processor to perform operations, the operations comprising:

acquiring a to-be-decrypted ciphertext block;

executing a first decryption on the to-be-decrypted ciphertext block using a preset security key to obtain a data plaintext and an index ciphertext of the to-be-decrypted ciphertext block;

executing a hash operation on the data plaintext of the to-be-decrypted ciphertext block to obtain an index key of the to-be-decrypted ciphertext block;

executing a second decryption on the index ciphertext of the to-be-decrypted ciphertext block using the index key of the to-be-decrypted ciphertext block to obtain an index value of the to-be-decrypted ciphertext block;

designating a ciphertext block immediately prior to the to-be-decrypted ciphertext block in a ciphertext block sequence as a second target ciphertext block, and decrypting the second target ciphertext block to acquire the index value of the second target ciphertext block; and

determining whether the index value of the to-be-decrypted ciphertext block and the index value of the second target ciphertext block meet a preset condition, to ascertain whether the data plaintext and the index value of the to-be-decrypted ciphertext block are valid data.

5. The apparatus according to claim 4 , wherein the designating a ciphertext block immediately prior to the to-be-decrypted ciphertext block in a ciphertext block sequence as a second target ciphertext block, and decrypting the second target ciphertext block to acquire the index value of the second target ciphertext block comprises:

executing the first decryption on the second target ciphertext block using the preset security key to obtain the data plaintext and the index ciphertext of the second target ciphertext block;

executing the hash operation on the data plaintext of the second target ciphertext block to obtain the index key of the second target ciphertext block; and

executing the second decryption on the index ciphertext of the second target ciphertext block using the index key of the second target ciphertext block to obtain the index value of the second target ciphertext block.

6. The apparatus according to claim 4 , wherein the determining whether the index value of the to-be-decrypted ciphertext block and the index value of the second target ciphertext block meet a preset condition, to ascertain whether the data plaintext and the index value of the to-be-decrypted ciphertext block are valid data comprises:

ascertaining, if the index value of the to-be-decrypted ciphertext block and the index value of the second target ciphertext block meet the preset condition, the data plaintext and the index value of the to-be-decrypted ciphertext block being valid data.

7. A non-transitory computer-readable storage medium storing a computer program, wherein the computer program when executed by one or more processors, causes the one or more processors to perform operations, the operations comprising:

acquiring a to-be-decrypted ciphertext block;

executing a first decryption on the to-be-decrypted ciphertext block using a preset security key to obtain a data plaintext and an index ciphertext of the to-be-decrypted ciphertext block;

executing a hash operation on the data plaintext of the to-be-decrypted ciphertext block to obtain an index key of the to-be-decrypted ciphertext block;

executing a second decryption on the index ciphertext of the to-be-decrypted ciphertext block using the index key of the to-be-decrypted ciphertext block to obtain an index value of the to-be-decrypted ciphertext block;

designating a ciphertext block immediately prior to the to-be-decrypted ciphertext block in a ciphertext block sequence as a second target ciphertext block, and decrypting the second target ciphertext block to acquire the index value of the second target ciphertext block; and

determining whether the index value of the to-be-decrypted ciphertext block and the index value of the second target ciphertext block meet a preset condition, to ascertain whether the data plaintext and the index value of the to-be-decrypted ciphertext block are valid data.

8. The non-transitory computer-readable storage medium according to claim 7 , wherein the designating a ciphertext block immediately prior to the to-be-decrypted ciphertext block in a ciphertext block sequence as a second target ciphertext block, and decrypting the second target ciphertext block to acquire the index value of the second target ciphertext block comprises:

executing the first decryption on the second target ciphertext block using the preset security key to obtain the data plaintext and the index ciphertext of the second target ciphertext block;

executing the hash operation on the data plaintext of the second target ciphertext block to obtain the index key of the second target ciphertext block; and

executing the second decryption on the index ciphertext of the second target ciphertext block using the index key of the second target ciphertext block to obtain the index value of the second target ciphertext block.

9. The non-transitory computer-readable storage medium according to claim 7 , wherein the determining whether the index value of the to-be-decrypted ciphertext block and the index value of the second target ciphertext block meet a preset condition, to ascertain whether the data plaintext and the index value of the to-be-decrypted ciphertext block are valid data comprises:

ascertaining, if the index value of the to-be-decrypted ciphertext block and the index value of the second target ciphertext block meet the preset condition, the data plaintext and the index value of the to-be-decrypted ciphertext block being valid data.

Assignments (3)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 20, 2022
From: LIU, YUEPENG; YUN, PENG
To: BAIDU ONLINE NETWORK TECHNOLOGY (BEIJING) CO., LTD.
Reel/Frame 059656/0541 →
CORRECTIVE ASSIGNMENT TO CORRECT THE APPLICANT NAME PREVIOUSLY RECORDED AT REEL: 057933 FRAME: 0812. ASSIGNOR(S) HEREBY CONFIRMS THE ASSIGNMENT. Recorded Dec 28, 2021
From: BAIDU ONLINE NETWORK TECHNOLOGY (BEIJING) CO., LTD.
To: APOLLO INTELLIGENT DRIVING TECHNOLOGY (BEIJING) CO., LTD.
Reel/Frame 058594/0836 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 13, 2021
From: BAIDU ONLINE NETWORK TECHNOLOGY (BEIJING) CO., LTD.
To: APOLLO INTELLIGENT DRIVING (BEIJING) TECHNOLOGY CO., LTD.
Reel/Frame 057933/0812 →
Priority Claims (1)
CN 201710539291.5 · Jul 4, 2017 · national
Continuity (2)
Division 16027174 · Jul 3, 2018
Related Publication 20210012682A1 · Jan 14, 2021