[go: up one dir, main page]

CN110008658A - A kind of code encryption method and system supervised - Google Patents

A kind of code encryption method and system supervised Download PDF

Info

Publication number
CN110008658A
CN110008658A CN201910217006.7A CN201910217006A CN110008658A CN 110008658 A CN110008658 A CN 110008658A CN 201910217006 A CN201910217006 A CN 201910217006A CN 110008658 A CN110008658 A CN 110008658A
Authority
CN
China
Prior art keywords
code
password
encrypted
original
encryption
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
CN201910217006.7A
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.)
Shenzhen Dianmao Technology Co Ltd
Original Assignee
Shenzhen Dianmao Technology 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 Shenzhen Dianmao Technology Co Ltd filed Critical Shenzhen Dianmao Technology Co Ltd
Priority to CN201910217006.7A priority Critical patent/CN110008658A/en
Publication of CN110008658A publication Critical patent/CN110008658A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/12Protecting executable software
    • G06F21/121Restricting unauthorised execution of programs
    • G06F21/125Restricting unauthorised execution of programs by manipulating the program code, e.g. source code, compiled code, interpreted code, machine code

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Technology Law (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Storage Device Security (AREA)

Abstract

The present invention discloses a kind of code encryption method and system that can be supervised, wherein, code encryption method is comprising steps of A, client generate original password, and original password is encrypted to obtain Crypted password using built-in public key, source code is encrypted using original password to obtain encrypted code, Crypted password and encrypted code are uploaded onto the server;B, it when server, which receives client, obtains the request of source code, is decrypted to obtain original password using private key pair encryption password, encrypted code and original password is handed down to client, wherein the private key and public key are the key of a pair of of asymmetric encryption;C, client is decrypted encrypted code using original password, obtains source code.

Description

A kind of code encryption method and system supervised
Technical field
The present invention relates to code encryption fields, more particularly to a kind of code encryption method and system that can be supervised.
Background technique
In some scenarios, it needs the code after the source code of user's output and its compiling while storing.For the ease of Management generally can be stored as two parts two parts of code storages into a file.But it can bring about one in this way and ask Topic, then when code distribution to terminal user, it is original only to need to distribute the code after compiling, because can keep away in this way Exempt from terminal user and touches more sensitive source code.But once two parts of codes are merged, terminal user will obtain simultaneously Two parts of codes, this is just likely to that code is caused to leak.
In response to this, in general there are following several solutions:
1, the code after source code and compiling is stored respectively, and only the code distribution after compiling to terminal user, This method can fundamentally solve the problems, such as that code is divulged a secret, but have a disadvantage in that being stored separately the pipe for being not easy to code Reason.
2, before user's upload code, using symmetric encipherment algorithm encrypted source code, this method can solve safety problem, Code leakage can perfectly be prevented.However need that unique key is separately provided for every a source code, increase a whole set of system The complexity of system, and key needs to be stored in server-side and code file is kept completely separate, and will result in code and key in this way Managerial problem.
3, before user's upload code, using the public key encryption source code of rivest, shamir, adelman, because having selected asymmetric Encryption Algorithm, encryption key and decruption key difference, it is possible to public key needed for encryption be disclosed, user directly uses public key Encrypted code is only decrypted with identical private key in this way, avoids the problem of management of key and code.But it is close due to decrypting Key is identical, when being transmitted further to the source code of source code author decryption their own output, there is the possibility being intercepted, once it is intercepted, The source code that other people can be decrypted still remains source code and divulges a secret problem.
Therefore, the existing technology needs to be improved and developed.
Summary of the invention
In view of above-mentioned deficiencies of the prior art, the purpose of the present invention is to provide the code encryption method that can supervise of one kind and System, it is intended to solve the problems such as code administration is inconvenient and safety is not high.
Technical scheme is as follows:
A kind of code encryption method supervised, wherein comprising steps of
A, client generates original password, and is encrypted to obtain Crypted password to original password using built-in public key, Source code is encrypted using original password to obtain encrypted code, Crypted password and encrypted code are uploaded onto the server;
B, it when server, which receives client, obtains the request of source code, is decrypted using private key pair encryption password To original password, encrypted code and original password are handed down to client, added wherein the private key and public key are that a pair is asymmetric Close key;
C, client is decrypted encrypted code using original password, obtains source code.
The code encryption method supervised, wherein the step A further include:
Source code is compiled in advance to obtain compiled code, and compiled code is uploaded onto the server together.
The code encryption method supervised, wherein the original password is random cipher.
The code encryption method supervised, wherein in the step A, by compiled code, Crypted password and add Close code is bundled in a file and uploads onto the server.
The code encryption method supervised, wherein in the step A, by symmetric encipherment algorithm to source code It is encrypted to obtain encrypted code.
The code encryption method supervised, wherein the step B further include:
When receiving the administrative instructions of administrative staff, it is decrypted to obtain original password using private key pair encryption password, Encrypted code is decrypted using original password, obtains source code.
A kind of code encryption system supervised, wherein including client and server;
The client generates original password, and using built-in public key original password is encrypted to obtain encrypt it is close Code, encrypts source code using original password to obtain encrypted code, Crypted password and encrypted code is uploaded to service Device;And encrypted code is decrypted using original password, obtain source code;
When the server receives the request of client acquisition source code, it is decrypted using private key pair encryption password To original password, encrypted code and original password are handed down to client, added wherein the private key and public key are that a pair is asymmetric Close key.
The code encryption system supervised, wherein the original password is random cipher.
The code encryption system supervised, wherein source code is compiled to obtain compiled code in advance, and will Compiled code is uploaded onto the server together.
The code encryption system supervised, wherein source code is encrypted to obtain by symmetric encipherment algorithm Encrypted code.
The utility model has the advantages that in the present invention, since code and password are all encryptions, so do not have that code is leaked asks Topic.And the administrative staff for possessing server permission then can be used the Crypted password that private key decrypts any works, and with password solution Close works, to realize the function that can be supervised.
Detailed description of the invention
Fig. 1 is the flow chart for the code encryption method preferred embodiment that one kind of the present invention can supervise.
Fig. 2 provides a kind of structural block diagram of code encryption system preferred embodiment that can be supervised for the present invention.
Specific embodiment
The present invention provides a kind of code encryption method and system that can be supervised, for make the purpose of the present invention, technical solution and Effect is clearer, clear, and the present invention is described in more detail below.It should be appreciated that specific embodiment described herein It is only used to explain the present invention, be not intended to limit the present invention.
Referring to Fig. 1, Fig. 1 is the flow chart for the code encryption method preferred embodiment that one kind of the present invention can supervise, such as scheme It is shown comprising step:
S1, client generate original password, and are encrypted to obtain Crypted password to original password using built-in public key, Source code is encrypted using original password to obtain encrypted code, Crypted password and encrypted code are uploaded onto the server;
S2, when server receive client obtain source code request when, be decrypted using private key pair encryption password Original password is obtained, encrypted code and original password are handed down to client, wherein the private key is a pair of asymmetric with public key The key of encryption;
S3, client are decrypted encrypted code using original password, obtain source code.
In the present invention, terminal user can not decrypted code, and code authors can from server obtain original password Encrypted code is decrypted, and can not remove to decrypt other people works by the original password;Simultaneously administrative staff can directly from Source code is decrypted in code file, is not necessarily to decruption key, is supervised convenient for code.
Further, the step S1 further include:
Source code is compiled in advance to obtain compiled code, and compiled code is uploaded onto the server together.In this way may be used The compiled code after the source code of user's output and its compiling to be stored simultaneously.
Further, in the step S1, compiled code, Crypted password and encrypted code are bundled in a file simultaneously It uploads onto the server.That is, compiled code, encrypted code are bundled to together in a file simultaneously, it in this way can be square Just it manages, simultaneously because being encrypted to source code, so user can not touch more sensitive source code, only requests By just can get original password, encrypted code can be just decrypted in this way, ensures that the safety of source code.
Further, the original password is random cipher.I.e. original password is by client (source code author client) Random to generate, other users only request just obtain the random cipher after passing through.
Further, in the step S1, source code is encrypted by symmetric encipherment algorithm to obtain encrypted code.Exist When being encrypted using original password to source code, specifically encrypted using symmetric encipherment algorithm, that is to say, that source code It is all original password used in encryption and decryption.
In the present invention, the source code of author's output is encrypted and decrypted using symmetric encipherment algorithm.In addition to using Except symmetric encipherment algorithm, the present invention additionally uses rivest, shamir, adelman.Specifically, rivest, shamir, adelman is used to original Beginning password is encrypted and decrypted.Wherein, public key used in rivest, shamir, adelman is used to encrypt original password, non- Private key used in symmetric encipherment algorithm is used to that encrypted original password (Crypted password) is decrypted.
Public key therein is built in client, and private key therein is stored in server.In the present invention, due to source generation Code and original password are all encryptions, so not having the problem of code is leaked, improve safety, while also facilitating generation Code management.
Further, the step S2 further include:
When receiving the administrative instructions of administrative staff, it is decrypted to obtain original password using private key pair encryption password, Encrypted code is decrypted using original password, obtains source code.
In the present invention, the administrative staff for possessing server permission then can be used private key and decrypt any works (source code) Crypted password, and works are decrypted with the original password that decryption obtains, the function that can be supervised is realized in this approach.
The present invention also provides the code encryption systems that one kind can supervise, as shown in Figure 2 comprising client 100 and service Device 200;
The client 100 generates original password, and is encrypted using built-in public key to original password Password encrypts source code using original password to obtain encrypted code, and Crypted password and encrypted code are uploaded to clothes Business device 200;And encrypted code is decrypted using original password, obtain source code;
When the server 200 receives the request of client acquisition source code, solved using private key pair encryption password It is close to obtain original password, encrypted code and original password are handed down to client 100, wherein the private key is a pair of non-with public key The key of symmetric cryptography.
Further, the original password is random cipher.
Further, source code is compiled in advance to obtain compiled code, and compiled code is uploaded onto the server together 200。
Further, source code is encrypted by symmetric encipherment algorithm to obtain encrypted code.
It has been described in detail in the code encryption method of particular technique details in front about above system, so it will not be repeated.
In conclusion in the present invention, since code and password are all encryptions, so do not have that code is leaked asks Topic.And the administrative staff for possessing server permission then can be used the Crypted password that private key decrypts any works, and with password solution Close works, to realize the function that can be supervised.
It should be understood that the application of the present invention is not limited to the above for those of ordinary skills can With improvement or transformation based on the above description, all these modifications and variations all should belong to the guarantor of appended claims of the present invention Protect range.

Claims (10)

1. the code encryption method that one kind can supervise, which is characterized in that comprising steps of
A, client generates original password, and is encrypted to obtain Crypted password to original password using built-in public key, uses Original password encrypts source code to obtain encrypted code, and Crypted password and encrypted code are uploaded onto the server;
B, it when server, which receives client, obtains the request of source code, is decrypted to obtain original using private key pair encryption password Encrypted code and original password are handed down to client by beginning password, wherein the private key and public key are a pair of of asymmetric encryption Key;
C, client is decrypted encrypted code using original password, obtains source code.
2. the code encryption method according to claim 1 supervised, which is characterized in that the step A further include:
Source code is compiled in advance to obtain compiled code, and compiled code is uploaded onto the server together.
3. the code encryption method according to claim 1 supervised, which is characterized in that the original password is with secret Code.
4. the code encryption method according to claim 2 supervised, which is characterized in that in the step A, generation will be compiled Code, Crypted password and encrypted code are bundled in a file and upload onto the server.
5. the code encryption method according to claim 1 supervised, which is characterized in that in the step A, by symmetrical Encryption Algorithm encrypts source code to obtain encrypted code.
6. the code encryption method according to claim 1 supervised, which is characterized in that the step B further include:
It when receiving the administrative instructions of administrative staff, is decrypted to obtain original password using private key pair encryption password, use Encrypted code is decrypted in original password, obtains source code.
7. the code encryption system that one kind can supervise, which is characterized in that including client and server;
The client generates original password, and is encrypted to obtain Crypted password to original password using built-in public key, makes Source code is encrypted with original password to obtain encrypted code, Crypted password and encrypted code are uploaded onto the server;And Encrypted code is decrypted using original password, obtains source code;
When the server receives the request of client acquisition source code, it is decrypted to obtain original using private key pair encryption password Encrypted code and original password are handed down to client by beginning password, wherein the private key and public key are a pair of of asymmetric encryption Key.
8. the code encryption system according to claim 7 supervised, which is characterized in that the original password is with secret Code.
9. the code encryption system according to claim 7 supervised, which is characterized in that be compiled in advance to source code Compiled code is obtained, and compiled code is uploaded onto the server together.
10. the code encryption system according to claim 7 supervised, which is characterized in that pass through symmetric encipherment algorithm pair Source code is encrypted to obtain encrypted code.
CN201910217006.7A 2019-03-21 2019-03-21 A kind of code encryption method and system supervised Pending CN110008658A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910217006.7A CN110008658A (en) 2019-03-21 2019-03-21 A kind of code encryption method and system supervised

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910217006.7A CN110008658A (en) 2019-03-21 2019-03-21 A kind of code encryption method and system supervised

Publications (1)

Publication Number Publication Date
CN110008658A true CN110008658A (en) 2019-07-12

Family

ID=67167697

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910217006.7A Pending CN110008658A (en) 2019-03-21 2019-03-21 A kind of code encryption method and system supervised

Country Status (1)

Country Link
CN (1) CN110008658A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110519278A (en) * 2019-08-29 2019-11-29 重庆市筑智建信息技术有限公司 Data security authentication method and system based on BIM
CN117909941A (en) * 2024-03-20 2024-04-19 建信金融科技有限责任公司 Code file processing method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008178054A (en) * 2007-01-22 2008-07-31 Koji Yoshinuma Monitoring system for protecting privacy
US20140143548A1 (en) * 2012-11-22 2014-05-22 Donglin Wang Security control method of network storage
US20150113279A1 (en) * 2011-04-19 2015-04-23 Invenia As Method for secure storing and sharing of a data file via a computer communication network and open cloud services
US20160357980A1 (en) * 2015-06-04 2016-12-08 Microsoft Technology Licensing, Llc Secure storage and sharing of data by hybrid encryption using predefined schema

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008178054A (en) * 2007-01-22 2008-07-31 Koji Yoshinuma Monitoring system for protecting privacy
US20150113279A1 (en) * 2011-04-19 2015-04-23 Invenia As Method for secure storing and sharing of a data file via a computer communication network and open cloud services
US20140143548A1 (en) * 2012-11-22 2014-05-22 Donglin Wang Security control method of network storage
US20160357980A1 (en) * 2015-06-04 2016-12-08 Microsoft Technology Licensing, Llc Secure storage and sharing of data by hybrid encryption using predefined schema

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110519278A (en) * 2019-08-29 2019-11-29 重庆市筑智建信息技术有限公司 Data security authentication method and system based on BIM
CN110519278B (en) * 2019-08-29 2021-07-20 重庆市筑智建信息技术有限公司 Data security authentication method and system based on BIM
CN117909941A (en) * 2024-03-20 2024-04-19 建信金融科技有限责任公司 Code file processing method and device
CN117909941B (en) * 2024-03-20 2024-08-23 建信金融科技有限责任公司 Code file processing method and device

Similar Documents

Publication Publication Date Title
CN104486315B (en) A kind of revocable key outsourcing decryption method based on contents attribute
CN109495274B (en) Decentralized intelligent lock electronic key distribution method and system
CN104113408B (en) It is a kind of realize the revocation of timely user property based on ciphertext policy ABE encryption method
CN102624522B (en) A kind of key encryption method based on file attribute
US9197410B2 (en) Key management system
CN103957109B (en) A kind of cloud data-privacy protects safe re-encryption method
CN103618607B (en) A kind of Security Data Transmission and key exchange method
CN105100083B (en) An attribute-based encryption method and system that protects privacy and supports user revocation
CN106789039B (en) A method of storing confidential data
CN107181584B (en) Asymmetric completely homomorphic encryption and key replacement and ciphertext delivery method thereof
CN108809936B (en) A kind of intelligent mobile terminal identity verification method based on hybrid encryption algorithm and its implementation system
WO2017033843A1 (en) Searchable cryptograph processing system
KR20210058313A (en) Data access control method and system using attribute-based password for secure and efficient data sharing in cloud environment
CN109040109B (en) Data transaction method and system based on key management mechanism
CN110008658A (en) A kind of code encryption method and system supervised
CN109726584B (en) Cloud database key management system
KR102385328B1 (en) Method and System of Digital Rights Management
CN118898081B (en) File encryption method and system based on CP-ABE and USBKEY
CN103746993A (en) Cloud storage data encryption method with client-controlled decryption private key and server-performed encryption and decryption
JP2004048479A (en) Encryption key management method for shared encrypted information
WO2013163861A1 (en) Method, device and system for proxy transformation
CN108055127A (en) It calculates and supports heat update Encryption Algorithm and key data encryption method with data separating
CN107800704A (en) It is adapted to the data ciphering method and system of light-duty synchronous phasor measurement instrument communication
CN108462677A (en) A kind of file encrypting method and system
US20240078543A1 (en) Payment service implementation methods and apparatuses

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: 20190712