CN103401684B - A multi-parameter three-dimensional digital encryption method - Google Patents

A multi-parameter three-dimensional digital encryption method Download PDF

Info

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
Application number
CN201310357227.7A
Other languages
Chinese (zh)
Other versions
CN103401684A (en
Inventor
张仿°
æ¨è™¹
å¼ åƒ
å¼ åƒä¸€
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dalian University of Technology
Original Assignee
Dalian University of Technology
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Dalian University of Technology filed Critical Dalian University of Technology
Priority to CN201310357227.7A priority Critical patent/CN103401684B/en
Publication of CN103401684A publication Critical patent/CN103401684A/en
Application granted granted Critical
Publication of CN103401684B publication Critical patent/CN103401684B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Storage Device Security (AREA)

Abstract

The invention relates to the field of computer security coding theory and communication, in particular to a multi-parameter three-dimensional digital encryption method which comprises the steps of utilizing original data in a computer memory, solving a plurality of original data encryption keys through an FPGA (field programmable gate array) according to an arbitrary system number and an integer calculation formula, storing the original data into three-dimensional coordinate encryption data represented by the keys, simultaneously establishing a key and original data storage sequence linear table, and communicating with the encryption data through a network to realize data encryption. The encryption method has the advantages of simple calculation formula, more encryption parameters, high decryption difficulty and no decimal occurrence of the calculation parameters, and overcomes the defects that the conventional asymmetric encryption calculation formula is complicated, is limited by word length and is easy to have decimal occurrence.

Description

一ç§å¤šå‚数三维数字加密方法A multi-parameter three-dimensional digital encryption method

技术领域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)

1.一ç§å¤šå‚数三维数字加密方法,其特å¾åœ¨äºŽåŒ…括以下步骤:1. A multi-parameter three-dimensional digital encryption method is characterized in that 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, establish a linear table of key and original data storage order and communicate with 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, substituting formula (2) into formula (1) u and w respectively, get u k , 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 get 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 to solve the problem of insufficient representation of three-dimensional data space.
CN201310357227.7A 2013-08-14 2013-08-14 A multi-parameter three-dimensional digital encryption method Expired - Fee Related CN103401684B (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050015608A1 (en) * 2003-07-16 2005-01-20 Pkware, Inc. Method for strongly encrypting .ZIP files

Patent Citations (4)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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