TWI483606B - System and method for protecting the phone files - Google Patents
System and method for protecting the phone files Download PDFInfo
- Publication number
- TWI483606B TWI483606B TW100103201A TW100103201A TWI483606B TW I483606 B TWI483606 B TW I483606B TW 100103201 A TW100103201 A TW 100103201A TW 100103201 A TW100103201 A TW 100103201A TW I483606 B TWI483606 B TW I483606B
- Authority
- TW
- Taiwan
- Prior art keywords
- file
- mobile phone
- read
- plaintext
- encrypted
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims description 22
- 238000012795 verification Methods 0.000 claims description 11
- 238000010586 diagram Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 4
- 238000013478 data encryption standard Methods 0.000 description 2
- 238000004891 communication Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
Landscapes
- Telephone Function (AREA)
- Storage Device Security (AREA)
Description
本發明涉及一種檔案保護系統及方法,特別是一種手機檔案保護系統及方法。The invention relates to a file protection system and method, in particular to a mobile phone file protection system and method.
隨著通信技術的發展,手機存儲卡的容量以及手機記憶體容量都大大提高。用戶可以將個人資料或公司資料存儲在手機中,並通過手機中的檔案管理功能,對各類檔案如視頻、圖片、鈴聲、文字檔案等進行管理。然而手機中的重要檔案可能因為手機丟失等意外情況而洩露,給用戶造成損失。針對這種情況,目前已推出許多對檔案加密的技術,通過對手機中的指定檔案加密,使他人無法獲取加密檔案中的資訊。但是傳統的置換和替代加密技術對同一明文總是產生相同的密文,易於通過頻度統計的方法破解,安全性低。而DES(Data Encryption Standard,資料加密標準)、3DES、AEC等加密技術雖然安全性高,但演算法過於複雜,在嵌入式系統上開銷較大。With the development of communication technology, the capacity of mobile phone memory cards and the capacity of mobile phone memory have been greatly improved. The user can store the personal data or company data in the mobile phone, and manage various files such as videos, pictures, ring tones, text files, etc. through the file management function in the mobile phone. However, important files in the mobile phone may be leaked due to unexpected situations such as the loss of the mobile phone, causing losses to the user. In response to this situation, many technologies for encrypting files have been introduced, and the specified files in the mobile phone are encrypted, so that others cannot obtain the information in the encrypted files. However, the traditional replacement and replacement encryption technology always produces the same ciphertext for the same plaintext, and is easy to crack by frequency statistics, and the security is low. While DES (Data Encryption Standard), 3DES, AEC and other encryption technologies are highly secure, the algorithm is too complicated and has a large overhead on embedded systems.
鑒於以上內容,有必要提供一種手機檔案保護系統,利用手機的IMEI碼的唯一性對手機檔案進行加密保護,演算法簡單且安全性高。In view of the above, it is necessary to provide a mobile phone file protection system, which utilizes the uniqueness of the IMEI code of the mobile phone to encrypt and protect the mobile phone file, and the algorithm is simple and safe.
還有必要提供一種手機檔案加密方法,利用手機的IMEI碼的唯一性對手機檔案進行加密保護,演算法簡單且安全性高。It is also necessary to provide a mobile phone file encryption method, which utilizes the uniqueness of the IMEI code of the mobile phone to encrypt and protect the mobile phone file, and the algorithm is simple and safe.
所述手機檔案保護系統,包括:讀取模組,用於當需要對手機檔案進行加密時,以二進位方式讀取手機的IMEI碼和該檔案中的明文;運算模組,用於將所讀取的IMEI碼與所讀取的該明文進行加密運算,得到該明文對應的密文,該加密運算的運算方法是將該明文的各個位元組迴圈與組成該IMEI碼的各位十進位數字對應的二進位數字進行異或運算;寫入模組,用於將該檔案中的明文刪除,將該密文寫入該檔案中。The mobile phone file protection system comprises: a reading module, configured to read the IMEI code of the mobile phone and the plaintext in the file in a binary manner when the mobile phone file needs to be encrypted; the computing module is used for The read IMEI code is encrypted with the read plaintext to obtain a ciphertext corresponding to the plaintext, and the encryption operation is performed by looping the respective bytes of the plaintext and the decimals of the digits constituting the IMEI code. The binary number corresponding to the number is XORed; the write module is used to delete the plaintext in the file, and the ciphertext is written into the file.
所述手機檔案保護方法,包括以下步驟:(a)當需要對手機檔案進行加密時,以二進位方式讀取手機的IMEI碼和該檔案中的明文;(b)將所讀取的IMEI碼與所讀取的該明文進行加密運算,得到該明文對應的密文,該加密運算的運算方法是將該明文的各個位元組迴圈與組成該IMEI碼的各位十進位數字對應的二進位數字進行異或運算;(c)將該檔案中的明文刪除,將該密文寫入該檔案中。The mobile phone file protection method comprises the following steps: (a) when the mobile phone file needs to be encrypted, the IMEI code of the mobile phone and the plaintext in the file are read in a binary manner; (b) the IMEI code read is read. Performing an encryption operation on the read plaintext to obtain a ciphertext corresponding to the plaintext, and the encryption operation is performed by looping each byte of the plaintext with a binary corresponding to each decimal digit constituting the IMEI code. The number is XORed; (c) the plaintext in the file is deleted, and the ciphertext is written into the file.
相較於習知技術,本發明利用手機IMEI碼的唯一性對手機檔案進行加密保護,演算法簡單且安全性高。Compared with the prior art, the present invention utilizes the uniqueness of the IMEI code of the mobile phone to encrypt and protect the mobile phone file, and the algorithm is simple and high in security.
參閱圖1所示,係本發明手機檔案保護系統較佳實施例的運行環境圖。Referring to FIG. 1, it is an operating environment diagram of a preferred embodiment of the mobile phone file protection system of the present invention.
檔案保護系統10運行於手機1中,該手機1還包括記憶體11和CPU 12。記憶體11中存儲有各種檔案,如視頻、鈴聲、文字檔案、圖片等。其中的檔案110是用戶希望對其進行加密保護的檔案。記憶體11中還包括緩衝區111,用於存儲檔案保護系統10對檔案110進行加密保護,或對加密後的檔案110解密產生的中間結果。The file protection system 10 runs in a mobile phone 1, which also includes a memory 11 and a CPU 12. The memory 11 stores various files such as videos, ring tones, text files, pictures, and the like. The file 110 is the file that the user wants to encrypt and protect. The memory 11 further includes a buffer 111 for storing an intermediate result of the file protection system 10 encrypting the file 110 or decrypting the encrypted file 110.
參閱圖2所示,係本發明手機檔案加密系統的功能模組圖。該檔案保護系統10包括驗證模組101、讀取模組102、運算模組103和寫入模組104。當用戶需要對檔案110進行加密時,向手機1中輸入一組加密口令,該加密口令用於當需要對加密後的檔案110解密時,根據用戶輸入的解密口令與該加密口令的一致性來判斷允許對檔案110執行解密操作。Referring to FIG. 2, it is a functional module diagram of the mobile phone file encryption system of the present invention. The file protection system 10 includes a verification module 101, a reading module 102, a computing module 103, and a writing module 104. When the user needs to encrypt the file 110, a set of encrypted passwords are input into the mobile phone 1, and the encrypted password is used when the decrypted password input by the user is consistent with the encrypted password when the encrypted file 110 needs to be decrypted. Judging allows the decryption operation to be performed on the archive 110.
驗證模組101用於預設加密口令的合法規則,如加密口令中不能含有空白字元,加密口令的長度不能超過32位等等。The verification module 101 is used to preset a legal rule for encrypting a password. For example, the encrypted password cannot contain blank characters, and the length of the encrypted password cannot exceed 32 bits.
讀取模組102用於讀取用戶輸入的該加密口令。The reading module 102 is configured to read the encrypted password input by the user.
驗證模組101還用於根據所預設的加密口令的合法規則,驗證所讀取的該加密口令是否合法。若該加密口令不符合所預設的合法規則,則認為該加密口令不合法。The verification module 101 is further configured to verify whether the read encrypted password is legal according to a preset legal rule of the encrypted password. If the encrypted password does not comply with the preset legal rules, the encrypted password is considered invalid.
讀取模組102還用於當所讀取的該加密口令合法時,將該加密口令存入記憶體11中。The reading module 102 is further configured to store the encrypted password in the memory 11 when the encrypted password is legal.
讀取模組102還用於以二進位方式讀取手機1的IMEI(International Mobile Equipment Identification Number,國際移動設備識別)碼。該IMEI碼由15位元0~9的數位組成,是區別移動設備的標誌,儲存在移動設備中,每台移動設備對應於全球唯一的一個IMEI碼。The reading module 102 is further configured to read the IMEI (International Mobile Equipment Identification Number) code of the mobile phone 1 in a binary manner. The IMEI code consists of 15-bit 0~9 digits and is a distinguishing mobile device. It is stored in the mobile device, and each mobile device corresponds to a unique IMEI code in the world.
讀取模組102還用於以二進位方式讀取需要加密的該檔案110中的內容,即明文。The reading module 102 is further configured to read the content in the file 110 to be encrypted, that is, plain text, in a binary manner.
運算模組103用於將所讀取的IMEI碼與所讀取的該明文進行加密運算,得到該明文對應的密文。該加密運算的運算方法是:將該明文的各個位元組迴圈與組成該IMEI碼的各位十進位數字對應的二進位數字進行異或運算。The operation module 103 is configured to perform an encryption operation on the read IMEI code and the read plaintext to obtain a ciphertext corresponding to the plaintext. The encryption operation is performed by performing an exclusive OR operation on each of the byte groups of the plaintext and the binary digits corresponding to the decimal digits constituting the IMEI code.
具體而言,將該明文的第一個位元組與該IMEI碼第一位十進位數字對應的二進位數字執行異或運算,得到第一組異或結果存入緩衝區111中,將該明文的第二個位元組與該IMEI碼第二位十進位數字對應的二進位數字執行異或運算,得到第二組異或結果也存入緩衝區111中,依次類推,當將該明文的第十五個位元組與該IMEI碼第十五個十進位數字對應的二進位數字執行異或運算,並將第十五組異或結果存入緩衝區111中後,再將該明文的第十六個位元組與該IMEI碼第一個十進位數字對應的二進位數字執行異或運算,將第十六組異或結果存入緩衝區111中,依次迴圈,直至該明文的所有位元組都與該IMEI碼中對應的二進位數字執行異或運算後,該緩衝區111中存儲的有序排列的各組異或結果即為該明文加密後的密文。例如,加密前檔案110是一個文字檔案,該文字檔案中有一段話“I am an engineer”,則加密後該文字檔案中的這段話變成一段無法理解的編碼信息,即實現了對原內容的加密。Specifically, the first byte of the plaintext is subjected to an exclusive OR operation with the binary digit corresponding to the first decimal digit of the IMEI code, and the first set of XOR result is stored in the buffer 111, and the The second byte of the plaintext performs an exclusive OR operation with the binary digit corresponding to the second decimal digit of the IMEI code, and the second set of XOR result is also stored in the buffer 111, and so on, when the plaintext is The fifteenth byte of the IMEI code performs an exclusive OR operation on the binary digit corresponding to the fifteenth decimal digit of the IMEI code, and stores the fifteenth group XOR result in the buffer 111, and then the plaintext The sixteenth byte performs an exclusive OR operation with the binary digit corresponding to the first decimal digit of the IMEI code, and stores the sixteenth XOR result in the buffer 111, and sequentially loops until the plaintext After all the byte groups perform an exclusive OR operation with the corresponding binary digits in the IMEI code, the sequenced XOR result stored in the buffer 111 is the plaintext encrypted ciphertext. For example, the pre-encryption file 110 is a text file, and the text file has a paragraph "I am an engineer", and after the encryption, the words in the text file become an incomprehensible coding information, that is, the original content is realized. Encryption.
寫入模組104用於將檔案110中的明文刪除,將緩衝區111中的該密文寫入檔案110中,完成了對檔案110的加密。The write module 104 is configured to delete the plaintext in the file 110, and write the ciphertext in the buffer 111 into the file 110 to complete the encryption of the file 110.
當需要對加密後的檔案110解密時,用戶在手機1中輸入一組解密口令,讀取模組102還用於讀取該解密口令,以及從記憶體11中讀取被加密的檔案110對應的加密口令。When the encrypted file 110 needs to be decrypted, the user inputs a set of decrypted passwords in the mobile phone 1, and the reading module 102 is further configured to read the decrypted password and read the encrypted file 110 from the memory 11. Encrypted password.
驗證模組101還用於驗證該解密口令與該加密口令是否一致。The verification module 101 is further configured to verify whether the decrypted password is consistent with the encrypted password.
讀取模組102還用於當該解密口令與該加密口令一致時,以二進位方式讀取檔案110中的密文,以及以二進位方式讀取手機1的IMEI碼。The reading module 102 is further configured to read the ciphertext in the file 110 in a binary manner and read the IMEI code of the mobile phone 1 in a binary manner when the decrypted password is consistent with the encrypted password.
運算模組103還用於將所讀取的IMEI碼與所讀取的該密文進行解密運算,得到該密文對應的明文。該解密運算是加密運算的逆運算,運算方法是:將該密文的各個位元組迴圈與組成該IMEI碼的各位十進位數字對應的二進位數字進行異或運算。The operation module 103 is further configured to perform a decryption operation on the read IMEI code and the read ciphertext to obtain a plaintext corresponding to the ciphertext. The decryption operation is an inverse operation of the encryption operation, and the operation method is: performing an exclusive OR operation on each of the byte groups of the ciphertext and the binary digit corresponding to each of the decimal digits constituting the IMEI code.
具體而言,將該密文的第一個位元組與該IMEI碼第一位十進位數字對應的二進位數字執行異或運算,得到第一組異或結果存入緩衝區111中,將該密文的第二個位元組與該IMEI碼第二位十進位數字對應的二進位數字執行異或運算,得到第二組異或結果也存入緩衝區111中,依次類推,當將該密文的第十五個位元組與該IMEI碼第十五個十進位數字對應的二進位數字執行異或運算,並將第十五組異或結果存入緩衝區111中後,再將該密文的第十六個位元組與該IMEI碼第一個十進位數字對應的二進位數字執行異或運算,將第十六組異或結果存入緩衝區111中,依次迴圈,直至該密文的所有位元組都與該IMEI碼中對應的二進位數字執行異或運算後,該緩衝區111中存儲的有序排列的各組異或結果即為該密文解密後的明文,也即為被加密前檔案110中的內容。Specifically, the first byte of the ciphertext is subjected to an exclusive OR operation with the binary digit corresponding to the first decimal digit of the IMEI code, and the first set of XOR result is stored in the buffer 111, and The second byte of the ciphertext performs an exclusive OR operation with the binary digit corresponding to the second decimal digit of the IMEI code, and the second set of XOR result is also stored in the buffer 111, and so on. The fifteenth byte of the ciphertext performs an exclusive OR operation with the binary digit corresponding to the fifteenth decimal digit of the IMEI code, and stores the fifteenth group XOR result in the buffer 111, and then Performing an exclusive OR operation on the sixteenth byte of the ciphertext and the binary digit corresponding to the first decimal digit of the IMEI code, and storing the sixteenth group XOR result in the buffer 111, and sequentially looping After all the bytes of the ciphertext are XORed with the corresponding binary digits in the IMEI code, the sequenced XOR result stored in the buffer 111 is the ciphertext decrypted. The plaintext is also the content in the file 110 before being encrypted.
寫入模組104還用於將檔案110中的密文刪除,將緩衝區111中的該明文寫入檔案110中,完成了對被加密的檔案110的解密。The write module 104 is further configured to delete the ciphertext in the file 110, and write the plaintext in the buffer 111 into the file 110 to complete decryption of the encrypted file 110.
參閱圖3所示,係手機檔案加密方法較佳實施例的流程圖。在進入步驟S11之前,驗證模組101先預設加密口令的合法規則。Referring to FIG. 3, it is a flow chart of a preferred embodiment of a method for encrypting a mobile phone file. Before proceeding to step S11, the verification module 101 first presets a legal rule for encrypting the password.
步驟S11,讀取模組102讀取用戶輸入的加密口令。In step S11, the reading module 102 reads the encrypted password input by the user.
步驟S12,驗證模組101根據所預設的加密口令的合法規則,驗證所讀取的該加密口令是否合法。若該加密口令合法,則進入步驟S13,若該加密口令不合法,則結束流程。In step S12, the verification module 101 verifies whether the read encrypted password is legal according to the preset legal rule of the encrypted password. If the encrypted password is valid, the process proceeds to step S13, and if the encrypted password is invalid, the process ends.
步驟S13,讀取模組102將該加密口令存入記憶體11中。In step S13, the reading module 102 stores the encrypted password in the memory 11.
步驟S14,讀取模組102以二進位方式讀取手機1的IMEI碼。In step S14, the reading module 102 reads the IMEI code of the mobile phone 1 in a binary manner.
步驟S15,讀取模組102以二進位方式讀取需要加密的該檔案110中的內容,即明文。In step S15, the reading module 102 reads the content in the file 110 to be encrypted, that is, the plaintext, in a binary manner.
步驟S16,運算模組103將所讀取的IMEI碼與所讀取的該明文進行加密運算,得到該明文對應的密文。該加密運算的運算方法是:將該明文的各個位元組迴圈與組成該IMEI碼的各位十進位數字對應的二進位數字進行異或運算。In step S16, the operation module 103 performs an encryption operation on the read IMEI code and the read plaintext to obtain a ciphertext corresponding to the plaintext. The encryption operation is performed by performing an exclusive OR operation on each of the byte groups of the plaintext and the binary digits corresponding to the decimal digits constituting the IMEI code.
步驟S17,寫入模組104將檔案110中的明文刪除,將該密文寫入檔案110中。In step S17, the writing module 104 deletes the plaintext in the file 110, and writes the ciphertext into the file 110.
參閱圖4所示,係手機檔案解密方法較佳實施例的流程圖。在本實施例中,需要對被加密的檔案110解密。Referring to FIG. 4, it is a flow chart of a preferred embodiment of a method for decrypting a mobile phone file. In this embodiment, the encrypted file 110 needs to be decrypted.
步驟S21,讀取模組102讀取用戶輸入的解密口令,以及從記憶體11中讀取被加密的檔案110對應的加密口令。In step S21, the reading module 102 reads the decryption password input by the user, and reads the encrypted password corresponding to the encrypted file 110 from the memory 11.
步驟S22,驗證模組101驗證該解密口令與該加密口令是否一致。若該解密口令與該加密口令一致,則進入步驟S23,若該解密口令與該加密口令不一致,則結束流程。In step S22, the verification module 101 verifies whether the decrypted password is consistent with the encrypted password. If the decrypted password matches the encrypted password, the process proceeds to step S23, and if the decrypted password does not match the encrypted password, the flow is terminated.
步驟S23,讀取模組102以二進位方式讀取手機1的IMEI碼。In step S23, the reading module 102 reads the IMEI code of the mobile phone 1 in a binary manner.
步驟S24,讀取模組102以二進位方式讀取檔案110中的密文。In step S24, the reading module 102 reads the ciphertext in the file 110 in a binary manner.
步驟S25,運算模組103將所讀取的IMEI碼與所讀取的該密文進行解密運算,得到該密文對應的明文。該解密運算的方法是:將該密文的各個位元組迴圈與組成該IMEI碼的各位十進位數字對應的二進位數字進行異或運算。In step S25, the operation module 103 decrypts the read IMEI code and the read ciphertext to obtain a plaintext corresponding to the ciphertext. The decryption operation is performed by performing an exclusive OR operation on each of the byte sets of the ciphertext and the binary number corresponding to each of the decimal digits constituting the IMEI code.
步驟S26,寫入模組104將檔案110中的密文刪除,將該明文寫入檔案110中。In step S26, the writing module 104 deletes the ciphertext in the file 110, and writes the plaintext into the file 110.
綜上所述,由於IMEI碼具有全球唯一的特點,通過手機1的IMEI碼將檔案110中的內容加密,可以使相同的明文在不同的手機上產生不同的密文,同時,加密後檔案內容無法被理解,提高了加密檔案的安全性。而當用戶需要使用被加密的檔案110時,可以通過輸入與加密口令一致的解密口令,迅速將檔案110的內容解密成被加密前的內容。In summary, since the IMEI code has the unique feature of the whole world, the content in the file 110 is encrypted by the IMEI code of the mobile phone 1, so that the same plaintext can generate different ciphertexts on different mobile phones, and at the same time, the encrypted archive content Unable to be understood, improving the security of encrypted files. When the user needs to use the encrypted file 110, the content of the file 110 can be quickly decrypted into the content before being encrypted by inputting the decryption password in accordance with the encrypted password.
綜上所述,本發明符合發明專利要件,爰依法提出專利申請。惟,以上所述者僅爲本發明之較佳實施例,本發明之範圍並不以上述實施例爲限,舉凡熟悉本案技藝之人士援依本發明之精神所作之等效修飾或變化,皆應涵蓋於以下申請專利範圍內。In summary, the present invention complies with the requirements of the invention patent and submits a patent application according to law. The above is only the preferred embodiment of the present invention, and the scope of the present invention is not limited to the above-described embodiments, and equivalent modifications or variations made by those skilled in the art in light of the spirit of the present invention are It should be covered by the following patent application.
1...手機1. . . Mobile phone
10...檔案保護系統10. . . File protection system
11...記憶體11. . . Memory
110...檔案110. . . file
111...緩衝區111. . . Buffer
12...CPU12. . . CPU
101...驗證模組101. . . Verification module
102...讀取模組102. . . Read module
103...運算模組103. . . Computing module
104...寫入模組104. . . Write module
圖1係本發明手機檔案保護系統較佳實施例的運行環境圖。1 is a diagram showing the operating environment of a preferred embodiment of the mobile phone file protection system of the present invention.
圖2係本發明手機檔案保護系統的功能模組圖。2 is a functional block diagram of the mobile phone file protection system of the present invention.
圖3係手機檔案加密方法較佳實施例的流程圖。3 is a flow chart of a preferred embodiment of a method for encrypting a mobile phone file.
圖4係手機檔案解密方法較佳實施例的流程圖。4 is a flow chart of a preferred embodiment of a method for decrypting a mobile phone file.
10...檔案保護系統10. . . File protection system
101...驗證模組101. . . Verification module
102...讀取模組102. . . Read module
103...運算模組103. . . Computing module
104...寫入模組104. . . Write module
Claims (9)
讀取模組,用於當需要對手機檔案進行加密時,以二進位方式讀取手機的IMEI碼和該檔案中的明文;
運算模組,用於將所讀取的IMEI碼與所讀取的該明文進行加密運算,得到該明文對應的密文,該加密運算的運算方法是將該明文的各個位元組迴圈與組成該IMEI碼的各位十進位數字對應的二進位數字進行異或運算;
寫入模組,用於將該檔案中的明文刪除,將該密文寫入該檔案中。A mobile phone file protection system, the system comprising:
The reading module is configured to read the IMEI code of the mobile phone and the plaintext in the file in a binary manner when the mobile phone file needs to be encrypted;
The operation module is configured to perform an encryption operation on the read IMEI code and the read plaintext to obtain a ciphertext corresponding to the plaintext, and the operation method of the encryption operation is to loop back the individual bytes of the plaintext. And performing an exclusive OR operation on the binary digits corresponding to the decimal digits of the IMEI code;
The write module is used to delete the plaintext in the file, and the ciphertext is written into the file.
所述驗證模組還用於驗證該解密口令與該加密口令是否一致;
所述讀取模組還用於當該解密口令與該加密口令一致時,以二進位方式讀取該檔案中的密文,以及以二進位方式讀取手機的IMEI碼;
所述運算模組還用於將所讀取的IMEI碼與所讀取的該密文進行解密運算,得到該密文對應的明文,該解密運算的運算方法是將該密文的各個位元組迴圈與組成該IMEI碼的各位十進位數字對應的二進位數字進行異或運算;
所述寫入模組還用於將該檔案中的密文刪除,將該明文寫入該檔案中。The mobile phone file protection system according to claim 4, wherein the reading module is further configured to read a decryption password input by the user and read from the memory when the encrypted mobile phone file needs to be decrypted. Take the encrypted password corresponding to the file;
The verification module is further configured to verify whether the decrypted password is consistent with the encrypted password;
The reading module is further configured to: when the decrypted password is consistent with the encrypted password, read the ciphertext in the file in a binary manner, and read the IMEI code of the mobile phone in a binary manner;
The operation module is further configured to perform a decryption operation on the read IMEI code and the read ciphertext to obtain a plaintext corresponding to the ciphertext, and the operation method of the decryption operation is each bit of the ciphertext The group loop performs an exclusive OR operation with the binary digits corresponding to the decimal digits of the digits constituting the IMEI code;
The write module is further configured to delete the ciphertext in the file, and write the plaintext into the file.
(a)當需要對手機檔案進行加密時,以二進位方式讀取手機的IMEI碼和該檔案中的明文;
(b)將所讀取的IMEI碼與所讀取的該明文進行加密運算,得到該明文對應的密文,該加密運算的運算方法是將該明文的各個位元組迴圈與組成該IMEI碼的各位十進位數字對應的二進位數字進行異或運算;
(c)將該檔案中的明文刪除,將該密文寫入該檔案中。A mobile phone file protection method, the method comprising the following steps:
(a) When the mobile phone file needs to be encrypted, the IMEI code of the mobile phone and the plaintext in the file are read in binary mode;
(b) Encrypting the read IMEI code with the read plaintext to obtain a ciphertext corresponding to the plaintext, and the encryption operation is performed by looping the respective bytes of the plaintext and composing the IMEI. XOR operation of the binary digits corresponding to the decimal digits of the code;
(c) Delete the plaintext in the file and write the ciphertext into the file.
預設加密口令的合法規則。The method for protecting a mobile phone file as described in claim 6 of the patent application, before the step (a), further includes:
The legal rules for presetting encrypted passwords.
(a1)讀取用戶輸入的加密口令;
(a2)根據所預設的加密口令的合法規則,驗證所讀取的加密口令是否合法,若該加密口令合法,則將該加密口令存入手機的記憶體中,若該加密口令不合法,則結束流程。For the mobile phone file protection method described in claim 7, the step (a) further includes:
(a1) reading the encrypted password input by the user;
(a2) verifying whether the encrypted password read is legal according to the legal rule of the preset encrypted password. If the encrypted password is legal, the encrypted password is stored in the memory of the mobile phone. If the encrypted password is invalid, Then the process ends.
(d1)讀取用戶輸入的解密口令,以及從記憶體中讀取該檔案對應的加密口令;
(d2)驗證該解密口令與該加密口令是否一致,若該解密口令與該加密口令一致,則進入步驟(d3),若該解密口令與該加密口令不一致,則結束流程;
(d3)以二進位方式讀取手機的IMEI碼和該檔案中的密文;
(d4)將所讀取的IMEI碼與所讀取的該密文進行解密運算,得到該密文對應的明文,該解密運算的方法是將該密文的各個位元組迴圈與組成該IMEI碼的各位十進位數字對應的二進位數字進行異或運算;
(d5)將該檔案中的密文刪除,將該明文寫入該檔案中。The mobile phone file protection method according to claim 8, wherein the method further comprises the step of decrypting the encrypted mobile phone file:
(d1) reading the decryption password input by the user, and reading the encrypted password corresponding to the file from the memory;
(d2) verifying whether the decrypted password is consistent with the encrypted password, and if the decrypted password is consistent with the encrypted password, proceeding to step (d3), if the decrypted password is inconsistent with the encrypted password, ending the flow;
(d3) reading the IMEI code of the mobile phone and the ciphertext in the file in a binary manner;
(d4) decrypting the read IMEI code and the read ciphertext to obtain a plaintext corresponding to the ciphertext, the decrypting operation is to loop back and form each byte of the ciphertext XOR operation of the binary digits corresponding to the decimal digits of the IMEI code;
(d5) Delete the ciphertext in the file and write the plaintext into the file.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| TW100103201A TWI483606B (en) | 2011-01-27 | 2011-01-27 | System and method for protecting the phone files |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| TW100103201A TWI483606B (en) | 2011-01-27 | 2011-01-27 | System and method for protecting the phone files |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| TW201233114A TW201233114A (en) | 2012-08-01 |
| TWI483606B true TWI483606B (en) | 2015-05-01 |
Family
ID=47069805
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| TW100103201A TWI483606B (en) | 2011-01-27 | 2011-01-27 | System and method for protecting the phone files |
Country Status (1)
| Country | Link |
|---|---|
| TW (1) | TWI483606B (en) |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20030041251A1 (en) * | 2001-08-23 | 2003-02-27 | International Business Machines Corporation | Rule-compliant password generator |
| US20040180694A1 (en) * | 2003-03-13 | 2004-09-16 | Cheng-Shing Lai | Mobile phone with an encryption function |
| TW200849927A (en) * | 2007-06-15 | 2008-12-16 | Sony Ericsson Mobile Comm Ab | Generation of device dependant RSA key |
| US20090016525A1 (en) * | 2007-07-10 | 2009-01-15 | Stmicroelectronics S.R.L. | Encoding/decoding apparatus |
-
2011
- 2011-01-27 TW TW100103201A patent/TWI483606B/en not_active IP Right Cessation
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20030041251A1 (en) * | 2001-08-23 | 2003-02-27 | International Business Machines Corporation | Rule-compliant password generator |
| US20040180694A1 (en) * | 2003-03-13 | 2004-09-16 | Cheng-Shing Lai | Mobile phone with an encryption function |
| TW200849927A (en) * | 2007-06-15 | 2008-12-16 | Sony Ericsson Mobile Comm Ab | Generation of device dependant RSA key |
| US20090016525A1 (en) * | 2007-07-10 | 2009-01-15 | Stmicroelectronics S.R.L. | Encoding/decoding apparatus |
Also Published As
| Publication number | Publication date |
|---|---|
| TW201233114A (en) | 2012-08-01 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN109040090B (en) | A data encryption method and device | |
| CN110110548B (en) | Method for storing files in trusted execution environment in encrypted manner based on encryption chip | |
| US9537657B1 (en) | Multipart authenticated encryption | |
| US8571220B2 (en) | Method and apparatus for securing data in a memory device | |
| CN112469036B (en) | Message encryption and decryption method and device, mobile terminal and storage medium | |
| WO2021013245A1 (en) | Data key protection method and system, electronic device and storage medium | |
| CN111404682B (en) | A method and device for segmenting Android environment keys | |
| CN114444140B (en) | Non-copyable function application in memory | |
| CN104704501B (en) | securely generate and store passwords in computer systems | |
| CN114826590B (en) | A packet mode encryption method, decryption method, device and equipment thereof | |
| CN107612683A (en) | A kind of encipher-decipher method, device, system, equipment and storage medium | |
| CN111066077B (en) | Encryption device, encryption method, decryption device, and decryption method | |
| CN104732159A (en) | File processing method and file processing device | |
| CN115941304A (en) | Data encryption method, device, terminal device and computer-readable storage medium | |
| CN109510702A (en) | A method of it key storage based on computer characteristic code and uses | |
| CN102612025B (en) | Protective system and protective method for mobile phone documents | |
| CN118643517A (en) | An adaptive hardware encryption method, device, computer equipment and medium | |
| CN1863042B (en) | Method for information encryption and decryption | |
| JP5118494B2 (en) | Memory system having in-stream data encryption / decryption function | |
| CN110516457B (en) | Data storage method, data reading method and storage device | |
| CN117938546B (en) | Verification and data access method of electronic account | |
| TWI483606B (en) | System and method for protecting the phone files | |
| CN118740825A (en) | Method, device, storage medium and vehicle for transmitting vehicle configuration file | |
| JP2008524969A5 (en) | ||
| CN111651788B (en) | Terminal access control system and method based on lattice code |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| MM4A | Annulment or lapse of patent due to non-payment of fees |