A method, device, equipment and storage medium for transmitting image files

By pairing encryption tools with containerized devices during image file transfer, encrypting and transmitting mirror files offline, the problem of content leakage and tampering of mirror files during transmission in private cloud or LAN is solved, and transmission security is improved.

CN113900772BActive Publication Date: 2025-02-18CETC CYBERSPACE SECURITY TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111199051.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-14
Publication Date
2025-02-18
Estimated Expiration
2041-10-14

AI Technical Summary

Technical Problem

In private cloud or LAN application scenarios, mirror files are prone to content leakage or tampering during offline transmission, resulting in insufficient security.

Method used

By connecting and pairing the local encryption tool with the containerized device on the receiving end, the target image file is encrypted using the pairing encryption tool to generate a file package containing the encrypted image file, and copy the file package offline to the receiving end, and the receiving end Use the paired containerized device to decrypt it to obtain the target image file.

Benefits of technology

Improve the security of mirrored offline transmission and prevent the leakage and tampering of mirrored content during transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113900772B_ABST
    Figure CN113900772B_ABST
Patent Text Reader

Abstract

The present application discloses a method, apparatus, device and storage medium for image file transmission. The method includes: connecting a local encryption tool to a containerized device at a receiving end and performing a pairing operation to obtain a paired encryption tool storing a public key of a receiver and a paired containerized device storing a public key of a sender; using the paired encryption tool to encrypt a target image file to obtain a file package containing an encrypted image file; and copying the file package offline to the receiving end so that the receiving end can use the paired containerized device to decrypt the encrypted image file to obtain the target image file. It can be seen that by pairing the encryption tool with the containerized device, encrypting using the paired encryption tool, and decrypting by the paired containerized device at the receiving end, the problems of image content leakage and tampering in the image offline transmission scenario are solved, and the security of image offline transmission is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information security technology, and in particular to a mirror file transmission method, device, equipment and storage medium. Background Art

[0002] At present, container technology not only provides isolation of the application running environment, but also shields the differences and complexity of the underlying infrastructure, greatly improving the convenience of deployment. In the existing technology, the commonly used solution for image confidentiality protection and inspection is to establish a trusted HTTPS link with the warehouse, and the warehouse signs the image after submission. In a single cloud environment, this process is a closed-loop process. The image is pulled when it is deployed, and the image submission and deployment use the same warehouse. However, in some private cloud or LAN application scenarios, development and actual operation are often not on the same reachable network. Images are often sent to customers offline through storage media such as CDs, and then customers read offline images from the media. Compared with traditional Internet scenarios, new risks are often introduced, that is, the image may be leaked or tampered with during transmission. Summary of the invention

[0003] In view of this, the purpose of the present invention is to provide a method, device, equipment and medium for transmitting an image file, which can improve the security of offline image transmission. The specific scheme is as follows:

[0004] In a first aspect, the present application discloses a method for transmitting an image file, comprising:

[0005] Connecting the local encryption tool to the containerized device at the receiving end and performing a pairing operation to obtain a paired encryption tool storing the public key of the receiver and a paired containerized device storing the public key of the sender;

[0006] Encrypting the target image file using the paired encryption tool to obtain a file package containing the encrypted image file;

[0007] The file package is copied offline to the receiving end, so that the receiving end uses the paired containerized device to decrypt the encrypted image file to obtain the target image file.

[0008] Optionally, the connecting and pairing of the local encryption tool with the containerized device at the receiving end includes:

[0009] Sending a pairing request and a sender public key to the containerized device through the encryption tool so that the containerized device stores the sender public key;

[0010] A receiver public key fed back by the containerized device after obtaining the pairing application is received, and the receiver public key is saved.

[0011] Optionally, the using the post-pairing encryption tool to encrypt the target image file includes:

[0012] generating a symmetric key using the paired encryption tool;

[0013] Encrypting the target image file according to the symmetric key to obtain the encrypted image file;

[0014] The symmetric key is encrypted using the recipient's public key to obtain a digital envelope.

[0015] Optionally, the receiving end decrypts the encrypted image file by using the paired containerized device, including:

[0016] The digital envelope is decrypted using the local recipient private key to obtain the symmetric key, and then the encrypted image file is decrypted using the symmetric key to obtain the target image file.

[0017] Optionally, the step of encrypting the target image file by using the post-pairing encryption tool further includes:

[0018] Generate an image digest using a hash function based on the encrypted image file;

[0019] The image summary is encrypted using the local sender's private key to obtain a digital signature.

[0020] Optionally, before decrypting the digital envelope using the local recipient private key, the method further includes:

[0021] Decrypting the digital signature using the sender's public key to obtain a mirror image summary;

[0022] Generate an image digest to be verified based on the encrypted image file using the hash function;

[0023] The mirror image digest is compared with the mirror image digest to be verified, and after the comparison result is the same, the step of decrypting the digital envelope using the local recipient private key is initiated.

[0024] Optionally, the offline copying of the file package to the receiving end includes:

[0025] The encrypted image file, the digital envelope and the digital signature are copied offline to the target network where the receiving end is located through a storage device.

[0026] In a second aspect, the present application discloses a mirror file transmission device, comprising:

[0027] A pairing module, used to connect the local encryption tool with the containerized device at the receiving end and perform a pairing operation to obtain a paired encryption tool storing the public key of the receiver and a paired containerized device storing the public key of the sender;

[0028] An encryption module, used to encrypt the target image file using the paired encryption tool to obtain a file package containing the encrypted image file;

[0029] The sending module is used to copy the file package offline to the receiving end, so that the receiving end uses the paired containerized device to decrypt the encrypted image file to obtain the target image file.

[0030] In a third aspect, the present application discloses an electronic device, comprising:

[0031] Memory, used to store computer programs;

[0032] The processor is used to execute the computer program to implement the aforementioned image file transmission method.

[0033] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein the computer program implements the aforementioned image file transmission method when executed by a processor.

[0034] In this application, a local encryption tool is connected to a containerized device at the receiving end and paired to obtain a paired encryption tool with a public key of the receiver and a paired containerized device with a public key of the sender; the paired encryption tool is used to encrypt the target image file to obtain a file package containing the encrypted image file; the file package is copied offline to the receiving end so that the receiving end can use the paired containerized device to decrypt the encrypted image file to obtain the target image file. It can be seen that by pairing the encryption tool with the containerized device, using the encryption tool to encrypt the target image file and then copying it offline to the receiving end, and decrypting it by the paired containerized device at the receiving end, the problem of image content leakage and tampering in the image offline transmission scenario is solved, and the security of image offline transmission is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0036] Figure 1A flow chart of an image file transmission method provided by this application;

[0037] Figure 2 A specific encryption tool and containerized device pairing flow chart provided for this application;

[0038] Figure 3 A schematic diagram of a specific image file transmission environment provided for this application;

[0039] Figure 4 A specific image file encryption and decryption flow chart provided for this application;

[0040] Figure 5 A schematic diagram of the structure of an image file transmission device provided by this application;

[0041] Figure 6 A structural diagram of an electronic device provided for this application. DETAILED DESCRIPTION

[0042] In the prior art, in some private cloud or LAN application scenarios, development and actual operation are often not on the same reachable network. Images are often sent to customers offline through storage media such as CDs, and then customers read offline images from the media. Compared with traditional Internet scenarios, new risks are often introduced, that is, the image may be leaked or tampered with during transmission. In order to overcome the above technical problems, the present application proposes a method for transmitting image files, which can improve the security of offline image transmission.

[0043] The present application discloses a method for transmitting an image file. Figure 1 As shown, the method may include the following steps:

[0044] Step S11: Connect the local encryption tool to the containerized device at the receiving end and perform a pairing operation to obtain a paired encryption tool storing the receiver's public key and a paired containerized device storing the sender's public key.

[0045] In this embodiment, the encryption tool at the image file sending end is first paired with the containerized device at the receiving end, and after pairing, a paired encryption tool storing the public key of the receiver and a paired containerized device storing the public key of the sender are obtained. The sending end may be a research and development end, i.e., a development environment, and the receiving end may be a deployment end, i.e., a production environment.

[0046] In this embodiment, the connecting of the local encryption tool with the containerized device at the receiving end and the pairing operation may include: sending a pairing application and a sender public key to the containerized device through the encryption tool so that the containerized device saves the sender public key; receiving the receiver public key fed back by the containerized device after obtaining the pairing application, and saving the receiver public key. Figure 2 As shown, the encryption tool that receives the sender's public key sends a pairing request to the containerized device, and at the same time sends the sender's public key, so that the containerized device saves the sender's public key and feeds back the recipient's public key, so as to finally obtain the paired encryption tool with the recipient's public key and the paired containerized device with the sender's public key.

[0047] In this embodiment, the encryption tool can be downloaded offline from the containerized device at the receiving end, that is, Figure 3 As shown, the encryption tool is downloaded offline from the containerized device in the production environment, and then the sender's public key is entered into the encryption tool. The encryption tool is then paired with the containerized device to obtain the paired encryption tool that stores the receiver's public key. The paired encryption tool is then copied to the R&D end through a storage device such as a CD.

[0048] Step S12: Encrypt the target image file using the paired encryption tool to obtain a file package containing the encrypted image file.

[0049] In this embodiment, after the encryption tool is paired with the containerized device, the paired encryption tool is used to encrypt the target image file to obtain a file package containing the encrypted image file. That is, after the image is produced at the R&D end, an offline tar package is exported, and then the encryption tool is used to encrypt and sign it.

[0050] In this embodiment, the use of the paired encryption tool to encrypt the target image file may include: using the paired encryption tool to generate a symmetric key; encrypting the target image file according to the symmetric key to obtain the encrypted image file; and encrypting the symmetric key using the receiver's public key to obtain a digital envelope. That is, the encryption tool first generates a symmetric key, then encrypts the target image file with the symmetric key, and at the same time encrypts the symmetric key with the receiver's public key, and uses the encrypted symmetric key as the digital envelope.

[0051] In this embodiment, the use of the paired encryption tool to encrypt the target image file may also include: generating an image digest based on the encrypted image file using a hash function; and encrypting the image digest using a local sender private key to obtain a digital signature. It is understandable that, for example Figure 4As shown, in order to verify the accuracy of the file and detect whether the file has been tampered with, a hash function can be used to generate an image summary of the encrypted image file, and then the image is encrypted with the local sender's private key, and the encrypted image summary is used as a digital signature; so that the receiving end can verify the signature based on the digital signature.

[0052] Step S13: copying the file package offline to the receiving end, so that the receiving end uses the paired containerized device to decrypt the encrypted image file to obtain the target image file.

[0053] In this embodiment, the offline copying of the file package to the receiving end may include: offline copying the encrypted image file, the digital envelope, and the digital signature to the target network where the receiving end is located through a storage device. For example, the encrypted image file, the digital signature, and the digital envelope are copied to the target network where the containerized device is located through an optical disk for use.

[0054] In this embodiment, the receiving end uses the paired containerized device to decrypt the encrypted image file, which may include: using the local recipient private key to decrypt the digital envelope to obtain the symmetric key, and then using the symmetric key to decrypt the encrypted image file to obtain the target image file.

[0055] In this embodiment, before using the local recipient private key to decrypt the digital envelope, it may also include: using the sender public key to decrypt the digital signature to obtain an image digest; using the hash function to generate an image digest to be verified based on the encrypted image file; comparing the image digest with the image digest to be verified, and after the comparison result is the same, starting the step of decrypting the digital envelope using the local recipient private key. That is, if the received document contains a digital signature, the signature is verified first, and the digital envelope and the encrypted image file are decrypted after verification and matching, thereby detecting whether the image file has been tampered with. For example Figure 4 As shown in the figure, the containerized device submits the image to the containerized device through the RESTful interface. The containerized device removes the digital signature and decrypts it with the sender's public key provided when the device is paired to obtain the image summary. A hash function is used in the device to generate a summary of the encrypted image, which is compared with the summary obtained from the digital signature to determine whether the digital signature is correct. If the signature is correct, the digital envelope is decrypted by the local recipient's private key to obtain the symmetric key, and then the encrypted image file is decrypted with the symmetric key to obtain the decrypted image.

[0056] As can be seen from the above, in this embodiment, the local encryption tool is connected to the containerized device at the receiving end and a pairing operation is performed to obtain a paired encryption tool storing the public key of the receiver and a paired containerized device storing the public key of the sender; the paired encryption tool is used to encrypt the target image file to obtain a file package containing the encrypted image file; the file package is copied offline to the receiving end so that the receiving end can use the paired containerized device to decrypt the encrypted image file to obtain the target image file. It can be seen that by pairing the encryption tool with the containerized device, using the encryption tool to encrypt the target image file and then copying it offline to the receiving end, and decrypting it by the paired containerized device at the receiving end, the problem of image content leakage and tampering in the image offline transmission scenario is solved, and the security of image offline transmission is improved.

[0057] Correspondingly, the embodiment of the present application also discloses a mirror file transmission device, see Figure 5 As shown, the device comprises:

[0058] A pairing module 11 is used to connect the local encryption tool with the containerized device at the receiving end and perform a pairing operation to obtain a paired encryption tool storing the public key of the receiver and a paired containerized device storing the public key of the sender;

[0059] The encryption module 12 is used to encrypt the target image file using the paired encryption tool to obtain a file package containing the encrypted image file;

[0060] The sending module 13 is used to copy the file package offline to the receiving end, so that the receiving end uses the paired containerized device to decrypt the encrypted image file to obtain the target image file.

[0061] As can be seen from the above, in this embodiment, the local encryption tool is connected to the containerized device at the receiving end and a pairing operation is performed to obtain a paired encryption tool storing the public key of the receiver and a paired containerized device storing the public key of the sender; the paired encryption tool is used to encrypt the target image file to obtain a file package containing the encrypted image file; the file package is copied offline to the receiving end so that the receiving end can use the paired containerized device to decrypt the encrypted image file to obtain the target image file. It can be seen that by pairing the encryption tool with the containerized device, using the encryption tool to encrypt the target image file and then copying it offline to the receiving end, and decrypting it by the paired containerized device at the receiving end, the problem of image content leakage and tampering in the image offline transmission scenario is solved, and the security of image offline transmission is improved.

[0062] In some specific embodiments, the pairing module 11 may specifically include:

[0063] a request sending unit, configured to send a pairing application and a sender public key to the containerized device through the encryption tool, so that the containerized device stores the sender public key;

[0064] The receiver public key acquisition unit is used to receive the receiver public key fed back by the containerized device after acquiring the pairing application, and save the receiver public key.

[0065] In some specific embodiments, the encryption module 12 may specifically include:

[0066] A symmetric key generation unit, used to generate a symmetric key using the paired encryption tool;

[0067] An image file encryption unit, used for encrypting the target image file according to the symmetric key to obtain the encrypted image file;

[0068] The symmetric key encryption unit is used to encrypt the symmetric key using the recipient's public key to obtain a digital envelope.

[0069] In some specific embodiments, the encryption module 12 may specifically include:

[0070] An image summary generating unit, configured to generate an image summary based on the encrypted image file by using a hash function;

[0071] The image summary encryption unit is used to encrypt the image summary using the local sender private key to obtain a digital signature.

[0072] In some specific embodiments, the sending module 13 may specifically include:

[0073] The copy unit is used to copy the encrypted image file, the digital envelope and the digital signature offline to the target network where the receiving end is located through a storage device.

[0074] Furthermore, the present application also discloses an electronic device, see Figure 6 As shown, the contents in the drawings should not be considered as any limitation on the scope of use of the present application.

[0075] Figure 6 A schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the image file transmission method disclosed in any of the aforementioned embodiments.

[0076] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.

[0077] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon include an operating system 221, a computer program 222, and data 223 including a target image file, etc. The storage method can be temporary storage or permanent storage.

[0078] The operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device 20, so as to realize the operation and processing of the massive data 223 in the memory 22 by the processor 21, and it can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the image file transmission method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks.

[0079] Furthermore, an embodiment of the present application also discloses a computer storage medium, in which computer executable instructions are stored. When the computer executable instructions are loaded and executed by a processor, the steps of the image file transmission method disclosed in any of the aforementioned embodiments are implemented.

[0080] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0081] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0082] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0083] The above is a detailed introduction to the image file transmission method, device, equipment and medium provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A method for transmitting an image file, characterized in that: Applied to the sending end, including: Connecting a local encryption tool to a containerized device at a receiving end and performing a pairing operation to obtain a paired encryption tool storing a public key of the receiver and a paired containerized device storing a public key of the sender; the sender is in a development environment, the receiver is in a production environment, and the development environment and the production environment are not in the same reachable network; Encrypting the target image file using the paired encryption tool to obtain a file package containing the encrypted image file; Copying the file package offline to the receiving end, so that the receiving end uses the paired containerized device to decrypt the encrypted image file to obtain the target image file; Wherein, the step of encrypting the target image file by using the post-pairing encryption tool includes: generating a symmetric key using the paired encryption tool; Encrypting the target image file according to the symmetric key to obtain the encrypted image file; Encrypting the symmetric key using the recipient's public key to obtain a digital envelope; The receiving end decrypts the encrypted image file using the paired containerized device, including: The digital envelope is decrypted using the local recipient private key to obtain the symmetric key, and then the encrypted image file is decrypted using the symmetric key to obtain the target image file.

2. The image file transmission method according to claim 1, characterized in that: The operation of connecting the local encryption tool to the containerized device at the receiving end and performing pairing includes: Sending a pairing request and a sender public key to the containerized device through the encryption tool so that the containerized device stores the sender public key; A receiver public key fed back by the containerized device after obtaining the pairing application is received, and the receiver public key is saved.

3. The image file transmission method according to claim 1, characterized in that: The step of encrypting the target image file by using the post-pairing encryption tool further includes: Generate an image digest using a hash function based on the encrypted image file; The image summary is encrypted using the local sender's private key to obtain a digital signature.

4. The image file transmission method according to claim 3, characterized in that: Before decrypting the digital envelope using the local recipient's private key, the method further includes: Decrypting the digital signature using the sender's public key to obtain a mirror image summary; Generate an image digest to be verified based on the encrypted image file using the hash function; The mirror image digest is compared with the mirror image digest to be verified, and after the comparison result is the same, the step of decrypting the digital envelope using the local recipient private key is initiated.

5. The image file transmission method according to claim 4, characterized in that: The offline copying of the file package to the receiving end includes: The encrypted image file, the digital envelope and the digital signature are copied offline to the target network where the receiving end is located through a storage device.

6. A mirror file transmission device, characterized in that: include: A pairing module, used to connect the local encryption tool with the containerized device at the receiving end and perform a pairing operation to obtain a paired encryption tool storing the public key of the receiver and a paired containerized device storing the public key of the sender; The sending end is in a development environment, the receiving end is in a production environment, and the development environment and the production environment are not in the same reachable network; An encryption module, used to encrypt the target image file using the paired encryption tool to obtain a file package containing the encrypted image file; A sending module, used to copy the file package offline to the receiving end, so that the receiving end uses the paired containerized device to decrypt the encrypted image file to obtain the target image file; The encryption module is used to generate a symmetric key using the paired encryption tool; encrypt the target image file according to the symmetric key to obtain the encrypted image file; and encrypt the symmetric key using the recipient's public key to obtain a digital envelope; The sending module is used to decrypt the digital envelope using the local recipient's private key to obtain the symmetric key, and then decrypt the encrypted image file using the symmetric key to obtain the target image file.

7. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the image file transmission method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that: Used to store computer programs; wherein when the computer program is executed by a processor, the image file transmission method as described in any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Container instance creation method and device, electronic device and storage medium

    CN111562970A

  • Mirror image security processing method and device, mirror image security deployment method and device and storage medium

    CN112579112A