# Using Blockchain to Protect 3D Printing from Unauthorized Model Tampering
## 3 Demonstration and Discussion
``` contract threedpTrust{ uint256 constant SIGNATURES=5; address[] manager; string[] whiteHash; string[] fileHash; mapping(string => uint256) private signatureNum; mapping(string => bool) private hashExisted; mapping(string => bool) private hashIsWhite; mapping(string => mapping (address => bool)) private notVote; modifier onlyManager{ require(msg_sender == manager[0] || msg.sender == manager[1] || msg.sender == manager[2] || msg.sender == manager[3] || msg.sender == manager[4]); \(j\) modifier notExisted(string memory_fileHash){ require(hashExisted[_fileHash] == false); \(j\) constructor( address_firstManager, address_secondManager,... ){ manager[0] =_firstManager; manager[1] =_secondManager;... } function uploadHash(string memory_fileHash) public notExisted(_fileHash) returns(bool){ fileHash.push(_fileHash); signatureNum[_fileHash] = 0; hashExisted[_fileHash] = true; hashIsWhite[_fileHash] = false; return true; } function signHash(string memory_fileHash) public onlyManager returns(bool){ require(notVote[_fileHash][msg.sender] == false, \"You have already signed this file hash\"); notVote[_fileHash][msg.sender] = true; if (signatureNum[_fileHash] == 5){ whiteHash.push(_fileHash); hashIsWhite[_fileHash] = true; } else{ signatureNum[_fileHash] += 1; } return true; } function checkHash(string memory_fileHash) public view returns(bool){ return hashIsWhite[_fileHash];In our future work, we plan to expand the existing solution to ensure the reliability of 3D-printed products by combining digital fingerprints, physical anti-counterfeiting methods, and online printing together. Users can choose to print 3D drawings without direct contact with the original drawings. The formed product comes with an integrated label for tracking and recording the scanning data (number of times, time, scanning location, etc.) of the 3D-printed product, which will improve the credibility of 3D printing. The wide use of 3D printing has brought the possibility of cybercrime, especially invading 3D models to destroy the printed product during the additive manufacturing process. More and more enterprises have noticed this problem. General Electric stated in its patent application, \"If a replacement for an industrial asset can be produced by an additive manufacturing process, then any user of appropriately configured additive manufacturing equipment can replicate the part [36].\" Potential solutions to solve this problem (counterfeit and product quality degradation) may attract the attention of large manufacturing companies. Later, some obvious indicators may reflect changes from using blockchain technology. For example, infringement cases and models which are tampered with have been greatly reduced after using our method. In fact, blockchain can not only protect models for additive manufacturing but also will greatly save industrial maintenance costs. For example, an aircraft component provider, Moog, demonstrated an interesting case of using blockchain [37]. ST Aerospace purchased a digital model of an aircraft replacement part from Moog and printed the part at its facility in Singapore. The whole process was digital and the settlement was instantaneously completed via a smart contract on Microsoft's Azure blockchain. There is no doubt that the combination of blockchain and additive manufacturing has great potential. ## 4 Conclusions

In the field of additive manufacturing, a great deal of research has been conducted on developing new printing principles, process management, and equipment upgrades. However, extensive research on information security, license management, copyright protection, and proof of authenticity in additive manufacturing remain seriously insufficient. In particular, model data transmission dominates the security and risk management of the entire system. The security of drawings used for printing is very important and worthy of attention. This work shows how to protect 3D models from invading and prove the authenticity of the printed objects via blockchain. The \"fingerprint\" of a model is extracted by a hash algorithm.