CN109902453A - A kind of software enciphering method - Google Patents

A kind of software enciphering method Download PDF

Info

Publication number
CN109902453A
CN109902453A CN201910134029.1A CN201910134029A CN109902453A CN 109902453 A CN109902453 A CN 109902453A CN 201910134029 A CN201910134029 A CN 201910134029A CN 109902453 A CN109902453 A CN 109902453A
Authority
CN
China
Prior art keywords
software
encryption data
program
control unit
storage chip
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.)
Pending
Application number
CN201910134029.1A
Other languages
Chinese (zh)
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.)
Shandong Power Equipment Co Ltd
Original Assignee
Shandong Power Equipment Co Ltd
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 Shandong Power Equipment Co Ltd filed Critical Shandong Power Equipment Co Ltd
Priority to CN201910134029.1A priority Critical patent/CN109902453A/en
Publication of CN109902453A publication Critical patent/CN109902453A/en
Pending legal-status Critical Current

Links

Landscapes

  • Storage Device Security (AREA)

Abstract

The present invention relates to a kind of software enciphering methods, encrypting stage and software operation decryption phase are prepared including software, characterized by the following steps: software prepares encrypting stage: calculating encryption data first by operation using inside plants program, calculated encryption data is stored in storage chip, inside plants program in MCU micro-control unit is wiped, formal application program is written;Software runs decryption phase: when runs software, MCU micro-control unit reads encryption data from storage chip, encryption data is calculated using algorithm, and arithmetic result is compared with the encryption data read out from storage chip, unanimously then application program continues to run comparison result, and the inconsistent then application program of comparison result is out of service.Usefulness of the present invention is: encrypted result can not be stored in storage equipment first, unique correspondence of encryption data and MCU micro-control unit make bootlegger can not piracy software, and it is more reliable relative to simple single machine cipher mode.

Description

A kind of software enciphering method
Technical field:
The present invention relates to a kind of software enciphering methods, belong to software encryption technique field.
Background technique:
Software is the set of a series of computer datas according to particular order tissue and instruction, and software in general is drawn It is divided into system software, application software and the middleware being interposed between the two, briefly software is exactly the collection that program adds document It is fit.Embedded software is just built-in operating system and developing instrument software in hardware, be widely used in national defence, industry control, The fields such as household, commercialization, office, medical treatment, such as our common mobile phone, palm PC, digital camera, set-top box, MP3 It is all the result for carrying out intellectualized reconstruction to traditional product with embedded software technology.
In recent years, with the extensive use of computer and Internet technology, software preparation field there has also been significant progress, Since software product has reproducibility, the features such as after product development almost without production cost, a possibility that product is by piracy Very high, bootlegger is not due to having development cost, and production cost is almost nil, it is possible to it is sold with low-down price, Serious loss is caused to software developer, simultaneously because it is pirate at low cost, the enthusiasm of software development is seriously affected, to skill The development of art adversely affects.The bootlegging of software and piracy in order to prevent protect the legitimate rights and interests of software developer, need Software is encrypted.
Currently, many anti-pirate softwares are to carry out single machine processing on the market, encrypted, is held using simple cryptographic means Easily cracked by bootlegger;Other is realized by way of hardware softdog, and softdog is inserted into soft on computer The security product of combination of hardware, it is internal that small-sized memory space is set for read-write, or single-chip microcontroller is set in inside, program is logical It crosses and carries out data exchange with softdog to carry out the detection and operation of legal program, softdog is equivalent to the key of program unlock, But the use of softdog increases the cost of software development, and repeatedly softdog is easily damaged and causes program that can not transport after plug Row.As " a kind of application software of mobile terminal encryption device and application have the mobile end of the device for Chinese utility model patent application End " (application number: 201520738581.9, publication date: 2016.04.20), the basic principle of encryption is: including memory module With encrypting module, the verify data and application needed when the application software operation in mobile terminal is pre-saved in memory module The supplemental characteristic for needing to call when software is run, encrypting module are used for the verify data and supplemental characteristic that will be saved in memory module It is encrypted;The verify data request and recall parameter data that the application software in mobile terminal is sent are received by USB interface It requests, and the encrypted verify data of encrypting module and supplemental characteristic is sent to the application software of mobile terminal.In this application Usb circuit i.e. can be regarded as cyberdog encryption equipment, the encrypting module, usb circuit and memory module must Palpus uses the single-chip microcontroller for a piece of model, including Encryption Algorithm software and memory space and USB interface, and software cryptography is come It says, reliability is up to standard, but increased USB device, interface and multi-disc single-chip microcontroller undoubtedly increase very big cost, and USB device Plug number excessively be easy to cause damage, if wherein the single-chip microcontroller of same model can not be purchased, the monolithic newly chosen after damaging Chance can not be decrypted since model is not inconsistent, and eventually led to software and be not available.
Problem of the existing technology is: software cryptography means are simple, easily stolen version;Majority is soft or hard using electronics dog class Part cipher mode, cost are excessive.
Summary of the invention:
The technical problems to be solved by the present invention are: providing a kind of software enciphering method, the reliability of software cryptography is improved And reduce software cryptography cost.
In order to solve the above-mentioned technical problem, the present invention is achieved by the following technical solutions: a kind of software enciphering method, Encrypting stage is prepared including software and software operation decryption phase, software cryptography work are specifically made of following two step: soft first Part calculates encryption data by operation when prepared by factory, using inside plants program first, and calculated encryption data is deposited It is stored in storage chip, and inside plants program in MCU micro-control unit is wiped, formal application program is written;Secondly, soft When part runs decryption phase runs software, MCU micro-control unit reads encryption data from storage chip, is calculated and is added using algorithm Ciphertext data, and arithmetic result is compared with the encryption data read out from storage chip, comparison result is unanimously then applied Program continues to run, and the inconsistent then application program of comparison result is out of service.It is described by MCU micro-control unit from storage chip The step of middle reading encryption data includes: by SoftSMI or to pass through BIOS plug-and-play feature function call or pass through in soft The disconnected reading realized to the reserved storage space, obtains encryption data in software;Wherein, it is realized by SoftSMI to storage The step of chip is read, and obtains encryption data is specifically: data are write to the I/O port of SoftSMI by the application program of software, SMI interrupt is triggered, central processing unit is made to switch to System Management Mode, the storage chip is carried out under System Management Mode Read-write obtains software cryptography data.
Preferably, a kind of software enciphering method for object be controller class embedded software, encryption data with it is embedding Enter formula software to be stored separately.
Preferably, the encryption data is stored in any one in described storage chip EEPROM, FLASH.
Preferably, every group encryption data of said write software and MCU micro-control unit are uniquely corresponding, each MCU micro-control The calculated encryption data of unit processed only has one group and, piracy different from other calculated encryption datas of MCU micro-control unit Copy encryption data is not normally functioning program.
Preferably, a kind of software enciphering method, program can not be generated encryption data when pirate copies, program can not It operates normally.
Preferably, program can not be generated encryption data when pirate copies, program is unable to operate normally.
Compared with prior art, usefulness of the present invention is:
1. since bootlegger is unable to get the encryption data that program is obtained by native codes operation, and can not be set in storage Encrypted result is stored first in standby, so pirate program is unable to run in the controller of its production.
2. Encryption Algorithm is obtained by program code operation itself, the category of comprehensively control chip own hardware equipment Property, calculated the result is that unique, i.e., it is different, institute that the two of same model, which control the calculated encryption data of chip, It is also different with the encryption data that the storage chip of each control stores first, even if program is cracked by bootlegger, due to The uniqueness of encryption data also results in bootlegger and uses pirate procedural difficulties heavy, hardly has the value for creating profit, Also pirate meaning is just lost.
3, more reliable relative to simple single machine cipher mode, external encryption hardware facility is not used, it is easy to use, it saves Cost.
Detailed description of the invention:
The following further describes the present invention with reference to the drawings.
Fig. 1 is that a kind of software of software enciphering method prepares encrypting stage flow chart;
Fig. 2 is a kind of software operation decryption phase flow chart of software enciphering method.
Specific embodiment:
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
A kind of method that the present invention devises software cryptography plays extraordinary protective effect to software product, makes soft Part is multiplied by pirate difficulty.The present invention be directed to controller class embedded software, using program encryption algorithm to program into Row calculates, and calculated result is stored in the storage equipment of controller, carries out encryption fortune to native codes in program operation process It calculates, is compared later in the operation result being first stored in storage equipment, the journey being currently running is judged according to comparing result Sequence whether by piracy come.If the program of operation is pirate program, operation is automatically exited from program.The software cryptography side Method, including software prepare encrypting stage and software operation decryption phase;The software prepares encrypting stage: using inside plants journey Sequence calculates encryption data by operation first, calculated encryption data is stored in storage chip, by MCU micro-control unit Interior inside plants program erasing, is written formal application program;The software runs decryption phase: when runs software, MCU microcontroller Unit reads encryption data from storage chip, calculates encryption data using algorithm, and by arithmetic result and from storage chip The encryption data read out compares, and unanimously then application program continues to run comparison result, and comparison result is inconsistent, applies Program is out of service.
Preferably, described the step of reading encryption data from storage chip by MCU micro-control unit includes: to pass through SoftSMI realizes the reading to the reserved storage space by BIOS plug-and-play feature function call or by traps It takes, obtains encryption data in software;Wherein, the step of reading to storage chip being realized by SoftSMI, obtaining encryption data Specifically: data being write to the I/O port of SoftSMI by the application program of software, SMI interrupt is triggered, switches central processing unit To System Management Mode, the storage chip is written and read under System Management Mode, obtains software cryptography data.
Further, the present invention is directed to controller class embedded software, and encryption data is stored separately with embedded software.
Further, encryption data is stored in any one in described storage chip EEPROM, FLASH.
Further, every group encryption data and the MCU micro-control unit that software is written are uniquely corresponding, each MCU microcontroller The calculated encryption data of unit only has one group and different from other calculated encryption datas of MCU micro-control unit, and piracy is copied Shellfish encryption data is not normally functioning program.
Encryption Algorithm of the invention is obtained by program code operation itself, comprehensively control chip own hardware equipment Attribute, calculated the result is that unique, i.e., it is different that the two of same model, which control the calculated encryption data of chip, , so the encryption data that the storage chip of each control stores first is also different, even if program is cracked by bootlegger, Due to the uniqueness of encryption data, also results in bootlegger and use pirate procedural difficulties heavy, hardly have and create profit Value also just loses pirate meaning.
It is more reliable relative to simple single machine cipher mode, external encryption hardware facility is not used, easy to use, saving is made Valence.
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment Intrinsic element.In the absence of more restrictions.By sentence " element limited including one ..., it is not excluded that There is also other identical elements in the process, method, article or apparatus that includes the element ".
It although an embodiment of the present invention has been shown and described, for the ordinary skill in the art, can be with A variety of variations, modification, replacement can be carried out to these embodiments without departing from the principles and spirit of the present invention by understanding And modification, the scope of the present invention is defined by the appended.

Claims (6)

1. a kind of software enciphering method, including software prepare encrypting stage and software operation decryption phase, it is characterised in that including Following steps:
Software prepares encrypting stage: encryption data is calculated first by operation using inside plants program, by calculated encryption Data are stored in storage chip, and inside plants program in MCU micro-control unit is wiped, formal application program is written;
Software runs decryption phase: when runs software, MCU micro-control unit reads encryption data from storage chip, using calculation Method calculates encryption data, and arithmetic result is compared with the encryption data read out from storage chip, comparison result one Then application program continues to run for cause, and the inconsistent then application program of comparison result is out of service.
2. a kind of software enciphering method according to claim 1, it is characterised in that: it is described by MCU micro-control unit from The step of encryption data is read in storage chip include: by SoftSMI or by BIOS plug-and-play feature function call or The reading to the reserved storage space is realized by traps, obtains encryption data in software;Wherein, pass through SoftSMI reality Now to the reading of storage chip, the step of obtaining encryption data, is specifically: by the application program of software to the end IO of SoftSMI Mouth writes data, triggers SMI interrupt, so that central processing unit is switched to System Management Mode, deposit under System Management Mode to described Storage chip is written and read, and obtains software cryptography data.
3. a kind of software enciphering method according to claim 1, it is characterised in that: it is directed to controller class embedded software, Encryption data is stored separately with embedded software.
4. a kind of software enciphering method according to claim 1, it is characterised in that: encryption data is stored in the storage core In any one in piece EEPROM, FLASH.
5. a kind of software enciphering method according to claim 1, it is characterised in that: be written every group encryption data of software with MCU micro-control unit uniquely corresponds to, and each calculated encryption data of MCU micro-control unit only has one group and micro- with other MCU The calculated encryption data of control unit is different, and pirate copies encryption data is not normally functioning program.
6. a kind of software enciphering method according to claim 1, it is characterised in that: program can not be generated when pirate copies Encryption data, program are unable to operate normally.
CN201910134029.1A 2019-02-22 2019-02-22 A kind of software enciphering method Pending CN109902453A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910134029.1A CN109902453A (en) 2019-02-22 2019-02-22 A kind of software enciphering method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910134029.1A CN109902453A (en) 2019-02-22 2019-02-22 A kind of software enciphering method

Publications (1)

Publication Number Publication Date
CN109902453A true CN109902453A (en) 2019-06-18

Family

ID=66945491

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910134029.1A Pending CN109902453A (en) 2019-02-22 2019-02-22 A kind of software enciphering method

Country Status (1)

Country Link
CN (1) CN109902453A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113656764A (en) * 2021-08-18 2021-11-16 天津津航计算技术研究所 Software encryption method under integrated optimization system
CN113865023A (en) * 2021-09-26 2021-12-31 青岛海信日立空调系统有限公司 Multi-split air conditioning system

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1584771A (en) * 2004-05-27 2005-02-23 深圳市宏宇新科技有限公司 Software encrypting method
CN102385671A (en) * 2010-09-02 2012-03-21 研祥智能科技股份有限公司 Method and system for encrypting software
CN103020495A (en) * 2012-12-17 2013-04-03 马驹 Embedded-type software anti-piracy encryption method
CN104268448A (en) * 2014-10-11 2015-01-07 中颖电子股份有限公司 Program code protection method for microprocessor adopting flash memory
CN205176854U (en) * 2015-09-22 2016-04-20 刘高平 Mobile terminal application software encryption device and applied mobile terminal who has device
CN105512517A (en) * 2015-11-25 2016-04-20 成都天奥测控技术有限公司 Embedded software encryption method
CN106055932A (en) * 2016-05-26 2016-10-26 东莞博力威电池有限公司 MCU program anti-plagiarizing method and system with Boost loader function
CN107590368A (en) * 2017-08-25 2018-01-16 济南中维世纪科技有限公司 The method of embedded device program anti-copy
CN108171018A (en) * 2017-12-26 2018-06-15 广州路派电子科技有限公司 A kind of software cryptography of vehicle-mounted decoder and decryption method

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1584771A (en) * 2004-05-27 2005-02-23 深圳市宏宇新科技有限公司 Software encrypting method
CN102385671A (en) * 2010-09-02 2012-03-21 研祥智能科技股份有限公司 Method and system for encrypting software
CN103020495A (en) * 2012-12-17 2013-04-03 马驹 Embedded-type software anti-piracy encryption method
CN104268448A (en) * 2014-10-11 2015-01-07 中颖电子股份有限公司 Program code protection method for microprocessor adopting flash memory
CN205176854U (en) * 2015-09-22 2016-04-20 刘高平 Mobile terminal application software encryption device and applied mobile terminal who has device
CN105512517A (en) * 2015-11-25 2016-04-20 成都天奥测控技术有限公司 Embedded software encryption method
CN106055932A (en) * 2016-05-26 2016-10-26 东莞博力威电池有限公司 MCU program anti-plagiarizing method and system with Boost loader function
CN107590368A (en) * 2017-08-25 2018-01-16 济南中维世纪科技有限公司 The method of embedded device program anti-copy
CN108171018A (en) * 2017-12-26 2018-06-15 广州路派电子科技有限公司 A kind of software cryptography of vehicle-mounted decoder and decryption method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113656764A (en) * 2021-08-18 2021-11-16 天津津航计算技术研究所 Software encryption method under integrated optimization system
CN113656764B (en) * 2021-08-18 2024-05-14 天津津航计算技术研究所 Software encryption method under integrated optimization system
CN113865023A (en) * 2021-09-26 2021-12-31 青岛海信日立空调系统有限公司 Multi-split air conditioning system

Similar Documents

Publication Publication Date Title
CN102945355B (en) Fast Data Encipherment strategy based on sector map is deferred to
CN100449558C (en) Sleep protection
CN102855452B (en) Fast Data Encipherment strategy based on encryption chunk is deferred to
CN100437618C (en) Portable information safety device
US7272228B2 (en) System and method for securing code and ensuring proper execution using state-based encryption
CN101578608B (en) Methods and apparatuses for accessing content based on a session ticket
CN103488919B (en) A kind of guard method of executable program and device
CN1439129A (en) Embedded security device within a nonvolatile memory device
EP3044900A1 (en) Security processing unit with configurable access control
CN102385671A (en) Method and system for encrypting software
US10091213B2 (en) Systems and methods to provide secure storage
US20130283396A1 (en) System and method for limiting execution of software to authorized users
CN109902453A (en) A kind of software enciphering method
CN101447009A (en) Method, device and system for installing software
US8479014B1 (en) Symmetric key based secure microprocessor and its applications
CN111767553B (en) Data encryption and decryption method, MCU, electronic equipment and readable storage medium
CN104361280B (en) A kind of method realizing carrying out authentic authentication to USB storage device by SMI interrupt
KR101043255B1 (en) Usb hub device for providing datasecurity and method for providing datasecurity using the same
CN107085900B (en) Data processing method, device, system and POS terminal
CN107330318A (en) A kind of binding encryption method of digital signal panel card and its debugging system
WO2019184741A1 (en) Application program information storing method and apparatus, and application program information processing method and apparatus
JP2009169868A (en) Storage area access device and method for accessing storage area
CN101617318A (en) Be used for method and apparatus that content and licence are linked
CN111698080B (en) Program file export and import method and device and multimedia playing box
CN103413098A (en) Method, system and device for hardware encryption

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20190618

RJ01 Rejection of invention patent application after publication