US 12,259,996 B2
Method of protecting data and computer device
Liang-Te Chiu, New Taipei (TW); and Wun-Cing Lai, New Taipei (TW)
Assigned to HON HAI PRECISION INDUSTRY CO., LTD., New Taipei (TW)
Filed by HON HAI PRECISION INDUSTRY CO., LTD., New Taipei (TW)
Filed on Dec. 16, 2021, as Appl. No. 17/552,871.
Claims priority of application No. 202011531688.8 (CN), filed on Dec. 22, 2020.
Prior Publication US 2022/0198051 A1, Jun. 23, 2022
Int. Cl. G06F 21/64 (2013.01); G06F 21/60 (2013.01); G06F 21/62 (2013.01); H04L 9/08 (2006.01); H04L 9/00 (2022.01)
CPC G06F 21/6227 (2013.01) [G06F 21/602 (2013.01); G06F 21/64 (2013.01); H04L 9/0825 (2013.01); H04L 9/50 (2022.05)] 6 Claims
OG exemplary drawing
 
1. A method of protecting data comprising:
encrypting a designated file by using a symmetric key and obtaining an encrypted file;
encrypting the symmetric key by using a first public key of a first pair of keys and obtaining a first ciphertext, and the first pair of keys comprising a first private key;
obtaining related information of the designated file, and uploading the related information of the designated file to a blockchain, and the related information of the designated file comprising the first ciphertext;
after obtaining the encrypted file, storing the encrypted file in a designated location, wherein the related information of the designated file comprises the information of the designated location; and
when obtaining the designated location comprised in the information of the designated location from the blockchain, obtaining the encrypted file based on the information of the designated location;
when decrypting the encrypted file, downloading the related information of the designated file from the blockchain and obtaining the related information of the designated file;
obtaining the symmetric key by decrypting the first ciphertext comprised in the related information by using the first private key; and
obtaining a decrypted file by decrypting the encrypted file by using the symmetric key;
obtaining a second ciphertext by encrypting the symmetric key by using a second public key of a second pair of keys, and the second pair of keys comprising a second private key;
updating the related information of the designated file by adding the second ciphertext to the related information of the designated file, and obtaining an updated related information of the designated file;
uploading the updated related information of the designated file to the blockchain;
when decrypting the encrypted file, downloading the updated related information of the designated file from the blockchain, and obtaining the second ciphertext comprised in the updated related information;
obtaining the symmetric key by decrypting the second ciphertext by using the second private key; and
obtaining the decrypted file by decrypting the encrypted file by using the symmetric key.