Patent ID: 8412954

Claim:
A data encryption device for storage medium, comprising: an encryption key input interface serving to input a user encryption key; a block code encoder serving to encode and decode data; a scrambler connected with the encryption key input interface and the block code encoder to scramble and descramble data according to the user encryption keys respectively inputted, and having: n D flip flops, n corresponding to a data length of the user encryption key, and each D flip flop having: a D input terminal, the D input terminal of the first D flip flop connected with the block code encoder or receiving the scrambled data; a trigger input terminal, the trigger input terminals of all D flip flops connected with the encryption key input interface to acquire the corresponding bits in the user encryption key; and a Q output terminal, the Q output terminal of the i th D flip flop connected with the D input terminal of the (I+1) th D flip flop when I=1 to n−1, and the Q output terminal of the (n −1) th D flip flop connected with the D input terminal of the n th flip flop; and m XOR gates, m being less than n, and each XOR gate having: a first input terminal connected with the D input terminal of the corresponding D flip flop; a second input terminal, the second input terminal of the m th XOR gate connected with the Q output terminal of the n th D flip flop; and an output terminal, the output terminal of the (j+1) th XOR gate connected with the second input terminal of the j th XOR gate when j=1 to m−1, and the output terminal of the first XOR gate serving to output the scrambled data or the descrambled data; and a controller connected with the block code encoder and the scrambler and storing: an encryption process performed by the controller to acquire original data, transmit the original data to the block code encoder to encode the original data, transmit the encoded data to the scrambler to scramble the encoded data, and adapted to transmit the scrambled data to a storage medium for storage; and a decryption process performed by the controller to acquire the scrambled data from the storage medium, transmit the scrambled data to the scrambler to descramble and scramble data, transmit the encoded data to the block code encoder to decode the encoded data, and acquire the original data when the user encryption keys respectively inputted in the encryption process and the decryption process are identical.