Patent ID: 10291392

Abstract:
A method for encrypting data based on all-or-nothing encryption includes: providing, by an encryption system, data to be encrypted and an encryption key; dividing, by the encryption system, the data into an odd number of blocks, wherein each of the blocks has the same size; encrypting, by the encryption system, the blocks with the encryption key to obtain an intermediate ciphertext c′ comprising intermediate ciphertext blocks c0′, . . . , cN′, wherein c0′ corresponds to a random seed and c1′, . . . , cN′ corresponds to the encrypted blocks; and obtaining, by the encryption system, a final ciphertext c using the intermediate ciphertext c′. An intermediate overall ciphertext t is obtained based on XOR'ing the intermediate ciphertext blocks c0′, . . . , cN′; and obtaining a plurality of final ciphertext blocks c1, . . . cN by XOR'ing respective intermediate ciphertext blocks c1′, . . . , cN′ with the intermediate overall ciphertext t.