TWI397300B - Digital information encryption method - Google Patents
Digital information encryption method Download PDFInfo
- Publication number
- TWI397300B TWI397300B TW98132531A TW98132531A TWI397300B TW I397300 B TWI397300 B TW I397300B TW 98132531 A TW98132531 A TW 98132531A TW 98132531 A TW98132531 A TW 98132531A TW I397300 B TWI397300 B TW I397300B
- Authority
- TW
- Taiwan
- Prior art keywords
- information block
- encrypted information
- encrypted
- culture
- secret
- Prior art date
Links
Landscapes
- Storage Device Security (AREA)
Description
本發明涉及一種加密方法,特別是關於一種數位信息加密方法。The present invention relates to an encryption method, and more particularly to a digital information encryption method.
在電腦或通信領域中,有許多數位信息加密方法,塊加密(Block encryption)是其中較易硬體實現之一種。然而,塊加密是易被破解的,塊加密易受密文搜尋(ciphertext searching)、重放映、插入和刪除等處理程序傷害,因為塊加密針對每一資料區塊獨立進行加密。In the field of computer or communication, there are many digital information encryption methods, and block encryption is one of the easier hardware implementations. However, block encryption is easy to crack. Block encryption is vulnerable to cipher text searching, replay, insert and delete, because block encryption is encrypted independently for each data block.
一些習用的技術,曾揭示補救上述弱點的方法。例如工作在碼回饋模式之自我同步串流碼編碼(self-synchronous stream cipher in cipher feed back mode)或碼塊鏈編碼(cipher block chaining,CBC)。其中,碼塊鏈編碼(CBC)較常被使用來建立消息驗證代碼(message authentication codes,MAC)。Some conventional techniques have revealed ways to remedy the above weaknesses. For example, a self-synchronous stream cipher in cipher feed back mode or a cipher block chaining (CBC). Among them, code block chain coding (CBC) is often used to establish message authentication codes (MAC).
消息驗證(message authentication)允許各使用者(partners)之交流,藉由共享一密鑰(secret key)去驗證一接收到的信息是否來自擁有該密鑰的使用者。這是在數據通信(data communication)中最重要且最廣泛被使用的密碼技術。Message authentication allows the communication of the partners to verify whether a received message comes from the user who owns the key by sharing a secret key. This is the most important and widely used cryptographic technique in data communication.
習用數位信息加密方法之一,簡稱隨機碼鏈(Random Code Chaining,RCC)加解密,以下舉例說明:One of the commonly used digital information encryption methods, referred to as Random Code Chaining (RCC) encryption and decryption, the following examples:
為了加密一原始信息序列(message sequence),首先切割該序列成為數個原始信息方塊(blocks)M t ,t是自然數。假設每一原始信息方塊(blocks)M t 的長度為32位元。之後利用一加密方程式(1)進行加密,加密方程式(91)公式如下:C t =E k [(M t ⊕R t -1 )232 +R t ] (91)To encrypt an original message sequence, the sequence is first cut into a number of original information blocks M t , where t is a natural number. Assume that each original information block (blocks) M t is 32 bits in length. Then, using an encryption equation (1) for encryption, the equation of equation (91) is encrypted as follows: C t = E k [( M t ⊕ R t -1 ) 2 32 + R t ] (91)
其中,C t 為一加密後信息方塊,E k []代表可為任一種64位元加密運算,⊕代表模數為2之加法,R 0 是一長度為32位元的隨機加密碼。Wherein, C t is an encrypted information block, E k [] represents any 64-bit encryption operation, ⊕ represents an addition of 2 modulo, and R 0 is a random encryption code of 32 bits in length.
為了由該加密後信息方塊C t 解密出該原始信息方塊M t ,一解加密後信息方塊C* t 可由式(92)得出:C* t =Dk [Ct ] =Dk [(M t ⊕R t -1 )232 +R t ] (92)In order to decrypt the original information block M t from the encrypted information block C t , a de-encrypted information block C * t can be obtained from equation (92): C * t = D k [C t ] = D k [( M t ⊕ R t -1 ) 2 32 + R t ] (92)
其中,D k []代表可為任一種與該E k []相對應之解密運算。Where D k [] represents any decryption operation corresponding to the E k [].
之後,將該解加密後信息方塊C* t
藉由式(93),可得出一解加密原始信息方塊M * t
及該原始信息方塊M t
:
然而,本習用技術仍過於簡單,以致於不足以抵抗破解之威脅。其他另一些習用技術則過於複雜,以致於無法進行硬體實現。However, this technique is still too simple to resist the threat of cracking. Other other conventional techniques are too complex to be hardware-implemented.
本發明之目的在於提供一種數位信息加密方法,具有優秀破解抵抗能力。The object of the present invention is to provide a digital information encryption method with excellent crack resistance.
本發明之另一目的在於提供一種數位信息加密方法,能夠簡易地切換加密方式,而不易被破解。Another object of the present invention is to provide a digital information encryption method capable of easily switching an encryption method without being easily cracked.
為達到前述創作目的,本發明所運用之技術手段及藉由該技術手段所能達到之功效如下:In order to achieve the above-mentioned creative purposes, the technical means used by the present invention and the effects achieved by the technical means are as follows:
本發明提出一種數位信息加密方法,包含:切割一原始信息序列為數原始信息方塊;判斷一加密後信息方塊是否存在,若判斷結果為是,將該加密後信息方塊切割為一第一加密後信息方塊及一第二加密後信息方塊,若判斷結果為否,將一初始密文加密碼設定為該加密後信息方塊,將該加密後信息方塊切割為該第一加密後信息方塊及該第二加密後信息方塊;判斷一密文化隨機加密碼是否存在,若判斷結果為是,將該原始信息方塊與該第一加密後信息方塊進行加法,且與該密文化隨機加密碼進行加法,將結果位存至一準加密後信息方塊之較低位元,若判斷結果為否,隨機產生該密文化隨機加密碼,將該原始信息方塊與該第一加密後信息方塊進行加法,且與該密文化隨機加密碼進行加法,將結果位存至一準加密後信息方塊之較低位元;將該第二加密後信息方塊與該密文化隨機加密碼進行加法,將結果位存至該準加密後信息方塊之較高位元;將該密文化隨機加密碼與該第二加密後信息方塊進行加法,將結果存回該密文化隨機加密碼;及將該準加密後信息方塊進行加密運算,得到該加密後信息方塊;依序將各該原 始信息方塊加密,直至該原始信息序列加密完成。The invention provides a digital information encryption method, which comprises: cutting an original information sequence into a number of original information blocks; determining whether an encrypted information block exists, and if the determination result is yes, cutting the encrypted information block into a first encrypted information. After the block and a second encrypted information block, if the judgment result is no, an initial ciphertext plus password is set as the encrypted information block, and the encrypted information block is cut into the first encrypted information block and the second Encrypted information block; judging whether a secret culture random password exists, if the judgment result is yes, adding the original information block and the first encrypted information block, and adding the password with the secret culture, the result is added The bit is stored in a lower bit of the quasi-encrypted information block. If the judgment result is no, the secret culture random encryption code is randomly generated, and the original information block is added to the first encrypted information block, and the secret is added. The culture is randomly added with a password to add the result bit to the lower bit of the quasi-encrypted information block; the second encrypted letter is The block and the secret culture are randomly added with a password to add the result bit to the higher bit of the quasi-encrypted information block; the secret culture random encryption code is added to the second encrypted information block, and the result is stored back to the block The secret culture is randomly added with a password; and the quasi-encrypted information block is subjected to an encryption operation to obtain the encrypted information block; The information block is encrypted until the original information sequence is encrypted.
本發明更提出一種數位信息加密方法,包含:切割一原始信息序列為數原始信息方塊;判斷一加密後信息方塊是否存在,若判斷結果為是,將該加密後信息方塊切割為一第一加密後信息方塊及一第二加密後信息方塊,若判斷結果為否,將一初始密文加密碼設定為該加密後信息方塊,將該加密後信息方塊切割為該第一加密後信息方塊及該第二加密後信息方塊;判斷一密文化隨機加密碼是否存在,若判斷結果為是,將該原始信息方塊與該第一加密後信息方塊進行加法,且與該密文化隨機加密碼進行加法,將結果位存至一準加密後信息方塊之較高位元,若判斷結果為否,隨機產生該密文化隨機加密碼,將該原始信息方塊與該第一加密後信息方塊進行加法,且與該密文化隨機加密碼進行加法,將結果位存至一準加密後信息方塊之較高位元;將該第二加密後信息方塊與該密文化隨機加密碼進行加法,將結果位存至該準加密後信息方塊之較低位元;將該密文化隨機加密碼與該第二加密後信息方塊進行加法,將結果存回該密文化隨機加密碼;及將該準加密後信息方塊進行加密運算,得到該加密後信息方塊;依序將各該原始信息方塊加密,直至該原始信息序列加密完成。The invention further provides a digital information encryption method, comprising: cutting an original information sequence into a number of original information blocks; determining whether an encrypted information block exists, and if the determination result is yes, cutting the encrypted information block into a first encrypted After the information block and the second encrypted information block, if the judgment result is no, an initial ciphertext plus password is set as the encrypted information block, and the encrypted information block is cut into the first encrypted information block and the first Second, the information block after encryption; determining whether a secret culture random password exists, if the judgment result is yes, adding the original information block and the first encrypted information block, and adding the password with the secret culture, and adding The result is stored in a higher bit of the quasi-encrypted information block. If the judgment result is no, the secret culture random encryption code is randomly generated, and the original information block and the first encrypted information block are added, and the secret is added. The culture is randomly added with a password for addition, and the result bit is stored to a higher bit of the quasi-encrypted information block; after the second encryption The interest block is added with the secret culture random encryption code, and the result bit is stored in the lower bit of the quasi-encrypted information block; the secret culture random encryption code is added to the second encrypted information block, and the result is saved. Returning the secret culture to the random password; and encrypting the quasi-encrypted information block to obtain the encrypted information block; sequentially encrypting each original information block until the original information sequence is encrypted.
本發明再提出一種數位信息加密方法,包含:判斷一加密後信息方塊是否存在,若判斷結果為是,將該加密後信息方塊切割為一第一加密後信息方塊及一第二加密後信息方塊,若判斷結果為否,將一初始密文加密碼設定為該加密後信息方塊,將該加密後信息方塊切割為該第一加密 後信息方塊及該第二加密後信息方塊;判斷一密文化隨機加密碼是否存在,若判斷結果為是,將一原始信息方塊與該第一加密後信息方塊進行加法,且與該密文化隨機加密碼進行加法,將結果位存至一準加密後信息方塊之較低位元,若判斷結果為否,隨機產生該密文化隨機加密碼,將該原始信息方塊與該第一加密後信息方塊進行加法,且與該密文化隨機加密碼進行加法,將結果位存至一準加密後信息方塊之較低位元;將該第二加密後信息方塊與該密文化隨機加密碼進行加法,將結果位存至該準加密後信息方塊之較高位元;將該密文化隨機加密碼與該第二加密後信息方塊進行加法,將結果存回該密文化隨機加密碼;及將該準加密後信息方塊進行加密運算,得到該加密後信息方塊。The invention further provides a digital information encryption method, comprising: determining whether an encrypted information box exists, and if the determination result is yes, cutting the encrypted information square into a first encrypted information block and a second encrypted information block. If the judgment result is no, an initial ciphertext plus password is set as the encrypted information block, and the encrypted information block is cut into the first encryption. a post-information block and the second encrypted information block; determining whether a secret culture random encryption password exists, and if the judgment result is yes, adding an original information block and the first encrypted information block, and the secret culture random Adding a password for adding, storing the result bit to a lower bit of the quasi-encrypted information block, and if the judgment result is no, randomly generating the secret culture random plus password, the original information block and the first encrypted information block Adding, and adding the password with the secret culture, adding the result bit to the lower bit of the quasi-encrypted information block; adding the second encrypted information block and the secret culture random encryption code, The result is stored in the higher bit of the quasi-encrypted information block; the secret culture random encryption code is added to the second encrypted information block, and the result is stored back to the secret culture random encryption password; and the quasi-encrypted The information block performs an encryption operation to obtain the encrypted information block.
本發明又提出一種數位信息加密方法,包含:判斷一加密後信息方塊是否存在,若判斷結果為是,將該加密後信息方塊切割為一第一加密後信息方塊及一第二加密後信息方塊,若判斷結果為否,將一初始密文加密碼設定為該加密後信息方塊,將該加密後信息方塊切割為該第一加密後信息方塊及該第二加密後信息方塊;判斷一密文化隨機加密碼是否存在,若判斷結果為是,將一原始信息方塊與該第一加密後信息方塊進行加法,且與該密文化隨機加密碼進行加法,將結果位存至一準加密後信息方塊之較高位元,若判斷結果為否,隨機產生該密文化隨機加密碼,將該原始信息方塊與該第一加密後信息方塊進行加法,且與該密文化隨機加密碼進行加法,將結果位存至一準加密後 信息方塊之較高位元;將該第二加密後信息方塊與該密文化隨機加密碼進行加法,將結果位存至該準加密後信息方塊之較低位元;將該密文化隨機加密碼與該第二加密後信息方塊進行加法,將結果存回該密文化隨機加密碼;及將該準加密後信息方塊進行加密運算,得到該加密後信息方塊。The invention further provides a digital information encryption method, comprising: determining whether an encrypted information box exists, and if the determination result is yes, cutting the encrypted information square into a first encrypted information block and a second encrypted information block. If the judgment result is no, an initial ciphertext plus password is set as the encrypted information block, and the encrypted information block is cut into the first encrypted information block and the second encrypted information block; Whether the random encryption password exists, if the judgment result is yes, adding an original information block and the first encrypted information block, and adding the password with the secret culture, and storing the result bit to a quasi-encrypted information block. The higher bit, if the judgment result is no, randomly generates the secret culture random encryption code, adds the original information block and the first encrypted information block, and adds the password with the secret culture to add the result, and the result bit Save to a quasi-encrypted The higher bit of the information block; the second encrypted information block is added with the secret culture random encryption code, and the result bit is stored in the lower bit of the quasi-encrypted information block; the secret culture is randomly added with the password and The second encrypted information block is added, and the result is stored back to the secret culture random encryption code; and the quasi-encrypted information block is encrypted to obtain the encrypted information block.
依本發明較佳實施例所述之數位信息加密方法,其中將該加密後信息方塊切割為該第一加密後信息方塊及該第二加密後信息方塊包含將該加密後信息方塊之較高位元段資料切割為該第一加密後信息方塊,且將該加密後信息方塊之較低位元段資料切割為該第二加密後信息方塊。According to the digital information encryption method of the preferred embodiment of the present invention, the encrypted information block is cut into the first encrypted information block and the second encrypted information block includes the higher bit of the encrypted information block. The segment data is cut into the first encrypted information block, and the lower byte segment data of the encrypted information block is cut into the second encrypted information block.
依本發明較佳實施例所述之數位信息加密方法,其中將該加密後信息方塊切割為該第一加密後信息方塊及該第二加密後信息方塊包含將該加密後信息方塊之較低位元段資料切割為該第一加密後信息方塊,且將該加密後信息方塊之較高位元段資料切割為該第二加密後信息方塊。According to the digital information encryption method of the preferred embodiment of the present invention, the encrypted information block is cut into the first encrypted information block and the second encrypted information block includes the lower bit of the encrypted information block. The meta-paragraph data is cut into the first encrypted information block, and the higher-order segment data of the encrypted information block is cut into the second encrypted information block.
依本發明較佳實施例所述之數位信息加密方法,其中將一初始密文加密碼設定為該加密後信息方塊包含將一隨機產生之初始密文加密碼設定為該加密後信息方塊。According to the digital information encryption method of the preferred embodiment of the present invention, setting an initial ciphertext plus password to the encrypted information block includes setting a randomly generated initial ciphertext plus password as the encrypted information block.
依本發明較佳實施例所述之數位信息加密方法,其中將一初始密文加密碼設定為該加密後信息方塊包含將一預先設定之初始密文加密碼設定為該加密後信息方塊。According to the digital information encryption method of the preferred embodiment of the present invention, the setting of an initial ciphertext plus password to the encrypted information block includes setting a predetermined initial ciphertext plus password as the encrypted information block.
藉由以自由地選擇高位元或低位元的切割方式,切割一加密後信息方塊以進行下一次加密,且自由地選擇高位元或低位元的儲存方式,儲存一準加密後信息方塊,以加 密成該加密後信息方塊,本發明提供使用者餘裕地操作自由度,且可強化數位信息加密方法之破解抵抗能力。By cutting the encrypted information block for the next encryption by freely selecting the high or low bit cutting mode, and freely selecting the storage mode of the high or low bit, storing a quasi-encrypted information block to add By embedding the encrypted information block, the present invention provides the user with a degree of freedom of operation, and can enhance the crack resistance of the digital information encryption method.
為讓本發明之上述及其他目的、特徵及優點能更明顯易懂,下文特舉本發明之較佳實施例,並配合所附圖式,作詳細說明如下:The above and other objects, features and advantages of the present invention will become more <RTIgt;
請參照第1a及1b圖所示,其係本發明較佳實施例之數位信息加密方法流程圖。如圖所示,本發明較佳實施例之數位信息加密方法依下列步驟進行加密:(S1)切割一原始信息序列為數原始信息方塊;(S2)判斷一加密後信息方塊是否存在,若判斷結果為是,將該加密後信息方塊切割為一第一加密後信息方塊及一第二加密後信息方塊,若判斷結果為否,將一初始密文加密碼設定為該加密後信息方塊,將該加密後信息方塊切割為該第一加密後信息方塊及該第二加密後信息方塊;(S3)判斷一密文化隨機加密碼是否存在,若判斷結果為是,將該原始信息方塊與該第一加密後信息方塊進行加法,且與該密文化隨機加密碼進行加法,將結果位存至一準加密後信息方塊之較低位元,若判斷結果為否,隨機產生該密文化隨機加密碼,將該原始信息方塊與該第一加密後信息方塊進行加法,且與該密文化隨機加密碼進行加法,將結果位存至一準加密後信息方塊之較低位元;(S4)將該第二加密後信息方塊與該密文化隨機加密碼進行加法,將結果位存至該準加密後信息方塊之較高位元;(S5)將該密文化隨機加密碼與該第二加密後信 息方塊進行加法,將結果存回該密文化隨機加密碼;及(S6)將該準加密後信息方塊進行加密運算,得到該加密後信息方塊;依序將各該原始信息方塊加密,直至該原始信息序列加密完成。Please refer to FIGS. 1a and 1b, which are flowcharts of a method for encrypting digital information according to a preferred embodiment of the present invention. As shown in the figure, the digital information encryption method of the preferred embodiment of the present invention performs encryption according to the following steps: (S1) cutting an original information sequence into a number of original information blocks; (S2) determining whether an encrypted information block exists, and if the result is determined If yes, the encrypted information block is cut into a first encrypted information block and a second encrypted information block. If the determination result is no, an initial ciphertext plus password is set as the encrypted information block, and the After the encryption, the information block is cut into the first encrypted information block and the second encrypted information block; (S3) determining whether a secret culture random encryption password exists, and if the determination result is yes, the original information block and the first After the encryption, the information block is added, and the secret culture is added with a random password, and the result is stored in a lower bit of the quasi-encrypted information block. If the judgment result is no, the secret culture random encryption code is randomly generated. Adding the original information block and the first encrypted information block, and adding the password with the secret culture, adding the result bit to a quasi-encrypted letter a lower bit of the block; (S4) adding the second encrypted information block to the secret culture random encryption code, and storing the result bit to a higher bit of the quasi-encrypted information block; (S5) the secret Culture random encryption and the second encrypted letter The information block is added, and the result is stored back to the secret culture random encryption code; and (S6) the quasi-encrypted information block is encrypted to obtain the encrypted information block; each of the original information blocks is sequentially encrypted until the The original information sequence is encrypted.
請參照第2a及2b圖所示,其係本發明另一較佳實施例之數位信息加密方法流程圖。如圖所示,本發明較佳實施例之數位信息加密方法依下列步驟進行加密:(S1)切割一原始信息序列為數原始信息方塊;(S2)判斷一加密後信息方塊是否存在,若判斷結果為是,將該加密後信息方塊切割為一第一加密後信息方塊及一第二加密後信息方塊,若判斷結果為否,將一初始密文加密碼設定為該加密後信息方塊,將該加密後信息方塊切割為該第一加密後信息方塊及該第二加密後信息方塊;(S3)判斷一密文化隨機加密碼是否存在,若判斷結果為是,將該原始信息方塊與該第一加密後信息方塊進行加法,且與該密文化隨機加密碼進行加法,將結果位存至一準加密後信息方塊之較高位元,若判斷結果為否,隨機產生該密文化隨機加密碼,將該原始信息方塊與該第一加密後信息方塊進行加法,且與該密文化隨機加密碼進行加法,將結果位存至一準加密後信息方塊之較高位元;(S4)將該第二加密後信息方塊與該密文化隨機加密碼進行加法,將結果位存至該準加密後信息方塊之較低位元;(S5)將該密文化隨機加密碼與該第二加密後信息方塊進行加法,將結果存回該密文化隨機加密碼;及(S6)將該準加密後信息方塊進行加密運算,得到該加密後信息方塊;依序將各該原始信息方塊加密,直至該原始 信息序列加密完成。Please refer to FIGS. 2a and 2b, which are flowcharts of a method for encrypting digital information according to another preferred embodiment of the present invention. As shown in the figure, the digital information encryption method of the preferred embodiment of the present invention performs encryption according to the following steps: (S1) cutting an original information sequence into a number of original information blocks; (S2) determining whether an encrypted information block exists, and if the result is determined If yes, the encrypted information block is cut into a first encrypted information block and a second encrypted information block. If the determination result is no, an initial ciphertext plus password is set as the encrypted information block, and the After the encryption, the information block is cut into the first encrypted information block and the second encrypted information block; (S3) determining whether a secret culture random encryption password exists, and if the determination result is yes, the original information block and the first After the encryption, the information block is added, and the secret culture is added with a random password, and the result is stored in a higher bit of the quasi-encrypted information block. If the judgment result is no, the secret culture random encryption code is randomly generated. The original information block is added to the first encrypted information block, and is added to the secret culture random encryption code, and the result bit is stored in a quasi-encrypted letter. (S4) adding the second encrypted information block and the secret culture random encryption code, and storing the result bit to the lower bit of the quasi-encrypted information block; (S5) the secret The culture random encryption code and the second encrypted information block are added, and the result is stored back to the secret culture random encryption password; and (S6) the quasi-encrypted information block is encrypted to obtain the encrypted information information block; Encrypt each original information block until the original The information sequence is encrypted.
綜合第1a、1b圖及第2a、2b圖之描述,本發明較佳實施例之數位信息加密方法可更細分如下。Combining the descriptions of Figures 1a, 1b and 2a, 2b, the digital information encryption method of the preferred embodiment of the present invention can be further subdivided as follows.
請參照第3a及3b圖所示,其係本發明較佳實施例之數位信息加密方法細部流程圖。如圖所示,本發明較佳實施例之數位信息加密方法依下列步驟進行加密:(S1)切割一原始信息序列為數原始信息方塊;(S20)判斷一加密後信息方塊是否存在,若判斷結果為是,(S21)將該加密後信息方塊切割為一第一加密後信息方塊及一第二加密後信息方塊,若判斷結果為否,(S22)將一初始密文加密碼設定為該加密後信息方塊,(S21)將該加密後信息方塊切割為該第一加密後信息方塊及該第二加密後信息方塊;(S30)判斷一密文化隨機加密碼是否存在,若判斷結果為是,(S31)將該原始信息方塊與該第一加密後信息方塊進行加法,且與該密文化隨機加密碼進行加法,將結果位存至一準加密後信息方塊之較低位元,若判斷結果為否,(S32)隨機產生該密文化隨機加密碼,(S31)將該原始信息方塊與該第一加密後信息方塊進行加法,且與該密文化隨機加密碼進行加法,將結果位存至一準加密後信息方塊之較低位元;(S4)將該第二加密後信息方塊與該密文化隨機加密碼進行加法,將結果位存至該準加密後信息方塊之較高位元;(S5)將該密文化隨機加密碼與該第二加密後信息方塊進行加法,將結果存回該密文化隨機加密碼;及(S6)將該準加密後信息方塊進行加密運算,得到該加密後信息方塊;依序將各該原始信息方塊加密,直至該原始信息序列加密完成。Please refer to FIGS. 3a and 3b, which are detailed flowcharts of the digital information encryption method according to the preferred embodiment of the present invention. As shown in the figure, the digital information encryption method of the preferred embodiment of the present invention performs encryption according to the following steps: (S1) cutting an original information sequence into a number of original information blocks; (S20) determining whether an encrypted information block exists, and if the result is determined If so, (S21) the encrypted information block is cut into a first encrypted information block and a second encrypted information block. If the determination result is no, (S22) an initial ciphertext plus password is set as the encryption. After the information block, (S21) cutting the encrypted information block into the first encrypted information block and the second encrypted information block; (S30) determining whether a secret culture random encryption password exists, and if the judgment result is yes, (S31) adding the original information block and the first encrypted information block, and adding the password with the secret culture, adding the result bit to a lower bit of the quasi-encrypted information block, if the result is determined If not, (S32) randomly generates the secret culture random encryption code, (S31) adding the original information block and the first encrypted information block, and adding the password with the secret culture, and adding The fruit position is stored in a lower bit of the quasi-encrypted information block; (S4) the second encrypted information block is added to the secret culture random encryption code, and the result bit is stored in the quasi-encrypted information block. (S5) adding the secret culture random encryption code and the second encrypted information block, storing the result back to the secret culture random encryption password; and (S6) encrypting the quasi-encrypted information block, Obtaining the encrypted information block; each of the original information blocks is sequentially encrypted until the original information sequence is encrypted.
請參照第4a及4b圖所示,其係本發明另一較佳實施例之數位信息加密方法細部流程圖。如圖所示,本發明較佳實施例之數位信息加密方法依下列步驟進行加密:(S1)切割一原始信息序列為數原始信息方塊;(S20)判斷一加密後信息方塊是否存在,若判斷結果為是,(S21)將該加密後信息方塊切割為一第一加密後信息方塊及一第二加密後信息方塊,若判斷結果為否,(S22)將一初始密文加密碼設定為該加密後信息方塊,(S21)將該加密後信息方塊切割為該第一加密後信息方塊及該第二加密後信息方塊;(S30)判斷一密文化隨機加密碼是否存在,若判斷結果為是,(S31)將該原始信息方塊與該第一加密後信息方塊進行加法,且與該密文化隨機加密碼進行加法,將結果位存至一準加密後信息方塊之較高位元,若判斷結果為否,(S32)隨機產生該密文化隨機加密碼,(S31)將該原始信息方塊與該第一加密後信息方塊進行加法,且與該密文化隨機加密碼進行加法,將結果位存至一準加密後信息方塊之較高位元;(S4)將該第二加密後信息方塊與該密文化隨機加密碼進行加法,將結果位存至該準加密後信息方塊之較低位元;(S5)將該密文化隨機加密碼與該第二加密後信息方塊進行加法,將結果存回該密文化隨機加密碼;及(S6)將該準加密後信息方塊進行加密運算,得到該加密後信息方塊;依序將各該原始信息方塊加密,直至該原始信息序列加密完成。Please refer to FIGS. 4a and 4b, which are detailed flowcharts of the digital information encryption method according to another preferred embodiment of the present invention. As shown in the figure, the digital information encryption method of the preferred embodiment of the present invention performs encryption according to the following steps: (S1) cutting an original information sequence into a number of original information blocks; (S20) determining whether an encrypted information block exists, and if the result is determined If so, (S21) the encrypted information block is cut into a first encrypted information block and a second encrypted information block. If the determination result is no, (S22) an initial ciphertext plus password is set as the encryption. After the information block, (S21) cutting the encrypted information block into the first encrypted information block and the second encrypted information block; (S30) determining whether a secret culture random encryption password exists, and if the judgment result is yes, (S31) adding the original information block and the first encrypted information block, and adding the password with the secret culture, and storing the result bit to a higher bit of the quasi-encrypted information block, if the judgment result is No, (S32) randomly generating the secret culture random encryption code, (S31) adding the original information block and the first encrypted information block, and adding the password with the secret culture, and adding The fruit position is stored in a higher bit of the quasi-encrypted information block; (S4) adding the second encrypted information block and the secret culture random encryption code, and storing the result bit to the lower of the quasi-encrypted information block Bit (S5) adding the secret culture random encryption code and the second encrypted information block, storing the result back to the secret culture random encryption password; and (S6) encrypting the quasi-encrypted information block, Obtaining the encrypted information block; each of the original information blocks is sequentially encrypted until the original information sequence is encrypted.
請繼續參照第5圖所示,其係本發明上述二較佳實施例之數位信息加密方法中該加密後信息方塊之切割流程圖。如圖所示,其中,將該加密後信息方塊切割為該第一加 密後信息方塊及該第二加密後信息方塊,包含兩種切割方式:其一,(S211)將該加密後信息方塊之較低位元段資料切割為該第一加密後信息方塊,且將該加密後信息方塊之較高位元段資料切割為該第二加密後信息方塊;其二,(S212)將該加密後信息方塊之較高位元段資料切割為該第一加密後信息方塊,且將該加密後信息方塊之較低位元段資料切割為該第二加密後信息方塊。Please refer to FIG. 5, which is a flowchart of cutting the encrypted information block in the digital information encryption method according to the above two preferred embodiments of the present invention. As shown in the figure, wherein the encrypted information block is cut into the first plus The secret information block and the second encrypted information block include two cutting methods: first, (S211) cutting the lower bit segment data of the encrypted information block into the first encrypted information block, and The higher bit segment data of the encrypted information block is cut into the second encrypted information block; second, (S212) the higher bit segment data of the encrypted information block is cut into the first encrypted information block, and The lower byte segment data of the encrypted information block is cut into the second encrypted information block.
據此,使用者可以自由地選擇高位元或低位元的切割方式,切割一加密後信息方塊以進行下一次加密,且自由地選擇高位元或低位元的儲存方式,儲存一準加密後信息方塊,以加密成該加密後信息方塊。According to this, the user can freely select the cutting mode of the high or low bit, cut an encrypted information block for the next encryption, and freely select the storage mode of the high or low bit, and store a quasi-encrypted information block. To encrypt into the encrypted information block.
為讓本領域中具有通常知識者能夠更明白本發明之優點並能據以實施,以下分別依據上述二較佳實施例,列舉本發明較佳實施例之數實施方式,並配合所附圖式,作詳細說明:In order to enable those skilled in the art to better understand the advantages of the present invention and to implement the same, the embodiments of the preferred embodiments of the present invention are exemplified below with reference to the accompanying drawings. For detailed explanation:
請參照第6圖所示,在本發明第一實施例之數位信息加密方法中,為了加密一原始信息序列M ,參照上述S1步驟,本方法較佳首先切割該信息序列M 成為數個原始信息方塊M t ,t是自然數,假定N是該原始信息序列切割後之最大方塊數,以下依序舉例一原始信息方塊M 1 、一原始信息方塊M 2 、...至一原始信息方塊M N 之加密過程。Referring to FIG. 6, in the digital information encryption method according to the first embodiment of the present invention, in order to encrypt an original information sequence M , referring to the above step S1, the method preferably first cuts the information sequence M into a plurality of original information. The block M t , t is a natural number, assuming N is the maximum number of squares after the original information sequence is cut, and the following is an example of an original information block M 1 , an original information block M 2 , ... to an original information block M N encryption process.
在初始狀態,欲加密原始信息方塊M 1 時,因本發明較佳實施例之數位信息加密方法尚未執行,因此尚未存在一加密後信息方塊C 0 。參照上述S20步驟,判斷該加密後信 息方塊C 0 不存在,因此,參照上述S22步驟,隨機產生該初始密文加密碼C 0 ’。每一原始信息方塊M t 的長度可為2i 位元,則該初始密文加密碼C 0 ’長度是2i+1 位元,i是自然數。In the initial state, when the original information block M 1 is to be encrypted, the digital information encryption method according to the preferred embodiment of the present invention has not been executed, so that an encrypted information block C 0 does not yet exist. Referring to the above step S20, it is judged that the encrypted information block C 0 does not exist. Therefore, the initial ciphertext plus password C 0 ' is randomly generated by referring to the above step S22. The length of each original information block M t may be 2 i bits, and the initial ciphertext plus password C 0 ' is 2 i+1 bits, and i is a natural number.
將該初始密文加密碼C 0 ’設定為該加密後信息方塊C 0 ,參照上述S21步驟,,該加密後信息方塊C 0 可切割為一第一加密後信息方塊及一第二加密後信息方塊。The initial ciphertext plus password C 0 ' is set to the encrypted information block C 0 . Referring to the above step S21, the encrypted information block C 0 can be cut into a first encrypted information block. And a second encrypted information block .
又因在初始狀態,欲加密原始信息方塊M 1 時,因本發明較佳實施例之數位信息加密方法尚未初次執行完畢,一密文化隨機加密碼R0 亦不存在,參照上述S30步驟,判斷該密文化隨機加密碼R0 不存在,因此,參照上述S32步驟,隨機產生該密文化隨機加密碼R0 。該密文化隨機加密碼R0 長度是2i 位元。Because in the initial state block to be encrypted original information M 1, the digital information encrypted by the method of Example of preferred embodiments of the present invention has not been performed for the first time is completed, a dense culture encrypted random nor R 0 is present, referring to the step S30, it is determined The secret culture random encryption code R 0 does not exist. Therefore, referring to the above step S32, the secret culture random encryption code R 0 is randomly generated. The secret culture random encryption code R 0 length is 2 i bits.
參照上述S31步驟,該原始信息方塊M 1
先與該第一加密後信息方塊進行模數為2之加法,然後再與該密文化隨機加密碼R0
進行模數為2之加法,將結果存至一準加密後信息方塊C 0
”之至較低位元。參照上述S4步驟,而第二加密後信息方塊與該密文化隨機加密碼R0
進行模數為2加法和,之後進行2進位乘法乘上2i
,將結果位移至高位元後,存入該準加密後信息方塊C 0
”之至較高位元。將上述資料進行2i+1
位元之加密運算E k
[],即可得到一加密後信息方塊C 1
,如式(11):
同樣地,完成該第一原始信息方塊M 1 之加密後,可接著加密原始信息方塊M 2 。Similarly, after the encryption of the first original information block M 1 is completed, the original information block M 2 can be encrypted.
參照上述S21步驟,該加密後信息方塊C 0
切割為第一加密後信息方塊及第二加密後信息方塊。參照上述S31步驟,原始信息方塊M 2
先與第一加密後信息方塊進行模數為2之加法,然後再與密文化隨機加密碼R1
進行模數為2之加法,將結果存至準加密後信息方塊C 1
”之至較低位元。參照上述S4步驟,第二加密後信息方塊則與密文化隨機加密碼R1
進行模數為2加法和,之後進行2進位乘法乘上2i
,將結果位移至高位元後,存入該準加密後信息方塊C 1
”之至較高位元。參照上述S5步驟,將上述資料進行2i+1
位元之加密運算E k
[],即可得到加密後信息方塊C 2
,如式(12):
參照上述S1至S6步驟,依此類推,原始信息方塊M N
先與第一加密後信息方塊進行模數為2之加法,然後再與密文化隨機加密碼RN-1
進行模數為2之加法,將結果
存至準加密後信息方塊C N-1
”之至較低位元。而第二加密後信息方塊則與密文化隨機加密碼RN-1
進行模數為2加法和,之後進行2進位乘法乘上2i
,將結果位移至高位元後,存入該準加密後信息方塊C N-1
”之至較高位元。將上述資料進行2i+1
位元之加密運算E k
[],即可得到加密後信息方塊C N
,方程式如公式(14):
藉此,欲由該加密後信息方塊C N 解出該原始信息方塊M 0 ,以得到完整的該原始信息序列M ,則解密端需要完整地接收到該加密後信息方塊C N 至該加密後信息方塊C 1 ,且必須得知加密後信息方塊C 0 及密文化隨機加密碼R0 ,相較習用數位信息加密方法,本實施例之數位信息加密方法大幅提高威脅抵抗能力。Thereby, the original information block M 0 is to be solved by the encrypted information block C N to obtain the complete original information sequence M , and the decryption end needs to completely receive the encrypted information block C N to the encrypted The information block C 1 and the encrypted information block C 0 and the secret culture random encryption code R 0 must be known. Compared with the conventional digital information encryption method, the digital information encryption method of the embodiment greatly improves the threat resistance.
當然,使用者可以自由地選擇高位元或低位元的切割方式,切割一加密後信息方塊以進行下一次加密,且自由地選擇高位元或低位元的儲存方式,儲存一準加密後信息方塊,以加密成該加密後信息方塊。請續參照以下實施例。Of course, the user can freely select the cutting mode of the high or low bit, cut an encrypted information block for the next encryption, and freely select the storage mode of the high or low bit, and store a quasi-encrypted information block. Encrypted into the encrypted information block. Please continue to refer to the following examples.
請參照第7圖所示,在本發明第二實施例之數位信息 加密方法中,為了加密一原始信息序列M ,參照上述S1步驟,本方法較佳首先切割該信息序列M 成為數個原始信息方塊M t ,t是自然數,假定N是該原始信息序列切割後之最大方塊數,以下依序舉例一原始信息方塊M 1 、一原始信息方塊M 2 、...至一原始信息方塊M N 之加密過程。Referring to FIG. 7, in the digital information encryption method according to the second embodiment of the present invention, in order to encrypt an original information sequence M , referring to the above step S1, the method preferably first cuts the information sequence M into a plurality of original information. The block M t , t is a natural number, assuming N is the maximum number of squares after the original information sequence is cut, and the following is an example of an original information block M 1 , an original information block M 2 , ... to an original information block M N encryption process.
在初始狀態,欲加密原始信息方塊M 1 時,因本發明較佳實施例之數位信息加密方法尚未執行,因此尚未存在一加密後信息方塊C 0 。參照上述S20步驟,判斷該加密後信息方塊C 0 不存在,因此,參照上述S22步驟,,隨機產生該初始密文加密碼C 0 ’。每一原始信息方塊M t 的長度可為2i 位元,則該初始密文加密碼C 0 ’長度是2i+1 位元,i是自然數。In the initial state, when the original information block M 1 is to be encrypted, the digital information encryption method according to the preferred embodiment of the present invention has not been executed, so that an encrypted information block C 0 does not yet exist. Referring to the above step S20, it is judged that the encrypted information block C 0 does not exist. Therefore, referring to the above step S22, the initial ciphertext plus password C 0 ' is randomly generated. The length of each original information block M t may be 2 i bits, and the initial ciphertext plus password C 0 ' is 2 i+1 bits, and i is a natural number.
將該初始密文加密碼C 0 ’設定為該加密後信息方塊C 0 ,參照上述S21步驟,,該加密後信息方塊C 0 可切割為一第一加密後信息方塊及一第二加密後信息方塊。The initial ciphertext plus password C 0 ' is set to the encrypted information block C 0 . Referring to the above step S21, the encrypted information block C 0 can be cut into a first encrypted information block. And a second encrypted information block .
又因在初始狀態,欲加密原始信息方塊M 1 時,因本發明較佳實施例之數位信息加密方法尚未初次執行完畢,一密文化隨機加密碼R0 亦不存在,參照上述S30步驟,判斷該密文化隨機加密碼R0 不存在,因此,參照上述S32步驟,隨機產生該密文化隨機加密碼R0 。該密文化隨機加密碼R0 長度是2i 位元。Because in the initial state block to be encrypted original information M 1, the digital information encrypted by the method of Example of preferred embodiments of the present invention has not been performed for the first time is completed, a dense culture encrypted random nor R 0 is present, referring to the step S30, it is determined The secret culture random encryption code R 0 does not exist. Therefore, referring to the above step S32, the secret culture random encryption code R 0 is randomly generated. The secret culture random encryption code R 0 length is 2 i bits.
參照上述S31步驟,該原始信息方塊M 1
先與該第一加密後信息方塊進行模數為2之加法,然後再與該密文化隨機加密碼R0
進行模數為2之加法,將結果存至一準加密後信息方塊C 0
”之至較低位元。參照上述S4步驟,而第二
加密後信息方塊與該密文化隨機加密碼R0
進行模數為2加法和,之後進行2進位乘法乘上2i
,將結果位移至高位元後,存入該準加密後信息方塊C 0
”之至較高位元。將上述資料進行2i+1
位元之加密運算E k
[],即可得到一加密後信息方塊C 1
,如式(21):
同樣地,完成該第一原始信息方塊M 1 之加密後,可接著加密原始信息方塊M 2 。Similarly, after the encryption of the first original information block M 1 is completed, the original information block M 2 can be encrypted.
參照上述S21步驟,該加密後信息方塊C 0
切割為第一加密後信息方塊及第二加密後信息方塊。參照上述S31步驟,原始信息方塊M 2
先與第一加密後信息方塊進行模數為2之加法,然後再與密文化隨機加密碼R1
進行模數為2之加法,將結果存至準加密後信息方塊C 1
”之至較低位元。參照上述S4步驟,第二加密後信息方塊則與密文化隨機加密碼R1
進行模數為2加法和,之後進行2進位乘法乘上2i
,將結果位移至高位元後,存入該準加密後信息方塊C 1
”之至較高位元。參照上述S5步驟,將上述資料進行2i+1
位元之加密運算E k
[],即可得到加密後信息方塊C 2
,如式(22):
參照上述S1至S6步驟,依此類推,原始信息方塊M N
先與第一加密後信息方塊進行模數為2之加法,然後再與密文化隨機加密碼RN-1
進行模數為2之加法,將結果存至準加密後信息方塊C N-1
”之至較低位元。而第二加密後信息方塊則與密文化隨機加密碼RN-1
進行模數為2加法和,之後進行2進位乘法乘上2i
,將結果位移至高位元後,存入該準加密後信息方塊C N-1
”之至較高位元。將上述資料進行2i+1
位元之加密運算E k
[],即可得到加密後信息方塊C N
,方程式如公式(24):
因此,依本發明較佳實施例所述之數位信息加密方法,其中將該加密後信息方塊切割為該第一加密後信息方塊及該第二加密後信息方塊包含將該加密後信息方塊之較高位元段資料切割為該第一加密後信息方塊,且將該加密後信息方塊之較低位元段資料切割為該第二加密後信息方塊 。Therefore, the digital information encryption method according to the preferred embodiment of the present invention, wherein the encrypted information block is cut into the first encrypted information block and the second encrypted information block includes the encrypted information block. The high-order segment data is cut into the first encrypted information block, and the lower-order segment data of the encrypted information block is cut into the second encrypted information block. .
因此,依本發明較佳實施例所述之數位信息加密方法,其中將該加密後信息方塊切割為該第一加密後信息方塊及該第二加密後信息方塊包含將該加密後信息方塊之較低位元段資料切割為該第一加密後信息方塊,且將該加密後信息方塊之較高位元段資料切割為該第二加密後信息方塊。Therefore, the digital information encryption method according to the preferred embodiment of the present invention, wherein the encrypted information block is cut into the first encrypted information block and the second encrypted information block includes the encrypted information block. The low-order segment data is cut into the first encrypted information block, and the higher-order segment data of the encrypted information block is cut into the second encrypted information block.
當然,使用者可以自由地選擇高位元或低位元的切割方式,切割一加密後信息方塊以進行下一次加密,且自由地選擇高位元或低位元的儲存方式,儲存一準加密後信息方塊,以加密成該加密後信息方塊。有關討論自由地選擇高位元或低位元的儲存方式,儲存一準加密後信息方塊請續參照以下實施例。Of course, the user can freely select the cutting mode of the high or low bit, cut an encrypted information block for the next encryption, and freely select the storage mode of the high or low bit, and store a quasi-encrypted information block. Encrypted into the encrypted information block. For a discussion of the free choice of high-order or low-order storage, store a quasi-encrypted information block. Continue to refer to the following examples.
請參照第8圖所示,在本發明第三實施例之數位信息加密方法中,為了加密一原始信息序列M ,參照上述S1步驟,本方法較佳首先切割該信息序列M 成為數個原始信息方塊M t ,t是自然數,假定N是該原始信息序列切割後之最大方塊數,以下依序舉例一原始信息方塊M 1 、一原始信息方塊M 2 、...至一原始信息方塊M N 之加密過程。Referring to FIG. 8, in the digital information encryption method according to the third embodiment of the present invention, in order to encrypt an original information sequence M , referring to the above step S1, the method preferably first cuts the information sequence M into a plurality of original information. The block M t , t is a natural number, assuming N is the maximum number of squares after the original information sequence is cut, and the following is an example of an original information block M 1 , an original information block M 2 , ... to an original information block M N encryption process.
在初始狀態,欲加密原始信息方塊M 1 時,因本發明較佳實施例之數位信息加密方法尚未執行,因此尚未存在一加密後信息方塊C 0 。參照上述S20步驟,判斷該加密後信息方塊C 0 不存在,因此,參照上述S22步驟,,隨機產生該初始密文加密碼C 0 ’。每一原始信息方塊M t 的長度可為 2i 位元,則該初始密文加密碼C 0 ’長度是2i+1 位元,i是自然數。In the initial state, when the original information block M 1 is to be encrypted, the digital information encryption method according to the preferred embodiment of the present invention has not been executed, so that an encrypted information block C 0 does not yet exist. Referring to the above step S20, it is judged that the encrypted information block C 0 does not exist. Therefore, referring to the above step S22, the initial ciphertext plus password C 0 ' is randomly generated. The length of each original information block M t may be 2 i bits, and the initial ciphertext plus password C 0 ' is 2 i+1 bits, and i is a natural number.
將該初始密文加密碼C 0 ’設定為該加密後信息方塊C 0 ,參照上述S21步驟,,該加密後信息方塊C 0 可切割為一第一加密後信息方塊及一第二加密後信息方塊。The initial ciphertext plus password C 0 ' is set to the encrypted information block C 0 . Referring to the above step S21, the encrypted information block C 0 can be cut into a first encrypted information block. And a second encrypted information block .
又因在初始狀態,欲加密原始信息方塊M 1 時,因本發明較佳實施例之數位信息加密方法尚未初次執行完畢,一密文化隨機加密碼R0 亦不存在,參照上述S30步驟,判斷該密文化隨機加密碼R0 不存在,因此,參照上述S32步驟,隨機產生該密文化隨機加密碼R0 。該密文化隨機加密碼R0 長度是2i 位元。Because in the initial state block to be encrypted original information M 1, the digital information encrypted by the method of Example of preferred embodiments of the present invention has not been performed for the first time is completed, a dense culture encrypted random nor R 0 is present, referring to the step S30, it is determined The secret culture random encryption code R 0 does not exist. Therefore, referring to the above step S32, the secret culture random encryption code R 0 is randomly generated. The secret culture random encryption code R 0 length is 2 i bits.
參照上述S31步驟,該原始信息方塊M 1
先與該第一加密後信息方塊進行模數為2之加法,再與該密文化隨機加密碼R0
進行模數為2之加法,之後進行2進位乘法乘上2i
,將結果位移至高位元後,將結果存至一準加密後信息方塊C 0
”之至較高位元。參照上述S4步驟,而第二加密後信息方塊與該密文化隨機加密碼R0
進行模數為2加法和,結果存入該準加密後信息方塊C 0
”之至較低位元。將上述資料進行2i+1
位元之加密運算E k
[],即可得到一加密後信息方塊C 1
,如式(31):
同樣地,完成該第一原始信息方塊M 1 之加密後,可接著加密原始信息方塊M 2 。Similarly, after the encryption of the first original information block M 1 is completed, the original information block M 2 can be encrypted.
參照上述S21步驟,該加密後信息方塊C 0
切割為第一加密後信息方塊及第二加密後信息方塊。參照上述S31步驟,原始信息方塊M 2
先與第一加密後信息方塊進行模數為2之加法,再與密文化隨機加密碼R1
進行模數為2之加法之後進行2進位乘法乘上2i
,將結果位移至高位元後,,將結果存至準加密後信息方塊C 1
”之至較高位元。參照上述S4步驟,第二加密後信息方塊則與密文化隨機加密碼R1
進行模數為2加法和,結果存入該準加密後信息方塊C 1
”之至較低位元。參照上述S5步驟,將上述資料進行2i+1
位元之加密運算E k
[],即可得到加密後信息方塊C 2
,如式(32):
參照上述S1至S6步驟,依此類推,原始信息方塊M N
先與第一加密後信息方塊進行模數為2之加法,再與密文化隨機加密碼RN-1
進行模數為2之加法,之後進行2進位乘法乘上2i
,將結果位移至高位元後,將結果存至準加密後信息方塊C N-1
”之至較高位元。而第二加密後信息方
塊則與密文化隨機加密碼RN-1
進行模數為2加法和,將結果存入該準加密後信息方塊C N-1
”之至較低位元。將上述資料進行2i+1
位元之加密運算E k
[],即可得到加密後信息方塊C N
,方程式如公式(34):
請參照第9圖所示,在本發明第四實施例之數位信息加密方法中,為了加密一原始信息序列M ,參照上述S1步驟,本方法較佳首先切割該信息序列M 成為數個原始信息方塊M t ,t是自然數,假定N是該原始信息序列切割後之最大方塊數,以下依序舉例一原始信息方塊M 1 、一原始信息方塊M 2 、...至一原始信息方塊M N 之加密過程。Referring to FIG. 9, in the digital information encryption method according to the fourth embodiment of the present invention, in order to encrypt an original information sequence M , referring to the above step S1, the method preferably first cuts the information sequence M into a plurality of original information. The block M t , t is a natural number, assuming N is the maximum number of squares after the original information sequence is cut, and the following is an example of an original information block M 1 , an original information block M 2 , ... to an original information block M N encryption process.
在初始狀態,欲加密原始信息方塊M 1 時,因本發明較佳實施例之數位信息加密方法尚未執行,因此尚未存在一加密後信息方塊C 0 。參照上述S20步驟,判斷該加密後信息方塊C 0 不存在,因此,參照上述S22步驟,,隨機產生該初始密文加密碼C 0 ’。每一原始信息方塊M t 的長度可為2i 位元,則該初始密文加密碼C 0 ’長度是2i+1 位元,i是自然數。In the initial state, when the original information block M 1 is to be encrypted, the digital information encryption method according to the preferred embodiment of the present invention has not been executed, so that an encrypted information block C 0 does not yet exist. Referring to the above step S20, it is judged that the encrypted information block C 0 does not exist. Therefore, referring to the above step S22, the initial ciphertext plus password C 0 ' is randomly generated. The length of each original information block M t may be 2 i bits, and the initial ciphertext plus password C 0 ' is 2 i+1 bits, and i is a natural number.
將該初始密文加密碼C 0 ’設定為該加密後信息方塊C 0 ,參照上述S21步驟,,該加密後信息方塊C 0 可切割為一第一加密後信息方塊及一第二加密後信息方塊。The initial ciphertext plus password C 0 ' is set to the encrypted information block C 0 . Referring to the above step S21, the encrypted information block C 0 can be cut into a first encrypted information block. And a second encrypted information block .
又因在初始狀態,欲加密原始信息方塊M 1 時,因本發明較佳實施例之數位信息加密方法尚未初次執行完畢,一密文化隨機加密碼R0 亦不存在,參照上述S30步驟,判斷該密文化隨機加密碼R0 不存在,因此,參照上述S32步驟,隨機產生該密文化隨機加密碼R0 。該密文化隨機加密碼R0 長度是2i 位元。Because in the initial state block to be encrypted original information M 1, the digital information encrypted by the method of Example of preferred embodiments of the present invention has not been performed for the first time is completed, a dense culture encrypted random nor R 0 is present, referring to the step S30, it is determined The secret culture random encryption code R 0 does not exist. Therefore, referring to the above step S32, the secret culture random encryption code R 0 is randomly generated. The secret culture random encryption code R 0 length is 2 i bits.
參照上述S31步驟,該原始信息方塊M 1
先與該第一加密後信息方塊進行模數為2之加法,再與該密文化隨機加密碼R0
進行模數為2之加法,之後進行2進位乘法乘上2i
,將結果位移至高位元後,將結果存至一準加密後信息方塊C 0
”之至較高位元。參照上述S4步驟,而第二加密後信息方塊與該密文化隨機加密碼R0
進行模數為2加法和,結果存入該準加密後信息方塊C 0
”之至較低位元。將上述資料進行2i+1
位元之加密運算E k
[],即可得到一加密後信息方塊C 1
,如式(41):
同樣地,完成該第一原始信息方塊M 1 之加密後,可接著加密原始信息方塊M 2 。Similarly, after the encryption of the first original information block M 1 is completed, the original information block M 2 can be encrypted.
參照上述S21步驟,該加密後信息方塊C 0
切割為第一
加密後信息方塊及第二加密後信息方塊。參照上述S31步驟,原始信息方塊M 2
先與第一加密後信息方塊進行模數為2之加法,再與密文化隨機加密碼R1
進行模數為2之加法之後進行2進位乘法乘上2i
,將結果位移至高位元後,,將結果存至準加密後信息方塊C 1
”之至較高位元。參照上述S4步驟,第二加密後信息方塊則與密文化隨機加密碼R1
進行模數為2加法和,結果存入該準加密後信息方塊C 1
”之至較低位元。參照上述S5步驟,將上述資料進行2i+1
位元之加密運算E k
[],即可得到加密後信息方塊C 2
,如式(42):
參照上述S1至S6步驟,依此類推,原始信息方塊M N
先與第一加密後信息方塊進行模數為2之加法,再與密文化隨機加密碼RN-1
進行模數為2之加法,之後進行2進位乘法乘上2i
,將結果位移至高位元後,將結果存至準加密後信息方塊C N-1
”之至較高位元。而第二加密後信息方塊則與密文化隨機加密碼RN-1
進行模數為2加法和,將結果存入該準加密後信息方塊C N-1
”之至較低位元。將上述資料進行2i+1
位元之加密運算E k
[],即可得到加密後信息方
塊C N
,方程式如公式(44):
此外,在數位信息長度較短的情形中,本發明實施例之數位信息加密方法可更為簡略。In addition, in the case where the length of the digital information is short, the digital information encryption method of the embodiment of the present invention can be more simplified.
請參照第10a及10b圖所示,本發明再一實施例之數位信息加密方法依下列步驟進行加密:判斷一加密後信息方塊是否存在,若判斷結果為是,將該加密後信息方塊切割為一第一加密後信息方塊及一第二加密後信息方塊,若判斷結果為否,將一初始密文加密碼設定為該加密後信息方塊,將該加密後信息方塊切割為該第一加密後信息方塊及該第二加密後信息方塊;判斷一密文化隨機加密碼是否存在,若判斷結果為是,將該原始信息方塊與該第一加密後信息方塊進行加法,且與該密文化隨機加密碼進行加法,將結果位存至一準加密後信息方塊之較低位元,若判斷結果為否,隨機產生該密文化隨機加密碼,將該原始信息方塊與該第一加密後信息方塊進行加法,且與該密文化隨機加密碼進行加法,將結果位存至一準加密後信息方塊之較低位元;將該第二加密後信息方塊與該密文化隨機加密碼進行加法,將結果位存至該準加密後信息方塊之較高位 元;將該密文化隨機加密碼與該第二加密後信息方塊進行加法,將結果存回該密文化隨機加密碼;及將該準加密後信息方塊進行加密運算,得到該加密後信息方塊。Referring to FIG. 10a and FIG. 10b, the digital information encryption method according to another embodiment of the present invention performs encryption according to the following steps: determining whether an encrypted information block exists, and if the determination result is yes, cutting the encrypted information block into a first encrypted information block and a second encrypted information block. If the determination result is no, an initial ciphertext plus password is set as the encrypted information block, and the encrypted information block is cut into the first encrypted content. The information block and the second encrypted information block; determining whether a secret culture random encryption password exists, and if the judgment result is yes, adding the original information block and the first encrypted information block, and randomly adding the secret culture block The password is added, and the result bit is stored in a lower bit of the quasi-encrypted information block. If the judgment result is no, the secret culture random encryption code is randomly generated, and the original information block is performed with the first encrypted information block. Adding, and adding the password with the secret culture, adding the result bit to the lower bit of the quasi-encrypted information block; after the second encryption An addition to the block information encrypted random culture encrypted, the result of the bit memory to the higher-bit encrypted registration information of block And adding the password to the second encrypted information block, storing the result back to the secret culture and adding the password; and encrypting the quasi-encrypted information block to obtain the encrypted information block.
請參照第11a及11b圖所示,本發明又一實施例之數位信息加密方法依下列步驟進行加密:判斷一加密後信息方塊是否存在,若判斷結果為是,將該加密後信息方塊切割為一第一加密後信息方塊及一第二加密後信息方塊,若判斷結果為否,將一初始密文加密碼設定為該加密後信息方塊,將該加密後信息方塊切割為該第一加密後信息方塊及該第二加密後信息方塊;判斷一密文化隨機加密碼是否存在,若判斷結果為是,將該原始信息方塊與該第一加密後信息方塊進行加法,且與該密文化隨機加密碼進行加法,將結果位存至一準加密後信息方塊之較高位元,若判斷結果為否,隨機產生該密文化隨機加密碼,將該原始信息方塊與該第一加密後信息方塊進行加法,且與該密文化隨機加密碼進行加法,將結果位存至一準加密後信息方塊之較高位元;將該第二加密後信息方塊與該密文化隨機加密碼進行加法,將結果位存至該準加密後信息方塊之較低位元;將該密文化隨機加密碼與該第二加密後信息方塊進行加法,將結果存回該密文化隨機加密碼;及將該準加密後信息方塊進行加密運算,得到該加密後信息方塊。Referring to FIG. 11a and FIG. 11b, the digital information encryption method according to another embodiment of the present invention performs encryption according to the following steps: determining whether an encrypted information block exists. If the determination result is yes, the encrypted information block is cut into a first encrypted information block and a second encrypted information block. If the determination result is no, an initial ciphertext plus password is set as the encrypted information block, and the encrypted information block is cut into the first encrypted content. The information block and the second encrypted information block; determining whether a secret culture random encryption password exists, and if the judgment result is yes, adding the original information block and the first encrypted information block, and randomly adding the secret culture block The password is added, and the result bit is stored in a higher bit of the quasi-encrypted information block. If the judgment result is no, the secret culture random encryption code is randomly generated, and the original information block is added to the first encrypted information block. And adding the password with the secret culture to add the result bit to the higher bit of the quasi-encrypted information block; after the second encryption The interest block is added with the secret culture random encryption code, and the result bit is stored in the lower bit of the quasi-encrypted information block; the secret culture random encryption code is added to the second encrypted information block, and the result is saved. Returning the secret culture to the random password; and encrypting the quasi-encrypted information block to obtain the encrypted information block.
此外,該該初始密文加密碼C 0 ’亦可選擇為預先設定值,藉由預先設定該初始密文加密碼C 0 ’之數值,接收端可藉此辨識傳送端。In addition, the initial ciphertext plus password C 0 ′ may also be selected as a preset value, and the receiving end may identify the transmitting end by setting the value of the initial ciphertext plus password C 0 ′ in advance.
因此,依本發明較佳實施例所述之數位信息加密方法,其中將一初始密文加密碼設定為該加密後信息方塊包含將一隨機產生之初始密文加密碼設定為該加密後信息方塊。Therefore, in the digital information encryption method according to the preferred embodiment of the present invention, wherein an initial ciphertext plus password is set to the encrypted information block, the randomly generated initial ciphertext plus password is set as the encrypted information block. .
因此,依本發明較佳實施例所述之數位信息加密方法,其中將一初始密文加密碼設定為該加密後信息方塊包含將一預先設定之初始密文加密碼設定為該加密後信息方塊。Therefore, in the digital information encryption method according to the preferred embodiment of the present invention, an initial ciphertext plus password is set to the encrypted information block, and a preset initial ciphertext plus password is set as the encrypted information block. .
藉由以自由地選擇高位元或低位元的切割方式,切割一加密後信息方塊以進行下一次加密,且自由地選擇高位元或低位元的儲存方式,儲存一準加密後信息方塊,以加密成該加密後信息方塊,本發明提供使用者餘裕地操作自由度,且可強化數位信息加密方法之破解抵抗能力。By cutting the encrypted information block for the next encryption by freely selecting the high or low bit cutting mode, and freely selecting the storage mode of the high or low bit, storing a quasi-encrypted information block to encrypt In the encrypted information block, the present invention provides the user with a degree of freedom of operation, and can enhance the crack resistance of the digital information encryption method.
雖然本發明已利用上述較佳實施例揭示,然其並非用以限定本發明,任何熟習此技藝者在不脫離本發明之精神和範圍之內,相對上述實施例進行各種更動與修改仍屬本發明所保護之技術範疇,因此本發明之保護範圍當視後附之申請專利範圍所界定者為準。While the invention has been described in connection with the preferred embodiments described above, it is not intended to limit the scope of the invention. The technical scope of the invention is protected, and therefore the scope of the invention is defined by the scope of the appended claims.
M ‧‧‧原始信息序列 M ‧‧‧Original information sequence
M t 、M 1 、M 2 …M N ‧‧‧原始信息方塊 M t , M 1 , M 2 ... M N ‧‧‧ original information box
C 0 ’‧‧‧初始密文加密碼 C 0 '‧‧‧Initial ciphertext plus password
C 0 、C 1 、C 2 …C N ‧‧‧加密後信息方塊 C 0 , C 1 , C 2 ... C N ‧‧‧ Encrypted information block
C 0 ”、C 1 ”…C N-1 ”‧‧‧準加密後信息方塊 C 0 ”, C 1 ”... C N-1 ”‧‧ ‧Quasi-encrypted information block
、…‧‧‧第一加密後信息方塊 , ... ‧‧‧First encrypted information block
、…‧‧‧第二加密後信息方塊 , ... ‧‧‧Second encrypted information block
R0 、R1 …RN-1 ‧‧‧密文化隨機加密碼R 0 , R 1 ... R N-1 ‧‧ ‧ secret culture random password
第1a圖:本發明較佳實施例之數位信息加密方法流程圖。Figure 1a is a flow chart of a digital information encryption method in accordance with a preferred embodiment of the present invention.
第1b圖:本發明較佳實施例之數位信息加密方法流程圖。Figure 1b is a flow chart of a digital information encryption method in accordance with a preferred embodiment of the present invention.
第2a圖:本發明另一較佳實施例之數位信息加密方法流程圖。Figure 2a is a flow chart of a digital information encryption method in accordance with another preferred embodiment of the present invention.
第2b圖:本發明另一較佳實施例之數位信息加密方法流程圖。Figure 2b is a flow chart of a digital information encryption method in accordance with another preferred embodiment of the present invention.
第3a圖:本發明較佳實施例之數位信息加密方法細部流程圖。Figure 3a is a detailed flow chart of the digital information encryption method in accordance with a preferred embodiment of the present invention.
第3b圖:本發明較佳實施例之數位信息加密方法細部流程圖。Figure 3b is a detailed flow chart of the digital information encryption method in accordance with a preferred embodiment of the present invention.
第4a圖:本發明另一較佳實施例之數位信息加密方法細部流程圖。Figure 4a is a detailed flow chart of a digital information encryption method in accordance with another preferred embodiment of the present invention.
第4b圖:本發明另一較佳實施例之數位信息加密方法細部流程圖。Figure 4b is a detailed flow chart of the digital information encryption method in accordance with another preferred embodiment of the present invention.
第5圖:本發明較佳實施例之數位信息加密方法中加密後信息方塊之切割流程圖。Figure 5 is a flow chart showing the cutting of the encrypted information block in the digital information encryption method of the preferred embodiment of the present invention.
第6圖:本發明第一實施例之數位信息加密方法演算流程圖。Figure 6 is a flow chart showing the calculation of the digital information encryption method in the first embodiment of the present invention.
第7圖:本發明第二實施例之數位信息加密方法演算流程圖。Figure 7 is a flow chart showing the calculation of the digital information encryption method in the second embodiment of the present invention.
第8圖:本發明第三實施例之數位信息加密方法演算流 程圖。Figure 8 is a flow chart of the digital information encryption method of the third embodiment of the present invention Cheng Tu.
第9圖:本發明第四實施例之數位信息加密方法演算流程圖。Figure 9 is a flow chart showing the calculation of the digital information encryption method in the fourth embodiment of the present invention.
第10a圖:本發明再一實施例之數位信息加密方法流程圖。Figure 10a is a flow chart of a method for encrypting digital information according to still another embodiment of the present invention.
第10b圖:本發明再一實施例之數位信息加密方法流程圖。Figure 10b is a flow chart of a digital information encryption method according to still another embodiment of the present invention.
第11a圖:本發明又一實施例之數位信息加密方法流程圖。Figure 11a is a flow chart of a method for encrypting digital information according to still another embodiment of the present invention.
第11b圖:本發明又一實施例之數位信息加密方法流程圖。Figure 11b is a flow chart of a method for encrypting digital information according to still another embodiment of the present invention.
Claims (20)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW98132531A TWI397300B (en) | 2009-09-25 | 2009-09-25 | Digital information encryption method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW98132531A TWI397300B (en) | 2009-09-25 | 2009-09-25 | Digital information encryption method |
Publications (2)
Publication Number | Publication Date |
---|---|
TW201112717A TW201112717A (en) | 2011-04-01 |
TWI397300B true TWI397300B (en) | 2013-05-21 |
Family
ID=44909344
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW98132531A TWI397300B (en) | 2009-09-25 | 2009-09-25 | Digital information encryption method |
Country Status (1)
Country | Link |
---|---|
TW (1) | TWI397300B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TW200635317A (en) * | 2005-03-25 | 2006-10-01 | Via Tech Inc | Apparatus and method for employing cyrptographic functions to generate a message digest |
TW200816768A (en) * | 2006-09-21 | 2008-04-01 | Interdigital Tech Corp | Group-wise secret key generation |
TW200845689A (en) * | 2007-03-28 | 2008-11-16 | Intel Corp | Flexible architecture and instruction for advanced encryption standard (AES) |
-
2009
- 2009-09-25 TW TW98132531A patent/TWI397300B/en not_active IP Right Cessation
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TW200635317A (en) * | 2005-03-25 | 2006-10-01 | Via Tech Inc | Apparatus and method for employing cyrptographic functions to generate a message digest |
TW200816768A (en) * | 2006-09-21 | 2008-04-01 | Interdigital Tech Corp | Group-wise secret key generation |
TW200845689A (en) * | 2007-03-28 | 2008-11-16 | Intel Corp | Flexible architecture and instruction for advanced encryption standard (AES) |
Also Published As
Publication number | Publication date |
---|---|
TW201112717A (en) | 2011-04-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107925577B (en) | Method and computer readable medium for encryption key generation and management | |
US8744078B2 (en) | System and method for securing multiple data segments having different lengths using pattern keys having multiple different strengths | |
Chandra et al. | Content based double encryption algorithm using symmetric key cryptography | |
KR102397579B1 (en) | Method and apparatus for white-box cryptography for protecting against side channel analysis | |
JP2013047822A (en) | Encryption method for message authentication | |
US8462939B2 (en) | RNS-based cryptographic system and method | |
US9059838B2 (en) | Encryption algorithm with randomized buffer | |
JP2009531728A (en) | Encryption methods for highest security applications | |
Koko et al. | Comparison of Various Encryption Algorithms and Techniques for improving secured data Communication | |
US10892891B2 (en) | System, method, and computer program product for zero round trip secure communications based on two noisy secrets | |
CN114239018A (en) | Method and system for determining number of shared data for protecting privacy data | |
CN106778292B (en) | A kind of quick restoring method of Word encrypted document | |
CN113014380B (en) | File data password management method and device, computer equipment and storage medium | |
US9391770B2 (en) | Method of cryption | |
Olumide et al. | A hybrid encryption model for secure cloud computing | |
Ghosh et al. | A comprehensive analysis between popular symmetric encryption algorithms | |
WO2020044748A1 (en) | Device for configuring id-based hash proof system, id-based encryption device, method for configuring id-based hash proof system, and program | |
JP5511803B2 (en) | Techniques for performing symmetric cryptography | |
JP5992651B2 (en) | ENCRYPTION METHOD, PROGRAM, AND SYSTEM | |
US20150372989A1 (en) | Method for introducing dependence of white-box implementation on a set of strings | |
US20230403134A1 (en) | Method for processing encrypted data | |
TWI397300B (en) | Digital information encryption method | |
US20090110193A1 (en) | Schryption method and device | |
Pushpa | Enhancing Data Security by Adapting Network Security and Cryptographic Paradigms | |
KR101105384B1 (en) | Side channel attack resistant key management method based on the key encryption and shuffling method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
MM4A | Annulment or lapse of patent due to non-payment of fees |