CN103401684B - A multi-parameter three-dimensional digital encryption method - Google Patents
A multi-parameter three-dimensional digital encryption method Download PDFInfo
- Publication number
- CN103401684B CN103401684B CN201310357227.7A CN201310357227A CN103401684B CN 103401684 B CN103401684 B CN 103401684B CN 201310357227 A CN201310357227 A CN 201310357227A CN 103401684 B CN103401684 B CN 103401684B
- Authority
- CN
- China
- Prior art keywords
- data
- encryption
- original data
- encrypted
- dimensional
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims abstract description 33
- 238000004364 calculation method Methods 0.000 claims abstract description 20
- 238000013500 data storage Methods 0.000 claims abstract description 3
- 238000004891 communication Methods 0.000 abstract description 2
- 230000007547 defect Effects 0.000 abstract 1
- 239000011159 matrix material Substances 0.000 description 9
- 238000005516 engineering process Methods 0.000 description 8
- 238000006243 chemical reaction Methods 0.000 description 4
- 101100062780 Mus musculus Dclk1 gene Proteins 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
Landscapes
- Storage Device Security (AREA)
Abstract
Description
技术领域technical field
æœ¬å‘æ˜Žæ¶‰åŠä¸€ç§å¤šå‚数三维数å—åŠ å¯†æ–¹æ³•ï¼Œå±žäºŽè®¡ç®—æœºä¿å¯†ç¼–ç ç†è®ºåŠé€šä¿¡é¢†åŸŸã€‚The invention relates to a multi-parameter three-dimensional digital encryption method, which belongs to the field of computer security coding theory and communication.
背景技术Background technique
åŠ å¯†è§£å¯†æŠ€æœ¯å¯¹ä¿¡æ¯è¿›è¡Œå¤„ç†ï¼Œå¾—åˆ°ä¸€ä¸ªä¸æ˜“è¢«æ”»ç ´çš„ä¿¡æ¯ï¼ˆæˆ–æ•°æ®ï¼‰ã€‚为了防æ¢ä¿¡æ¯éåˆ°ç ´åæˆ–æ”»å‡»ï¼Œå¾ˆå¤šäººç ”ç©¶åŠ å¯†æŠ€æœ¯ã€‚æ—©åœ¨ä¸Šä¸–çºª60å¹´ä»£ï¼Œç”±ç¾Žå›½äººç ”ç©¶å‡ºRSAåŠ å¯†æ–¹æ³•ï¼ˆRSA是三个人åå—çš„å—头嗿¯ï¼‰ï¼Œåœ¨90年代,出现æ¤åœ†æ›²çº¿åŠ å¯†æ–¹æ³•ï¼Œ21实际åˆï¼Œå‡ºçްHILLåŠ å¯†æ–¹æ³•å’ŒEASåŠ å¯†æ–¹æ³•ã€‚Encryption and decryption technology processes information to obtain information (or data) that is not easily broken. In order to prevent information from being destroyed or attacked, many people study encryption technology. As early as the 1960s, Americans developed the RSA encryption method (RSA is the initial letter of three people's names). In the 1990s, the elliptic curve encryption method appeared. At the beginning of the 21st century, the HILL encryption method and the EAS encryption method appeared.
ç›®å‰ï¼Œä¸–ç•ŒåŠ å¯†æŠ€æœ¯å‘展迅速,21ä¸–çºªé‡‡ç”¨çŸ©é˜µåŠ å¯†æŠ€æœ¯æˆä¸ºä¸»æµï¼Œåœ¨ä¸åŒçš„åŠ å¯†æ–¹æ³•ä¸ï¼Œéƒ½æåˆ°æ—‹è½¬çŸ©é˜µåŠ å¯†ï¼Œå®žé™…ä¸Šåªæœ‰ä¸¤ç§æ—‹è½¬åŠ å¯†æ–¹æ³•ï¼Œä¸€ç§æ˜¯çŸ©é˜µé€†è¿ç®—(行å˜åˆ—,列å˜è¡Œï¼‰ï¼Œè¿™ä¸ªæ–¹æ³•采用矩阵逆è¿ç®—å…¬å¼ï¼Œæ•°æ®å¾—到å˜åŒ–ï¼›å¦ä¸€ç§æ˜¯ç¾Žå›½EASåŠ å¯†æ–¹æ³•ï¼Œé‡‡ç”¨ç§»ä½è¿›è¡ŒåŠ å¯†ã€‚æ¤åœ†æ›²çº¿åŠ å¯†æ–¹æ³•ï¼Œåˆ©ç”¨æ¤åœ†æ–¹ç¨‹æ±‚è§£xå’Œy密钥,将原数æ®å˜åˆ°xã€yè¡¨ç¤ºçš„åæ ‡ç‚¹ä¸ã€‚At present, the world's encryption technology is developing rapidly. In the 21st century, matrix encryption technology has become the mainstream. Among different encryption methods, rotation matrix encryption is mentioned. In fact, there are only two rotation encryption methods, one is matrix inverse operation (row to column , column to row), this method uses the matrix inverse operation formula, and the data is changed; the other is the American EAS encryption method, which uses shifting for encryption. The elliptic curve encryption method uses the elliptic equation to solve the x and y keys, and stores the original data in the coordinate points represented by x and y.
ä»¥ä¸Šå›½é™…å‡ ç§åŠ å¯†æ–¹æ³•ï¼Œä»£è¡¨äº†ä¸åŒåŠ å¯†å¹´ä»£æŠ€æœ¯å’Œç‰¹ç‚¹ã€‚å®ƒä»¬åˆ†åˆ«æ˜¯éžçº¿æ€§åŠ å¯†æ–¹æ³•å’Œå¯¹ç§°åŠ å¯†æ–¹æ³•ã€‚éžå¯¹ç§°ç‰¹ç‚¹æ˜¯ï¼Œæœ‰å…¬å…±å¯†é’¥å’Œç§äººå¯†é’¥ï¼Œæœ‰ä¸¤æŠŠå¯†é’¥ï¼›å¦å¤–,还有一ç§å¯¹ç§°åŠ å¯†æ–¹æ³•ï¼Œè¿™ç§åŠ å¯†æ²¡æœ‰å…¬å…±å¯†é’¥ï¼Œåªæœ‰ç§äººå¯†é’¥ï¼ŒåŠ å¯†è¿‡ç¨‹ï¼Œå°±æ˜¯åŠ å¯†å¯†é’¥ã€‚è€ŒRSA是利用数论ä¸çš„ç´ æ•°ï¼Œæ±‚è§£å¯†é’¥ï¼›æ¤åœ†æ›²çº¿æ˜¯åˆ©ç”¨æ¤åœ†æ–¹ç¨‹ï¼Œæ±‚解密钥;HILLåŠ å¯†æ˜¯åˆ©ç”¨çŸ©é˜µé€†å˜æŠ€æœ¯ï¼ˆçŸ©é˜µä¸çš„è¡Œå˜æˆåˆ—ï¼Œåˆ—å˜æˆè¡Œçš„转æ¢ï¼‰ï¼Œå…ˆæ‰¾å‡ºä¸€ä¸ªçŸ©é˜µï¼Œä¸ŽåŽŸæ•°æ®ç»„æˆçš„矩阵进行计算,并求出该矩阵逆è¿ç®—ï¼Œè¾¾åˆ°åŠ å¯†ç›®çš„ï¼›EASåŠ å¯†ï¼Œé‡‡ç”¨æ•°å—低4ä½ä¸å˜ï¼Œé«˜4为补“0â€ï¼Œå¾—åˆ°ä¸€ä¸ªæ±‚è§£å¯†é’¥çš„å› åï¼Œåˆ©ç”¨è¿™ä¸ªå› å与原数相“与â€ï¼Œå¹¶è¿›è¡Œç§»ä½ï¼Œå¾—到密钥x,yåæ ‡ï¼ŒæŠŠåŽŸæ•°æ·»åŠ åˆ°x,yå¯¹åº”çš„åæ ‡ç‚¹é‡Œï¼Œå®žçŽ°åŠ å¯†ã€‚The above international encryption methods represent technologies and characteristics of different encryption ages. They are nonlinear encryption method and symmetric encryption method respectively. The characteristic of asymmetry is that there are two keys, a public key and a private key; in addition, there is a symmetric encryption method, which does not have a public key, but only a private key. The encryption process is the encryption key. RSA uses the prime numbers in number theory to solve the key; elliptic curve uses the elliptic equation to solve the key; HILL encryption uses matrix inversion technology (rows in the matrix become columns, and columns become rows). Find a matrix, calculate it with the matrix composed of the original data, and calculate the inverse operation of the matrix to achieve the purpose of encryption; EAS encryption uses the lower 4 digits of the number to remain unchanged, and the upper 4 is to complement "0", and obtain a solution key The factor of , use this factor to "AND" with the original number, and perform a shift to obtain the x, y coordinates of the key, and add the original number to the coordinate point corresponding to x, y to realize encryption.
è¿™äº›åŠ å¯†æŠ€æœ¯éƒ½å˜åœ¨ä¸åŒç¼ºé™·å’Œä¸è¶³ï¼ŒEASåŠ å¯†ï¼Œé‡‡ç”¨ç§»ä½æ–¹æ³•åŠ å¯†ï¼ŒçŽ°åœ¨æ²¡æœ‰å¾ˆå¥½çš„æ–¹æ³•è¿›è¡Œç ´è§£ï¼Œä¸€æ—¦æ•°æ®è¢«ç ´ååŽï¼Œæ— æ³•çŸ¥é“æ•°æ®çš„真与å‡ã€‚æ‰€ä»¥ï¼Œè¿™ç§æ–¹æ³•很容易被攻击。RSAå’Œæ¤åœ†æ›²çº¿ä»¥åŠHILLåŠ å¯†ç®—æ³•ï¼Œå¯¹å—é•¿é•¿çš„è®¡ç®—æœºï¼Œè®¡ç®—å¾ˆå¤æ‚,è¿è¡Œé€Ÿåº¦æ…¢ï¼Œä¸ä»…如æ¤ï¼Œè¿™äº›ç®—æ³•å®¹æ˜“å‡ºçŽ°å°æ•°ï¼Œå‡ºçް尿•°ï¼Œéœ€è¦é‡æ–°è®¡ç®—ï¼Œç›´è‡³æ²¡æœ‰å°æ•°ï¼Œæ‰å¯ä»¥ä½œä¸ºåæ ‡ç‚¹éšè—æ•°æ®ã€‚These encryption technologies have different flaws and deficiencies. EAS encryption uses the shift method to encrypt. Now there is no good way to crack it. Once the data is destroyed, it is impossible to know whether the data is true or false. So, this method is easy to be attacked. RSA, elliptic curve, and HILL encryption algorithm, for computers with long words, the calculation is very complicated and the running speed is slow. Not only that, these algorithms are prone to decimals, and when decimals appear, they need to be recalculated until there are no decimals before they can be hidden as coordinate points data.
呿˜Žå†…容Contents of the invention
为了解决上述现有技术ä¸å˜åœ¨çš„é—®é¢˜ï¼Œæœ¬å‘æ˜Žç›®çš„æ˜¯æä¾›ä¸€ç§å¤šå‚数三维数å—åŠ å¯†æ–¹æ³•ã€‚è¯¥æ–¹æ³•æ˜¯åˆ©ç”¨ä»»æ„进制数和整数计算公å¼ï¼Œæ±‚å‡ºä¸‰ä¸ªå‚æ•°å¹¶ä½œä¸ºä¸‰ç»´åæ ‡ç‚¹ï¼Œå†å°†åŽŸå§‹æ•°æ®å˜æ”¾åˆ°ä¸‰ç»´åæ ‡ç‚¹ä¸ï¼Œå³å˜å…¥xã€yã€zåæ ‡ç‚¹ä¸ï¼Œå½¢æˆæ–°çš„ä¸‰ç»´æ•°æ®æŽ’åˆ—ï¼Œè¾¾åˆ°æ•°æ®åŠ å¯†çš„ç›®çš„ï¼Œå…‹æœäº†ä»¥å¾€éžå¯¹ç§°åŠ å¯†è®¡ç®—å…¬å¼å¤æ‚å’Œå—å—é•¿é™åˆ¶ä»¥åŠæ˜“å‡ºçŽ°å°æ•°çš„ä¸è¶³ã€‚In order to solve the above-mentioned problems in the prior art, the object of the present invention is to provide a multi-parameter three-dimensional digital encryption method. This method is to use arbitrary base numbers and integer calculation formulas to find three parameters and use them as three-dimensional coordinate points, and then store the original data in the three-dimensional coordinate points, that is, store them in x, y, z coordinate points to form a new The three-dimensional data arrangement achieves the purpose of data encryption, and overcomes the shortcomings of the previous asymmetric encryption calculation formula, which are limited by word length and prone to decimals.
ä¸ºäº†å®žçŽ°ä¸Šè¿°å‘æ˜Žç›®çš„,解决已有技术ä¸å˜åœ¨çš„å‘é¢˜ï¼Œæœ¬å‘æ˜Žé‡‡å–的技术方案是:一ç§å¤šå‚数三维数å—åŠ å¯†æ–¹æ³•ï¼ŒåŒ…æ‹¬ä»¥ä¸‹æ¥éª¤ï¼šIn order to achieve the above-mentioned purpose of the invention and solve the existing problems in the prior art, the technical solution adopted by the present invention is: a multi-parameter three-dimensional digital encryption method, comprising the following steps:
(A)利用计算机å˜å‚¨å™¨å†…的原始数æ®ï¼Œæ ¹æ®ä»»æ„进制数和整数计算公å¼ï¼Œé€šè¿‡FPGA求出多个原始数æ®åŠ å¯†å¯†é’¥ï¼Œå†å°†åŽŸå§‹æ•°æ®å˜å…¥ç”¨å¯†é’¥è¡¨ç¤ºçš„ä¸‰ç»´åæ ‡åŠ å¯†æ•°æ®ä¸ï¼ŒåŒæ—¶å»ºç«‹ä¸€ä¸ªå¯†é’¥ä¸ŽåŽŸå§‹æ•°æ®å˜å‚¨é¡ºåºçº¿æ€§è¡¨å¹¶ä¸ŽåŠ å¯†æ•°æ®ä¸€èµ·é€šè¿‡ç½‘络进行通信,实现数æ®åŠ å¯†ã€‚(A) Using the original data in the computer memory, according to arbitrary base numbers and integer calculation formulas, multiple original data encryption keys are obtained through FPGA, and then the original data is stored in the three-dimensional coordinate encrypted data represented by the key, At the same time, a linear table of key and original data storage sequence is established and communicated with the encrypted data through the network to realize data encryption.
(B)对æ¥éª¤ï¼ˆAï¼‰ä¸æåˆ°åˆ©ç”¨ä¸‰ç»´åæ ‡å®žçŽ°æ•°æ®åŠ å¯†ï¼Œå…·ä½“æ¥éª¤å¦‚下:(B) As mentioned in step (A), using three-dimensional coordinates to realize data encryption, the specific steps are as follows:
(a)计算原始数æ®å¯†é’¥(a) Calculate raw data key
计算机对所需è¦åŠ å¯†çš„æ•°æ®å˜æ”¾åˆ°å†…å˜ä¸ï¼Œè¿›è¡Œæœ‰åºæŽ’åˆ—ï¼Œä½œä¸ºåŠ å¯†åŽŸå§‹æ•°æ®ï¼Œå¹¶é€šè¿‡è®¡ç®—机485串行接å£ï¼Œä¼ é€åˆ°FPGAä¸ï¼Œåˆ©ç”¨ä»»æ„进制数计算公å¼ï¼ˆ1)P=cu+w,由FPGA进行密钥计算,求出密钥cã€uå’Œw值,公å¼ï¼ˆ1)ä¸ï¼ŒPæ˜¯åŠ å¯†åŽŸå§‹æ•°æ®ï¼Œ c是任æ„进制数,u是任æ„è¿›åˆ¶æ•°çš„å€æ•°ï¼Œw是余数,表示cã€uã€wä¸ŽåŠ å¯†åŽŸå§‹æ•°æ®P之间的函数关系,cã€uã€w表示范围从-∞到+∞,为了得到更多密钥,å¯å°†æ•´æ•°è®¡ç®—å…¬å¼ï¼ˆ2)N=2k(2m-1) 代入公å¼ï¼ˆ1)cä¸ï¼Œå³Nç‰äºŽc,得到ckã€cm傿•°ï¼ŒåŒç†å°†å…¬å¼ï¼ˆ2)分别代入公å¼ï¼ˆ1)uã€wä¸ï¼Œå¾—到ukã€umã€wkã€wm傿•°ï¼›The computer stores the data to be encrypted in the memory, arranges them in an orderly manner, and uses them as encrypted original data, and transmits them to the FPGA through the 485 serial interface of the computer, and uses the arbitrary number calculation formula (1) P=cu+w , the key is calculated by the FPGA, and the key c, u and w values are obtained. In the formula (1), P is the encrypted original data, c is an arbitrary base number, u is a multiple of any base number, and w is the remainder , represents the functional relationship between c, u, w and the encrypted original data P, c, u, w represent the range from -∞ to +∞, in order to get more keys, the integer calculation formula (2) N=2 Substitute k (2m-1) into formula (1) c, that is, N is equal to c, and get c k and c m parameters. Similarly, substitute formula (2) into formula (1) u and w to get u k and u m , w k , w m parameters;
(b)数æ®ä¸‰ç»´åР坆(b) Data three-dimensional encryption
ç”±FPGA计算出cã€uã€w密钥值,将原始数æ®å˜æ”¾åˆ°cã€uã€wå¯¹åº”çš„åæ ‡ç‚¹ä¸ï¼Œå³x =cã€y=uã€z =wï¼Œè¯¥åæ ‡ç‚¹å°±æ˜¯åŠ å¯†åŽŸå§‹æ•°æ®éšè—ä½ç½®ï¼ŒåŒæ—¶æ ¹æ®åŽŸå§‹æ•°æ®å˜æ”¾é¡ºåºå»ºç«‹ä¸€ä¸ªçº¿æ€§è¡¨ï¼ŒåŽŸå§‹æ•°æ®å˜æ”¾åœ°å€ä¸Žä¸‰ç»´åæ ‡å‚æ•°å¯¹åº”,目的是在æ¢å¤æ•°æ®æ—¶ï¼Œå¯ä»¥æ‰¾åˆ°åŽŸå§‹æ•°æ®çš„ä½ç½®ï¼›å½“出现多个é‡å¤æ•°æ®æ—¶ï¼Œåˆ©ç”¨å…¬å¼ï¼ˆ2)带入公å¼ï¼ˆ1)ä¸ï¼Œå¾—到ckã€cmã€ukã€umã€wkã€wm傿•°ï¼Œå¹¶å°†ckã€cmã€ukä½œä¸ºä¸€ä¸ªä¸‰ç»´åŠ å¯†æ•°æ®åæ ‡ï¼Œè€Œumã€wkã€wm傿•°ä¸ºå¦ä¸€ä¸ªä¸‰ç»´åŠ å¯†æ•°æ®åæ ‡ï¼Œè¿™æ ·å¯ä»¥è§£å†³ä¸‰ç»´æ•°æ®ç©ºé—´ä¸å¤Ÿè¡¨ç¤ºçš„问题。The key values of c, u, and w are calculated by the FPGA, and the original data is stored in the coordinate points corresponding to c, u, and w, that is, x = c, y = u, z = w. This coordinate point is the encrypted original data hidden At the same time, a linear table is established according to the storage order of the original data. The storage address of the original data corresponds to the three-dimensional coordinate parameters. The purpose is to find the location of the original data when restoring the data; when there are multiple duplicate data, use the formula (2) into the formula (1), to obtain c k , c m , u k , u m , w k , w m parameters, and c k , c m , u k as a three-dimensional encrypted data coordinates, while u m , w The k and w m parameters are another three-dimensional encrypted data coordinates, which can solve the problem of insufficient representation of three-dimensional data space.
æœ¬å‘æ˜Žæœ‰ç›Šæ•ˆæžœæ˜¯ï¼šä¸€ç§å¤šå‚数三维数å—åŠ å¯†æ–¹æ³•ï¼Œå®ƒæ˜¯åˆ©ç”¨è®¡ç®—æœºå˜å‚¨å™¨å†…的原始数æ®ï¼Œæ ¹æ®ä»»æ„进制数和整数计算公å¼ï¼Œé€šè¿‡FPGA求出多个原始数æ®åŠ å¯†å¯†é’¥ï¼Œå†å°†åŽŸå§‹æ•°æ®å˜å…¥ç”¨å¯†é’¥è¡¨ç¤ºçš„ä¸‰ç»´åæ ‡åŠ å¯†æ•°æ®ä¸ï¼ŒåŒæ—¶å»ºç«‹ä¸€ä¸ªå¯†é’¥ä¸ŽåŽŸå§‹æ•°æ®å˜å‚¨é¡ºåºçº¿æ€§è¡¨å¹¶ä¸ŽåŠ å¯†æ•°æ®ä¸€èµ·é€šè¿‡ç½‘络进行通信,实现数æ®åŠ å¯†ã€‚ä¸Žå·²æœ‰æŠ€æœ¯ç›¸æ¯”ï¼Œè¿™ç§åŠ å¯†æ–¹æ³•è®¡ç®—å…¬å¼ç®€å•ï¼ŒåŠ å¯†å‚æ•°å¤šï¼Œè§£å¯†éš¾åº¦å¤§ï¼Œè®¡ç®—傿•°ä¸ä¼šå‡ºçް尿•°ï¼Œå…‹æœäº†ä»¥å¾€éžå¯¹ç§°åŠ å¯†è®¡ç®—å…¬å¼å¤æ‚å’Œå—å—é•¿é™åˆ¶ä»¥åŠæ˜“å‡ºçŽ°å°æ•°çš„ä¸è¶³ã€‚The beneficial effects of the present invention are: a multi-parameter three-dimensional digital encryption method, which utilizes the original data in the computer memory, according to arbitrary base numbers and integer calculation formulas, obtains a plurality of original data encryption keys through FPGA, and then converts the original The data is stored in the three-dimensional coordinate encrypted data represented by the key, and at the same time, a linear table of the storage order of the key and the original data is established and communicated with the encrypted data through the network to realize data encryption. Compared with the existing technology, this encryption method has a simple calculation formula, many encryption parameters, great difficulty in decryption, and no decimals appear in the calculation parameters. .
附图说明Description of drawings
图1æ˜¯æœ¬å‘æ˜Žæ€»ä½“框图。Fig. 1 is the overall block diagram of the present invention.
具体实施方å¼detailed description
下é¢ç»“åˆå›¾1å¯¹æœ¬å‘æ˜Žä½œè¿›ä¸€æ¥è¯´æ˜Žã€‚The present invention will be further described below in conjunction with FIG. 1 .
如图1æ‰€ç¤ºï¼Œæœ¬å‘æ˜Žæ€»ä½“框图包括计算机ã€485(1)ã€485(2)ã€ç”±T1ã€T2ã€R1ã€R2ã€R3ã€R4组æˆçš„电平转æ¢ç”µè·¯ï¼ŒFPGAåŠç¨‹åºå˜å‚¨å™¨ï¼Œæ‰€è¿°è®¡ç®—机通过串行å£ä¸Ž485(1)串å£è¿žæŽ¥ï¼Œæ‰€è¿°485(1)与485(2ï¼‰ä¹‹é—´è¿›è¡Œæ ‡å‡†æ€»çº¿è¿žæŽ¥ï¼Œæ‰€è¿°485(2)串å£ä¸Žä¸Žç”µå¹³è½¬æ¢ç”µè·¯è¿žæŽ¥ï¼Œè§£å†³ä¿¡å·ä¸åŒ¹é…,ä¿è¯ç”µè·¯æ£å¸¸å·¥ä½œï¼Œæ‰€è¿°ç”µå¹³è½¬æ¢ç”µè·¯åˆ†åˆ«ä¸ŽFPGAä¸çš„I/Oå£è¿žæŽ¥ï¼Œæ‰€è¿°FPGA与USB串å£è¿žæŽ¥ï¼Œæ‰€è¿°FPGAä¸çš„Ncsã€dataã€asdi åŠ dclkä¿¡å·å£åˆ†åˆ«ä¸Žç¨‹åºå˜å‚¨å™¨ä¸çš„Ncsã€dataã€asdi åŠ dclkä¿¡å·å£ä¸€ä¸€å¯¹åº”连接,所述 5V电æºä¸Ž485(2)供电管脚连接,所述3.3V电æºåˆ†åˆ«ä¸ŽFPGAåŠç¨‹åºå˜å‚¨å™¨ä¾›ç”µç®¡è„šè¿žæŽ¥ã€‚工作过程如下:将数æ®å˜åˆ°è®¡ç®—机å˜å‚¨å™¨å†…,通过485(1)ã€485(2),把数æ®ä¼ é€åˆ°FPGAä¸ï¼ŒFPGA便®ç¨‹åºï¼Œå¹¶åˆ©ç”¨ä»»æ„进制数计算公å¼ï¼ˆ1)p=cu+w选择c值,计算出uå’Œw值,并把原数æ®åœ°å€å’Œcã€uã€w值ä¿å˜åˆ°çº¿æ€§è¡¨å†…ï¼ŒåŒæ—¶å°†æ•°æ®éšè—到cã€uã€w表示的三维数æ®è¡¨å†…ï¼Œå¾—åˆ°ä¸‰ç»´åŠ å¯†æ•°æ®è¡¨ï¼Œç„¶åŽæŠŠåŠ å¯†ä¸‰ç»´æ•°æ®è¡¨ä¸Žçº¿æ€§è¡¨ä¸€èµ·é€šè¿‡USBå£ä¼ é€åˆ°ç½‘络ä¸ã€‚下é¢åˆ†æ¥è¿›è¡Œè¯¦ç»†è¯´æ˜Žï¼šAs shown in Figure 1, the general block diagram of the present invention includes computer, 485 (1), 485 (2), the level conversion circuit that is made up of T1, T2, R1, R2, R3, R4, FPGA and program memory, described computer The serial port is connected to the 485 (1) serial port, the standard bus connection is made between the 485 (1) and 485 (2), and the 485 (2) serial port is connected to the level conversion circuit to solve the signal mismatch. Guarantee the normal operation of the circuit, the level conversion circuit is connected with the I/O port in the FPGA respectively, the FPGA is connected with the USB serial port, and the Ncs, data, asdi and dclk signal ports in the FPGA are connected with the program memory respectively The Ncs, data, asdi and dclk signal ports are connected one by one, the 5V power supply is connected to the 485 (2) power supply pins, and the 3.3V power supply is connected to the FPGA and program memory power supply pins respectively. The working process is as follows: store the data in the computer memory, and transmit the data to the FPGA through 485 (1) and 485 (2), and the FPGA uses the arbitrary number calculation formula (1) p=cu+w according to the program Select the value of c, calculate the value of u and w, and save the original data address and the values of c, u, and w in the linear table, and at the same time hide the data in the three-dimensional data table represented by c, u, and w to obtain the three-dimensional encrypted data table, and then transmit the encrypted three-dimensional data table together with the linear table to the network through the USB port. The following step-by-step detailed instructions:
第一æ¥ï¼Œè®¡ç®—机将数æ®å˜æ”¾åˆ°è®¡ç®—机内å˜RAMä¸ï¼Œå¹¶å°†æ•°æ®è¿›è¡Œæœ‰åºæŽ’åˆ—ï¼Œç„¶åŽæŠŠéœ€è¦åŠ å¯†æ•°å—å’ŒåŠ å¯†æ•°å—地å€é•¿åº¦ï¼Œé€šè¿‡485(1)串å£è½¬å˜æˆç”µæµå½¢å¼è¿›è¡Œå‘é€ï¼Œç”±485(2ï¼‰ä¸²å£æŽ¥æ”¶æ•°å—,由于485串å£ç”µåŽ‹ï¼ˆ5v)与FPGA(3.3v)工作电压ä¸åŒï¼Œéœ€è¦ä¸€ä¸ªç”µå¹³è½¬æ¢ç”µè·¯ï¼ŒT1与FPGA的接收端相连接,将5vè¾“å‡ºç”µå¹³è½¬æ¢æˆ3.3v电平,T2与FPGAå‘é€ç«¯ç›¸è¿žæŽ¥ï¼Œå°†3.3vç”µå¹³è½¬æ¢æˆ5v电平,FPGAæŽ¥æ”¶åˆ°è®¡ç®—æœºä¼ é€çš„åŠ å¯†æ•°å—å’ŒåŠ å¯†æ•°å—地å€é•¿åº¦ä¿¡æ¯åŽï¼Œæ ¹æ®å…¬å¼ï¼ˆ1)P=cu+w计算cã€uã€w傿•°ï¼Œå…·ä½“实现方法为,把需è¦åŠ å¯†æ•°å—P用二进制表示,把P分æˆä¸Šã€ä¸‹ä¸¤éƒ¨åˆ†ï¼Œä¸€éƒ¨åˆ†ä¸ºå—的上åŠéƒ¨åˆ†ï¼Œå¦ä¸€éƒ¨åˆ†ä¸ºå—的下åŠéƒ¨åˆ†ï¼Œä¸ŠåŠéƒ¨åˆ†å—与“0â€ç›¸ä¸Žï¼Œä¸‹åŠéƒ¨åˆ†ä¸Žâ€œ1â€ç›¸ä¸Žï¼Œä¸‹åŠéƒ¨åˆ†å¾—到ä¸å˜çš„原数æ®ä¸‹åŠéƒ¨åˆ†æ•°å—,而上åŠéƒ¨åˆ†å¾—到0,令下åŠéƒ¨åˆ†æ•°å—ç‰äºŽc,å†åˆ©ç”¨å…¬å¼ï¼ˆ1)得u=P/c å–æ•´æ•°ä½œä¸ºu的解,余数为w,计算出cã€uã€wåŽï¼Œä»¤X(c,u,w)=Pï¼Œæ¤æ—¶æŠŠæ•°æ®éšè—åˆ°ä¸‰ç»´åæ ‡X(c,u,w)点ä¸ï¼Œè¿™æ ·è®¡ç®—所有需è¦åŠ å¯†çš„æ•°æ®ï¼Œä¼šå¾—åˆ°ä¸€ä¸ªç”¨ä¸‰ç»´åæ ‡è¡¨ç¤ºçš„åŠ å¯†å˜å‚¨æ–¹å¼æ•°æ®ã€‚In the first step, the computer stores the data in the RAM of the computer memory, arranges the data in an orderly manner, and then converts the encrypted number and the length of the encrypted number address through the 485 (1) serial port into a current form for transmission, and the 485 (2 ) The serial port receives numbers. Since the 485 serial port voltage (5v) is different from the FPGA (3.3v) working voltage, a level conversion circuit is required. T1 is connected to the receiving end of the FPGA to convert the 5v output level to 3.3v level. T2 is connected to the sending end of the FPGA to convert the 3.3v level into a 5v level. After the FPGA receives the encrypted number and the encrypted number address length information transmitted by the computer, it calculates c, u, The specific implementation method of the w parameter is to represent the number P to be encrypted in binary, and divide P into upper and lower parts. One part is the upper part of the word, and the other part is the lower part of the word. " and, the lower part is ANDed with "1", the lower part gets the lower part of the original data unchanged, and the upper part gets 0, and the lower part is equal to c, then use the formula (1) to get u=P/c Take an integer as the solution of u, and the remainder is w. After calculating c, u, and w, set X(c, u, w) = P, and hide the data at the three-dimensional coordinates X(c, u , w) point, in this way all the data that needs to be encrypted will be calculated, and an encrypted storage data represented by three-dimensional coordinates will be obtained.
第二æ¥ï¼Œå¯¹ä¸‰ç»´åæ ‡ç©ºé—´çš„é€‰å®šï¼Œè‹¥åŠ å¯†æ•°å—地å€é•¿åº¦è®¾ä¸ºDï¼Œåˆ™ä¸‰ç»´åæ ‡å–值范围为F=,其ä¸Då–值最好是能被开立方的数å—ï¼Œå¦‚æžœåŠ å¯†æ•°å—地å€é•¿åº¦ä¸æ»¡è¶³å¼€ç«‹æ–¹è¦æ±‚ï¼Œä¼šå‡ºçŽ°ä¸¤ç§æƒ…å†µï¼Œä¸€ç§æ˜¯ä¸‰ç»´åº§æ ‡ç©ºé—´å•元个数大于数å—地å€é•¿åº¦è¡¨ç¤ºçš„个数,åªéœ€è¦è®¡ç®—cã€uã€wå³å¯å®žçŽ°åŠ å¯†ï¼Œå¦ä¸€ç§æƒ…å†µä¸ºï¼Œä¸‰ç»´åº§æ ‡ç©ºé—´å•元个数å°äºŽæ•°å—地å€é•¿åº¦è¡¨ç¤ºçš„ä¸ªæ•°ï¼Œæ¤æ—¶éœ€è¦å¢žåŠ ä¸‰ç»´åº§æ ‡ç©ºé—´ï¼Œå¢žåŠ åº§æ ‡ç©ºé—´æ–¹æ³•ä¸ºï¼Œåˆ©ç”¨å…¬å¼ï¼ˆ2)N=2k(2m-1)代入公å¼ï¼ˆ1)P=cu+wä¸ï¼Œå¾—åˆ°å‚æ•°ckã€cmã€ukã€umã€wkã€wm,åªè¦æŠŠå‚æ•°ckã€cmã€uk或umã€wkã€wmä½œä¸ºä¸‰ç»´ç©ºé—´æ‰©å±•åº§æ ‡ï¼Œå°±å¯ä»¥å¾—åˆ°æ‰©å¼ åŠ å¯†ç©ºé—´ã€‚In the second step, for the selection of the three-dimensional coordinate space, if the length of the encrypted digital address is set to D, the value range of the three-dimensional coordinates is F= , where the value of D is preferably a number that can be cubed. If the length of the encrypted digital address does not meet the requirements of the cube, there will be two situations. One is that the number of three-dimensional coordinate space units is greater than the number indicated by the length of the digital address , only need to calculate c, u, w to realize encryption. In another case, the number of units in the three-dimensional coordinate space is less than the number indicated by the length of the digital address. At this time, it is necessary to increase the three-dimensional coordinate space, and the method of increasing the coordinate space For, use formula (2) N=2 k (2m-1) to substitute into formula (1) P=cu+w to get parameters c k , c m , u k , u m , w k , w m , as long as The parameters c k , c m , u k or u m , w k , w m are taken as the three-dimensional space expansion coordinates, and the expanded and encrypted space can be obtained.
第三æ¥ï¼Œå»ºç«‹åŠ å¯†æ•°å—å˜æ”¾ä¸‰ç»´åº§æ ‡ä¸ŽåŽŸæ•°å—å˜æ”¾åœ°å€çº¿æ€§è¡¨ï¼Œå»ºç«‹çº¿æ€§è¡¨å分é‡è¦ï¼Œåœ¨éžçº¿æ€§åР坆䏿˜¯ä¸€ä¸ªä¸å¯ç¼ºå°‘çš„çŽ¯èŠ‚ï¼Œè€Œä¸‰ç»´å‚æ•°cã€uã€wåº§æ ‡å’Œæ•°å—å˜æ”¾åœ°å€æ˜¯ä¸€ä¸€å¯¹åº”å…³ç³»ï¼Œå…·ä½“å®žçŽ°æ–¹æ³•ä¸ºï¼Œæ ¹æ®æ•°å—è®¡ç®—çš„å‚æ•°cã€uã€w,将数å—å˜æ”¾åˆ°ä¸‰ç»´åº§æ ‡ç©ºé—´å†…ï¼ŒåŒæ—¶å°†å‚数与这个原数å—å˜æ”¾åœ°å€åˆå¹¶æˆä¸€ä¸ªçº¿æ€§è¡¨ï¼ŒæŒ‰ç…§è¿™ä¸ªæ¬¡åºï¼Œå°†æ‰€æœ‰åŠ å¯†æ•°å—ä¸çš„傿•°å’Œæœ¬èº«åŽŸæ•°æ®å˜æ”¾çš„地å€è¿›è¡Œåˆå¹¶ï¼Œå¾—åˆ°ä¸€å¼ çº¿æ€§è¡¨ï¼Œè¿™ä¸ªè¡¨ä½œä¸ºåŠ å¯†æ—¶ä½¿ç”¨ã€‚The third step is to establish a linear table of the three-dimensional coordinates of encrypted numbers and the address of original numbers. It is very important to establish a linear table, which is an indispensable link in nonlinear encryption. The three-dimensional parameters c, u, w coordinates and digital storage The address is a one-to-one correspondence. The specific implementation method is to store the number in the three-dimensional coordinate space according to the parameters c, u, and w calculated by the number, and at the same time combine the parameters and the original number storage address into a linear table. According to this In order, the parameters in all encrypted numbers are combined with the address where the original data is stored to obtain a linear table, which is used for encryption.
第四æ¥ï¼Œæ•°æ®åР坆åŽï¼Œå¾—åˆ°ä¸€å¼ çº¿æ€§è¡¨å’Œä¸€ä¸ªä¸‰ç»´æ•°æ®åŠ å¯†è¡¨ç¤ºçš„å˜å‚¨ç©ºé—´ï¼Œå°†è¿™ä¸¤éƒ¨åˆ†æ•°æ®é€šè¿‡USBå£ä¼ é€åˆ°ç½‘ä¸Šï¼Œè¾¾åˆ°æœ€ç»ˆåŠ å¯†çš„ç›®çš„ã€‚In the fourth step, after data encryption, a linear table and a three-dimensional data encrypted storage space are obtained, and these two parts of data are transmitted to the Internet through the USB port to achieve the purpose of final encryption.
æœ¬å‘æ˜Žçš„åŠ å¯†æ–¹æ³•ä¼˜ç‚¹åœ¨äºŽï¼šå®ƒå…·æœ‰è®¡ç®—å…¬å¼ç®€å•ã€åР坆傿•°å¤šã€è®¡ç®—傿•°ä¸ä¼šå‡ºçް尿•°ï¼Œå…‹æœäº†ä»¥å¾€éžå¯¹ç§°åŠ å¯†è®¡ç®—å…¬å¼å¤æ‚å’Œå—å—é•¿é™åˆ¶ä»¥åŠæ˜“å‡ºçŽ°å°æ•°çš„ä¸è¶³ã€‚The encryption method of the present invention has the advantages of simple calculation formula, many encryption parameters, and no decimals in the calculation parameters, which overcomes the disadvantages of complex calculation formulas of asymmetric encryption, limitation of word length and easy occurrence of decimals in the past.
Claims (1)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310357227.7A CN103401684B (en) | 2013-08-14 | 2013-08-14 | A multi-parameter three-dimensional digital encryption method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310357227.7A CN103401684B (en) | 2013-08-14 | 2013-08-14 | A multi-parameter three-dimensional digital encryption method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103401684A CN103401684A (en) | 2013-11-20 |
CN103401684B true CN103401684B (en) | 2016-12-28 |
Family
ID=49565215
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310357227.7A Expired - Fee Related CN103401684B (en) | 2013-08-14 | 2013-08-14 | A multi-parameter three-dimensional digital encryption method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103401684B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111510292B (en) * | 2020-04-22 | 2021-09-21 | åŽå—ç†å·¥å¤§å¦ | Method, system, device and storage medium for randomly generating hill high-order key matrix |
CN113554689B (en) * | 2021-07-19 | 2023-09-22 | å¹¿å·žå¸‚æœæ ¼ç§‘技有é™å…¬å¸ | Method and device for measuring carriage cargo volume, equipment and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101192924A (en) * | 2006-11-24 | 2008-06-04 | åŒ—äº¬å¤§å¦ | Encoding method of P2P storage system based on Reed-Solomon code |
CN101605326A (en) * | 2008-06-12 | 2009-12-16 | ä¸å…´é€šè®¯è‚¡ä»½æœ‰é™å…¬å¸ | The method of a kind of encryption and decrypting mobile terminal network locking/card locking unlock code |
CN101826961A (en) * | 2010-05-25 | 2010-09-08 | ä¸Šæµ·å¤æ—¦å¤©è‡£æ–°æŠ€æœ¯æœ‰é™å…¬å¸ | Method, device and system for data transmission encryption and decryption |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050015608A1 (en) * | 2003-07-16 | 2005-01-20 | Pkware, Inc. | Method for strongly encrypting .ZIP files |
-
2013
- 2013-08-14 CN CN201310357227.7A patent/CN103401684B/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101192924A (en) * | 2006-11-24 | 2008-06-04 | åŒ—äº¬å¤§å¦ | Encoding method of P2P storage system based on Reed-Solomon code |
CN101605326A (en) * | 2008-06-12 | 2009-12-16 | ä¸å…´é€šè®¯è‚¡ä»½æœ‰é™å…¬å¸ | The method of a kind of encryption and decrypting mobile terminal network locking/card locking unlock code |
CN101826961A (en) * | 2010-05-25 | 2010-09-08 | ä¸Šæµ·å¤æ—¦å¤©è‡£æ–°æŠ€æœ¯æœ‰é™å…¬å¸ | Method, device and system for data transmission encryption and decryption |
CN101826961B (en) * | 2010-05-25 | 2012-11-14 | 上海天臣防伪技术股份有é™å…¬å¸ | Method, device and system for data transmission encryption and decryption |
Non-Patent Citations (1)
Title |
---|
《基于三维混沌系统的图åƒåŠ å¯†ç®—æ³•ã€‹;å¼ é›ªå³° ç‰;《计算机工程与应用》;20071231;全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN103401684A (en) | 2013-11-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20200366460A1 (en) | Homomorphic data decryption method and apparatus for implementing privacy protection | |
CN106375079B (en) | Chaotic encryption method for voice information | |
CN110197076B (en) | A Software Optimization Implementation Method of SM4 Encryption Algorithm | |
WO2014109828A2 (en) | Method for secure substring search | |
CN108768656B (en) | Data verification method based on Hash algorithm | |
CN114124359B (en) | Method, device, electronic device and storage medium for encrypting data in a format-preserving manner | |
CN103401684B (en) | A multi-parameter three-dimensional digital encryption method | |
CN118473636A (en) | A fully homomorphic encryption method and device supporting block cipher SM4 algorithm | |
TW202147096A (en) | Pseudo-random number generating method of pseudorandom number generator | |
CN120185797A (en) | A hashing method, a hashing computing system, an electronic device and a storage medium | |
CN113902135B (en) | Sample data volume joint expansion method, device, equipment, system and storage medium | |
CN107885486B (en) | A complex finite field inversion device based on search tree | |
CN106650240B (en) | Construction Method of Parallel Hash Function | |
CN104579693B (en) | Based on the high order second order logistic embedded encryption methods mapped and device | |
CN107612891A (en) | A kind of data compression encrypted circuit | |
CN115549979A (en) | Data encryption and decryption method and device, electronic equipment and storage medium | |
CN103401680B (en) | A Matrix Rotation Shift Digital Encryption Method | |
CN114614973A (en) | Method, device, equipment and storage medium for obtaining packet cipher discriminator | |
CN102902510A (en) | Galois field inversion device | |
Mohammed | Text encryption algorithm based on chaotic neural network and random key generator | |
CN114499465A (en) | Hash algorithm and circuit, electronic equipment | |
CN108964702B (en) | For the inversion method after frequency hop sequences Random Maps in frequency hopping communications | |
CN103684368A (en) | Universal reversible comparative switch | |
CN112751663B (en) | Data encryption method and device | |
CN104778147B (en) | A kind of data processing method based on coprocessor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20161228 Termination date: 20210814 |