TW201426684A - Digital encryption method by multiple encryption - Google Patents
Digital encryption method by multiple encryption Download PDFInfo
- Publication number
- TW201426684A TW201426684A TW101150379A TW101150379A TW201426684A TW 201426684 A TW201426684 A TW 201426684A TW 101150379 A TW101150379 A TW 101150379A TW 101150379 A TW101150379 A TW 101150379A TW 201426684 A TW201426684 A TW 201426684A
- Authority
- TW
- Taiwan
- Prior art keywords
- value
- encryption
- plaintext
- ciphertext
- range
- Prior art date
Links
Abstract
Description
本發明係關於一種以多次加密進行數字加密之方法,特別是指針對數字加密作設計,可保持明文密文的值域一致。 The invention relates to a method for digital encryption by multiple encryption, in particular, the pointer is designed for digital encryption, and the value range of the plaintext ciphertext can be kept consistent.
現今普遍使用之一般加密法(指非針對數字加密所設計),不論是對稱式或非對稱式,區塊模式或串流模式,由於是處理數位資料,所以均以位元組或位元為單位計算,在處理數位資料,這特性不但可以加快運算速度,也可以正確處理加解密之功能。但運用在數字加解密時,卻反而導致了密文的最大位數會大於明文最大位數情形,這並不適用於要求明密文格式一致的數字加密系統。 The general encryption method commonly used today (designed for non-digital encryption), whether it is symmetric or asymmetric, block mode or streaming mode, because it is processing digital data, it is in the form of a byte or bit Unit calculation, in the processing of digital data, this feature can not only speed up the operation, but also correctly handle the encryption and decryption functions. However, when used in digital encryption and decryption, it causes the maximum number of ciphertexts to be larger than the maximum number of plaintext digits. This does not apply to digital encryption systems that require a consistent ciphertext format.
針對數字加密,Baffe Boyois在stackoverflow論壇提出一方法,目的與此專利一致,均為適用於數字加密,且密文值域與明文值域一致。其做法及技術特性為: For digital encryption, Baffe Boyois proposed a method in the stackoverflow forum, which is consistent with this patent, and is applicable to digital encryption, and the ciphertext value range is consistent with the plaintext range. Its practices and technical characteristics are:
1.做法:針對明文各個單一數字作加密(如:明文10進位值為213,則針對2,1,3各自作加密),並選一密鑰流(keystream)連續一直取出4-bits直至此次4-bit組成的值(10進位)介於0-9之間,則加上明文,並做模運算(底為10),此值即為密文。 1. Practice: Encrypt each single digit in plaintext (for example, if the plaintext 10 carry value is 213, then 2, 1, and 3 are each encrypted), and select a keystream (keystream) to continuously take 4-bits until this The value of the 4-bit component (10-bit) is between 0-9, and the plaintext is added, and the modulo operation is performed (the bottom is 10). This value is the ciphertext.
2.技術特性:透過從密鑰流(keystream)重複選key,直到選出適當的key(值不超過10)並做模運算(底為10),保證解密的正確性及密文值域與明文值域一致。 2. Technical characteristics: by repeatedly selecting the key from the keystream until the appropriate key is selected (the value is not more than 10) and the modulo operation is performed (the bottom is 10) to ensure the correctness of the decryption and the ciphertext value range and the plaintext. The values are consistent.
為此,本申請人有鑒於上述習知加密法,秉持著研究創新、精益求精之精神,利用其專業眼光和專業知識,研究出本創作之以多次加密進行數字加密之方法。 To this end, the applicant has in view of the above-mentioned conventional encryption method, upholds the spirit of research and innovation, and strives for excellence, and uses its professional vision and professional knowledge to study the method of digital encryption using multiple encryptions.
本發明之目的即在於提供一種以多次加密進行數字加密之方法,主要為達到明密文的數字格式(最大值)一致的特性作設計。 The object of the present invention is to provide a method for digital encryption by multiple encryption, which is mainly designed to achieve the uniformity of the digital format (maximum value) of the ciphertext.
本發明之次一目的即在於提供一種以多次加密進行數字加密法之方法,例如確保身分證字號的數字部分在加密後,仍保有九位數數字的特性。 A second object of the present invention is to provide a method for performing digital encryption using multiple encryptions, for example, to ensure that the digital portion of the identity card number retains the characteristics of a nine-digit number after being encrypted.
本發明之再一目的即在於提供一種以多次加密進行數字加密之方法,可以基於現今普遍加密法(非適用於數字)的基礎上,透過多次加密,確保明密文值域一致的特性。 A further object of the present invention is to provide a method for digital encryption by multiple encryption, which can ensure the consistency of the ciphertext value domain through multiple encryptions based on the current universal encryption method (not applicable to digital). .
為達成上述本發明目的之一種以多次加密進行數字加密之方法,並確保最終密文的值域相等於明文值域,可使密文保有與明文相同格式的特性。主要係當明文作加密後,所得到的暫時密文值若大於明文值域(如:明文值域為0-9,暫時密文值若為10則超出明文值域),則此暫時密文值繼續做加密,直到取得暫時密文值落至明文值域(以上例即暫時密文值需為0-9),才將此密文值當作最終密文值,完成加密程序。本發明提供一種以多次加密進行數字加密之方法,其步驟為:步驟1:輸入一明文值;步驟2:該明文值經一一般加密法單元運算後,產生一中間暫時密文值;步驟3:一值域判斷單元,判斷該中間暫時密文值是否介於該明文值之值域範圍內,若該中間暫時密文值不介於該明文值之值域範圍內,則再 重複步驟2,此時該中間暫時密文值視為一明文;步驟4:若該中間暫時密文值介於該明文值之值域範圍內,則將該中間暫時密文值當作一最後密文輸出值。 In order to achieve the above-mentioned object of the present invention, a method of digitally encrypting with multiple encryptions, and ensuring that the value range of the final ciphertext is equal to the plaintext range, the ciphertext can be kept in the same format as the plaintext. Mainly when the plaintext is encrypted, if the obtained temporary ciphertext value is greater than the plaintext value range (for example, if the plaintext value field is 0-9 and the temporary ciphertext value is 10, the plaintext value field is exceeded), then the temporary ciphertext is used. The value continues to be encrypted until the temporary ciphertext value falls to the plaintext value range (in the above example, the temporary ciphertext value needs to be 0-9), and the ciphertext value is regarded as the final ciphertext value to complete the encryption process. The present invention provides a method for digital encryption by multiple encryption, the steps of which are: Step 1: input a plaintext value; Step 2: The plaintext value is calculated by a general encryption method unit to generate an intermediate temporary ciphertext value; 3: A value range determining unit determines whether the intermediate temporary ciphertext value is within a range of the plaintext value, and if the intermediate temporary ciphertext value is not within the range of the plaintext value, then Step 2 is repeated, in which case the intermediate temporary ciphertext value is regarded as a plaintext; Step 4: if the intermediate temporary ciphertext value is within the range of the plaintext value, the intermediate temporary ciphertext value is regarded as a last Ciphertext output value.
有鑑於此,本發明所提供之以多次加密進行數字加密之方法,與其他習用技術相互比較時,更具備下列優點: In view of this, the method for digital encryption by multiple encryption provided by the present invention has the following advantages when compared with other conventional technologies:
1.透過多次加密後,可保持最終密文值域與明文值域一致。即多次加密後,得一密文值,且其值落於明文值域內。此透過多次加密,縮小密文值域,為一非習知之方法。 1. After multiple encryptions, the final ciphertext value range can be kept consistent with the plaintext value field. That is, after multiple encryptions, a ciphertext value is obtained, and its value falls within the plaintext value range. This is a non-practical method of narrowing down the ciphertext value range by multiple encryptions.
2.保證加密所需加密次數是有上限(即可行性)。(所需最多加密次數為中間密文值域內元素個數-明文值域內元素個數+1) 2. There is an upper limit (ie, feasibility) for ensuring the number of encryptions required for encryption. (The maximum number of encryptions required is the number of elements in the middle ciphertext value field - the number of elements in the plain text value field is +1)
為利 貴審查委員了解本發明之技術特徵、內容與優點及其所能達到之功效,茲將本發明配合附圖,並以實施例之表達形式詳細說明如下,而其中所使用之圖式,其主旨僅為示意及輔助說明書之用,未必為本發明實施後之真實比例與精準配置,故不應就所附之圖式的比例與配置關係解讀、侷限本發明於實際實施上的權利範圍,合先敘明。 The technical features, contents, and advantages of the present invention, as well as the advantages thereof, can be understood by the reviewing committee, and the present invention will be described in detail with reference to the accompanying drawings. The subject matter is only for the purpose of illustration and description. It is not intended to be a true proportion and precise configuration after the implementation of the present invention. Therefore, the scope and configuration relationship of the attached drawings should not be interpreted or limited. First described.
本發明係針對數字加密需求系統所設計之數字加密方法,係在使用既有加密法下,透過多次加密使最後產出的密文的值會落在明文的值域內,以期達到密文與明文的格式保持一致。請參閱第1圖所示,為本發明之以多次加密進行數字加密之方法之流程圖,從第1圖可看出,本發明其步驟為: The present invention is directed to a digital encryption method designed by a digital encryption requirement system. Under the existing encryption method, the value of the last generated ciphertext falls within the value range of the plaintext through multiple encryptions, in order to reach the ciphertext. Consistent with the plaintext format. Please refer to FIG. 1 , which is a flowchart of a method for digitally encrypting by multiple encryption according to the present invention. As can be seen from FIG. 1 , the steps of the present invention are as follows:
步驟1:一輸入明文值102,經過一般加密法單元101。 Step 1: An input of the plaintext value 102 passes through the general encryption method unit 101.
步驟2:經一般加密法單元101運算產出一中間暫時密文值103。 Step 2: An intermediate temporary ciphertext value 103 is generated by the general cryptographic unit 101.
步驟3:值域判斷單元104判斷中間暫時密文值103是否超出明文值域,若中間暫時密文值103大於明文值域105,則再重複步驟1,此時中間暫時密文值103在下個步驟,將視為明文102使用,繼續加密; Step 3: The value range determining unit 104 determines whether the intermediate temporary ciphertext value 103 exceeds the plaintext value field. If the intermediate temporary ciphertext value 103 is greater than the plaintext value field 105, step 1 is repeated, and the intermediate temporary ciphertext value 103 is next. The steps will be treated as plaintext 102 and continue to be encrypted;
步驟4:若中間暫時密文值103落在明文值域內106,將此中間暫時密文值103當作最後密文輸出值107。 Step 4: If the intermediate temporary ciphertext value 103 falls within the plaintext value field 106, the intermediate temporary ciphertext value 103 is taken as the last ciphertext output value 107.
如上述之多次加密進行數字加密之方法,其中,一般加密法單元,包含所有對稱式或非對稱式加密法。其中,明文值之值域範圍可根據需求做調整,且該最後密文輸出值之值域範圍會與明文值之值域範圍一致。其中,值域判斷單元之值域範圍是根據明密文值之值域範圍所界定,判斷其中間暫時密文值是否介於明文值之值域範圍內。 The method of digitally encrypting as described above, wherein the general cryptographic unit includes all symmetric or asymmetric cryptography. The value range of the plaintext value can be adjusted according to requirements, and the range of the value of the last ciphertext output value is consistent with the range of the plaintext value. The value range of the range determining unit is defined according to the range of the value of the ciphertext value, and whether the temporary ciphertext value is within the range of the plaintext value.
其中,步驟3所得之中間暫時密文值,無論是經過第幾次加密,若此新產生之中間暫時密文值不介於該明文值之值域範圍內,則重複執行步驟2,再執行一次加密,且此次加密之明文值,係為前次加密之中間暫時密文值。 Wherein, the intermediate temporary ciphertext value obtained in step 3, whether after the first encryption, if the newly generated intermediate temporary ciphertext value is not within the range of the plaintext value, repeat step 2, and then execute One encryption, and the plaintext value of this encryption is the intermediate temporary ciphertext value of the previous encryption.
使用普遍一般習知加密法,由於並非針對數字加密作設計,且單位均為二進位(bits)單位,所以若使用在十進位數字加密應用,會導致密文的值域大於明文。 The general acquaintance encryption method is used. Since it is not designed for digital encryption, and the unit is a binary unit, if the application is used in decimal digit encryption, the value of the ciphertext is larger than the plaintext.
上述之實施案例僅為舉例性之具體說明,而非為限制本發明之範圍,凡任何對其進行之等效修改或變更者,皆未脫離本發明之精神與範疇,均應包含於本案專利範圍中。 The above-mentioned embodiments are intended to be illustrative only and not to limit the scope of the present invention. Any equivalent modifications and changes thereto are not included in the spirit and scope of the present invention. In the scope.
101‧‧‧一般加密法單元 101‧‧‧General Encryption Unit
102‧‧‧明文值 102‧‧ ‧ express value
103‧‧‧中間暫時密文值 103‧‧‧Intermediate temporary ciphertext value
104‧‧‧值域判斷單元 104‧‧‧Value field judgment unit
105‧‧‧大於明文值域 105‧‧‧ Greater than the plaintext range
106‧‧‧落在明文值域內 106‧‧‧ falls within the plaintext range
107‧‧‧最後密文輸出值 107‧‧‧Last ciphertext output value
第1圖為本發明之流程圖。 Figure 1 is a flow chart of the present invention.
101‧‧‧一般加密法單元 101‧‧‧General Encryption Unit
102‧‧‧明文值 102‧‧ ‧ express value
103‧‧‧中間暫時密文值 103‧‧‧Intermediate temporary ciphertext value
104‧‧‧值域判斷單元 104‧‧‧Value field judgment unit
105‧‧‧大於明文值域 105‧‧‧ Greater than the plaintext range
106‧‧‧落在明文值域內 106‧‧‧ falls within the plaintext range
107‧‧‧最後密文輸出值 107‧‧‧Last ciphertext output value
Claims (5)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW101150379A TW201426684A (en) | 2012-12-27 | 2012-12-27 | Digital encryption method by multiple encryption |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW101150379A TW201426684A (en) | 2012-12-27 | 2012-12-27 | Digital encryption method by multiple encryption |
Publications (1)
Publication Number | Publication Date |
---|---|
TW201426684A true TW201426684A (en) | 2014-07-01 |
Family
ID=51725626
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW101150379A TW201426684A (en) | 2012-12-27 | 2012-12-27 | Digital encryption method by multiple encryption |
Country Status (1)
Country | Link |
---|---|
TW (1) | TW201426684A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10831911B2 (en) | 2017-12-19 | 2020-11-10 | Industrial Technology Research Institute | Method, computer program product and processing system for generating secure alternative representation |
US10909261B2 (en) | 2018-12-12 | 2021-02-02 | Industrial Technology Research Institute | Method and computer program product for generating secure alternative representation for numerical datum |
-
2012
- 2012-12-27 TW TW101150379A patent/TW201426684A/en unknown
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10831911B2 (en) | 2017-12-19 | 2020-11-10 | Industrial Technology Research Institute | Method, computer program product and processing system for generating secure alternative representation |
US10909261B2 (en) | 2018-12-12 | 2021-02-02 | Industrial Technology Research Institute | Method and computer program product for generating secure alternative representation for numerical datum |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107196763B (en) | SM2 algorithm collaborative signature and decryption method, device and system | |
KR101860461B1 (en) | Encryption method and encryption device | |
US10009170B2 (en) | Apparatus and method for providing Feistel-based variable length block cipher | |
CN102664740B (en) | Remote-authorization-based bidding document encryption and decryption method | |
CN108111295B (en) | Homomorphic encryption method based on analog-to-analog operation | |
JP6575532B2 (en) | Encryption device, decryption device, encryption processing system, encryption method, decryption method, encryption program, and decryption program | |
CN109873699B (en) | Revocable identity public key encryption method | |
EP3378190A1 (en) | Method of performing keyed-hash message authentication code (hmac) using multi-party computation without boolean gates | |
RU2016104606A (en) | DEVICE AND METHOD FOR KEY AGREEMENT | |
CN111783129A (en) | Data processing method and system for protecting privacy | |
CN104038336A (en) | Data encryption method based on 3DES | |
US20130322620A1 (en) | Apparatus and method for generating secret key for id-based encryption system and recording medium having program recorded thereon for causing computer to execute the method | |
CN105099653A (en) | Distributed data processing method, device and system | |
CN104200154A (en) | Identity based installation package signing method and identity based installation package signing device | |
CN105100085A (en) | Information encryption and decryption methods and devices | |
CN103942500A (en) | Hash ciphertext re-encryption method based on noise and decryption method after re-encryption | |
CN102222188A (en) | Information system user password generation method | |
Salmi et al. | Implementation of the data encryption using caesar cipher and vernam cipher methods based on CrypTool2 | |
CN114785524A (en) | Electronic seal generation method, device, equipment and medium | |
CN116760546B (en) | Modularized password service method based on cloud environment | |
TW201426684A (en) | Digital encryption method by multiple encryption | |
CN107317669B (en) | Noiseless full homomorphism public key encryption method based on binary Representation theorem ring | |
WO2015125293A1 (en) | Cipher system and cipher program | |
CN111314270B (en) | Data encryption and decryption method based on validity period uniform distribution symmetric algorithm | |
EP2899713B1 (en) | Hash value calculation device, hash value calculation method and hash value calculation program |