In the process of commodity circulation,forged and fake products have brought serious damages.The emergence of security codes have made this process much safer,but traditional security codes have some defects,for example,laser security code and special ink security code have a low technical barrier,they are easy to be faked,gravure security code and RFID security code have excessive cost,and telephone security code is not reliable due to the unsafe telecommunication system in our country.Thus the dot matrix security code was created,which is better than the traditional ones,its high density of dot matrix endows it a character of four-time attenuation,copying this code is hard for criminals.But there are some security defects in dot matrix security code,it is necessary to enhance its security property.In this paper we studied in three fields and acquired innovation: establishing self-defining encoding solution;encrypting the encoded content by chaotic encryption algorithm;establishing a reliable security code system.In this paper we designed a self-defining encoding solution.We remapped the key-value pairs of alphabet-number table used in the original dot matrix security code,meanwhile we designed a new type of data unit construct,customers are able to choose different mapping mode and data unit construct on demand.With the combination of these two methods,the difficulty of cracking the code has been highly increased.In this paper we designed a chaotic encryption algorithm,which is used to encrypt the encoded data and improves the data security.The chaotic algorithm designed in this paper is based on Logistic mapping,we established three different chaotic sequences by three different pairs of initial value0 x and multiplication parameter ?,these sequences were used in the three rounds of confusion and diffusion processes.This algorithm made fast and isometric encryption possible,and saved code area.Then we conducted several tests on this algorithm from four aspects: the sensibility of secrete key;the ability of resisting the brute force attack and differential attack;the randomness of encrypted results.The experimental consequence showed that the chaotic encryption algorithm was reasonable and valid.Based on the self-defining encoding solution and chaotic encryption algorithm,we constructed a practical dot matrix security code system,which consisted of encoding and decoding system,as well as security verification system.Encoding system was based on java swing,and responsible for accepting data inputted by users,it will encode and encrypt input information with chaotic encryption algorithm,and eventually produced code images.Decoding system was based on android app,it shot the code image and executed a sequence of image processions,divided and scanned all the data units so as to get the encrypted content,and delivered such contents to the verification system;Security verification system relied on a My Sql database,which was responsible for accepting the content from decoding system,it was designed to decrypt the information,and consult the database using this information,according to the result this system will tell the users whether this security code has been consulted or not.Then we run the system to verify its function,the consequence showed that our system had implemented all the prospective functions,and the performance also filled the bill basically,and its practicability was preferable. |