CN108830095B - Data encryption and decryption method and device - Google Patents

Data encryption and decryption method and device Download PDF

Info

Publication number
CN108830095B
CN108830095B CN201810638504.4A CN201810638504A CN108830095B CN 108830095 B CN108830095 B CN 108830095B CN 201810638504 A CN201810638504 A CN 201810638504A CN 108830095 B CN108830095 B CN 108830095B
Authority
CN
China
Prior art keywords
encryption
target
program
decryption
scheduling
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.)
Active
Application number
CN201810638504.4A
Other languages
Chinese (zh)
Other versions
CN108830095A (en
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.)
Bank of China Ltd
Original Assignee
Bank of China 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 Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN201810638504.4A priority Critical patent/CN108830095B/en
Publication of CN108830095A publication Critical patent/CN108830095A/en
Application granted granted Critical
Publication of CN108830095B publication Critical patent/CN108830095B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Abstract

The application provides a data encryption and decryption method and device, based on a decomposition module for decomposing each complete encryption and decryption algorithm program into an encryption algorithm program and a decryption algorithm program and a development module for writing the encryption algorithm program and the decryption algorithm program, the method comprises the following steps: the encryption and decryption scheduling program is operated to execute the following steps: scheduling and operating an encryption and decryption marking program to judge whether target information needs to be encrypted or decrypted; if the target information needs to be encrypted, scheduling and operating a target encryption algorithm program to encrypt the target information by using a preset encryption algorithm to obtain ciphertext data; and if the target information needs to be decrypted, scheduling and operating a target decryption algorithm program so as to decrypt the target information by using a preset decryption algorithm to obtain plaintext data. According to the method, the development workload can be reduced, the development period can be shortened, the development efficiency can be improved, and the development cost can be reduced.

Description

Data encryption and decryption method and device
Technical Field
The present application relates to the field of information security technologies, and in particular, to a data encryption and decryption method and apparatus.
Background
With the development of banking business, the communication volume between each product system of a bank is increasing day by day, and the security of data interaction between systems is more and more important.
At present, a bank system generally adopts a data encryption mode to ensure the security of data interaction. Wherein, various encryption processing modes all need to independently develop a set of functional program to complete corresponding encryption processing. When part of data (such as encryption bit-complementing rules and decryption bit-complementing rules) or all data in a certain encryption processing mode needs to be updated, a set of complete functional programs needs to be re-developed, so that the development workload is large, the development period is long, the efficiency is low, and the development cost is high.
Disclosure of Invention
In order to solve the foregoing technical problems, embodiments of the present application provide a data encryption and decryption method and apparatus, so as to achieve the purposes of reducing development workload, shortening development cycle, improving development efficiency, and reducing development cost, and the technical solution is as follows:
a data encryption and decryption method is based on a decomposition module for decomposing each complete encryption and decryption algorithm program into an encryption algorithm program and a decryption algorithm program and a development module for writing the encryption algorithm program and the decryption algorithm program, and comprises the following steps:
the encryption and decryption scheduling program is operated to execute the following steps:
scheduling and operating an encryption and decryption marking program to judge whether target information needs to be encrypted or decrypted;
if the target information needs to be encrypted, scheduling and operating a target encryption algorithm program to encrypt the target information by using a preset encryption algorithm to obtain ciphertext data;
and if the target information needs to be decrypted, scheduling and operating a target decryption algorithm program so as to decrypt the target information by using a preset decryption algorithm to obtain plaintext data.
Preferably, before scheduling and operating a target encryption algorithm program to encrypt the target information by using a preset encryption algorithm to obtain ciphertext data, the method further includes:
scheduling and operating a plaintext processing program to perform bit complementing processing on the target information, and taking the information subjected to the bit complementing processing as an encryption pre-processing result;
the scheduling and running of the target encryption algorithm program to encrypt the target information by using a preset encryption algorithm to obtain ciphertext data comprises the following steps:
scheduling and operating a target encryption algorithm program to encrypt the pre-encryption processing result by using a preset encryption algorithm to obtain ciphertext data;
the scheduling and running of the target encryption algorithm program to encrypt the pre-encryption processing result by using a preset encryption algorithm to obtain ciphertext data further comprises:
scheduling and operating the target decryption algorithm program to decrypt the ciphertext data by using a preset decryption algorithm to obtain plaintext data;
and scheduling and operating the plaintext processing program to perform bit truncation processing on the plaintext data.
Preferably, if the target information is ciphertext data subjected to bit complementing processing, the scheduling and running a target decryption algorithm program to decrypt the target information by using a preset decryption algorithm, before obtaining plaintext data, further includes:
scheduling and operating a ciphertext processing program to perform bit truncation processing on the target information, and taking the truncated target information as target ciphertext data;
the scheduling and operating of the target decryption algorithm program to decrypt the target information by using a preset decryption algorithm to obtain plaintext data includes:
and scheduling and operating the target decryption algorithm program to decrypt the target ciphertext data by using a preset decryption algorithm to obtain plaintext data.
Preferably, before scheduling and operating a target encryption algorithm program to encrypt the target information by using a preset encryption algorithm to obtain ciphertext data, the method further includes:
scheduling and operating a plaintext data formatting program to format the target information;
the scheduling and running of the target encryption algorithm program to encrypt the target information by using a preset encryption algorithm to obtain ciphertext data comprises the following steps:
and scheduling and operating a target encryption algorithm program to encrypt the formatted target information by using a preset encryption algorithm to obtain ciphertext data.
Preferably, before scheduling and operating a target decryption algorithm program to decrypt the target information by using a preset decryption algorithm to obtain plaintext data, the method further includes:
scheduling and operating a ciphertext data formatting program to format the target information;
the scheduling and operating of the target decryption algorithm program to decrypt the target information by using a preset decryption algorithm to obtain plaintext data includes:
and scheduling and operating a target decryption algorithm program to decrypt the formatted target information by using a preset decryption algorithm to obtain plaintext data.
A data encryption and decryption device based on a decomposition module for decomposing each complete encryption and decryption algorithm program into an encryption algorithm program and a decryption algorithm program and a development module for writing the encryption algorithm program and the decryption algorithm program, the device comprising:
the operation module is used for operating the encryption and decryption scheduling program to execute the following steps:
scheduling and operating an encryption and decryption marking program to judge whether target information needs to be encrypted or decrypted;
if the target information needs to be encrypted, scheduling and operating a target encryption algorithm program to encrypt the target information by using a preset encryption algorithm to obtain ciphertext data;
and if the target information needs to be decrypted, scheduling and operating a target decryption algorithm program so as to decrypt the target information by using a preset decryption algorithm to obtain plaintext data.
Preferably, the running module is further configured to run an encryption and decryption scheduling program, so as to schedule and run a target encryption algorithm program, so as to schedule and run a plaintext processing program, so as to perform bit padding processing on the target information, and take information after the bit padding processing as an encryption pre-processing result, before a preset encryption algorithm is used to encrypt the target information to obtain ciphertext data;
the operation module runs an encryption and decryption scheduling program to schedule and run a target encryption algorithm program, encrypts the target information by using a preset encryption algorithm, and obtains ciphertext data, and the process specifically comprises the following steps:
scheduling and operating a target encryption algorithm program to encrypt the pre-encryption processing result by using a preset encryption algorithm to obtain ciphertext data;
the operation module is further used for operating an encryption and decryption scheduling program, so that a target encryption algorithm program is scheduled and operated, the pre-encryption processing result is encrypted by using a preset encryption algorithm, ciphertext data is obtained, then the target decryption algorithm program is scheduled and operated, the ciphertext data is decrypted by using a preset decryption algorithm, plaintext data is obtained, and the plaintext processing program is scheduled and operated, so that the plaintext data is subjected to bit truncation processing.
Preferably, the running module is further configured to run an encryption and decryption scheduling program, so that if the target information needs to be decrypted and the target information is ciphertext data after bit complementing processing, the scheduling and running of a target decryption algorithm program are performed, so that before the target information is decrypted by using a preset decryption algorithm to obtain plaintext data, a ciphertext processing program is scheduled and run, so that bit truncation processing is performed on the target information, and the target information after bit truncation processing is used as target ciphertext data;
the operation module runs an encryption and decryption scheduling program to schedule and run a target decryption algorithm program, and decrypts the target information by using a preset decryption algorithm to obtain plaintext data, and the process specifically comprises the following steps:
and scheduling and operating the target decryption algorithm program to decrypt the target ciphertext data by using a preset decryption algorithm to obtain plaintext data.
Preferably, the operation module is further configured to operate an encryption and decryption scheduling program, so as to schedule and operate a target encryption algorithm program, so as to schedule and operate a plaintext data formatting program, so as to format the target information, before the target information is scheduled and operated to encrypt by using a preset encryption algorithm, so as to obtain ciphertext data;
the operation module runs an encryption and decryption scheduling program to schedule and run a target encryption algorithm program, encrypts the target information by using a preset encryption algorithm, and obtains ciphertext data, and the process specifically comprises the following steps:
and scheduling and operating a target encryption algorithm program to encrypt the formatted target information by using a preset encryption algorithm to obtain ciphertext data.
Preferably, the running module is further configured to run an encryption and decryption scheduling program, so as to schedule and run a target decryption algorithm program, so as to schedule and run a ciphertext data formatting program, so as to format the target information, before decrypting the target information by using a preset decryption algorithm to obtain plaintext data;
the operation module runs an encryption and decryption scheduling program to schedule and run a target decryption algorithm program, and decrypts the target information by using a preset decryption algorithm to obtain plaintext data, and the process specifically comprises the following steps:
and scheduling and operating a target decryption algorithm program to decrypt the formatted target information by using a preset decryption algorithm to obtain plaintext data.
Compared with the prior art, the beneficial effect of this application is:
in the application, on the basis of decomposing a complete encryption and decryption algorithm program into an encryption algorithm program and a decryption algorithm program, the operation of a target encryption algorithm program and a target decryption algorithm program is coordinated by operating an encryption and decryption scheduling program, and by the method, when partial data needs to be updated, only the encryption algorithm program or the decryption algorithm program is updated, and a whole set of functional programs corresponding to encryption and decryption does not need to be updated, so that the development workload can be reduced, the development period can be shortened, the development efficiency can be improved, and the development cost can be reduced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the description below are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a flow chart of a data encryption and decryption method provided by the present application;
FIG. 2 is another flow chart of the data encryption and decryption method provided in the present application;
FIG. 3 is a flow chart of another method for encrypting and decrypting data provided by the present application;
FIG. 4 is a flow chart of another method for encrypting and decrypting data provided by the present application;
FIG. 5 is a flow chart of another method for encrypting and decrypting data provided by the present application;
fig. 6 is a schematic logical structure diagram of the data encryption and decryption apparatus provided in the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The embodiment of the application provides a data encryption and decryption method, which comprises the following steps: operating an encryption and decryption scheduling program, and executing the following steps: scheduling and operating an encryption and decryption marking program to judge whether target information needs to be encrypted or decrypted; if the target information needs to be encrypted, scheduling and operating a target encryption algorithm program to encrypt the target information by using a preset encryption algorithm to obtain ciphertext data; and if the target information needs to be decrypted, scheduling and operating a target decryption algorithm program so as to decrypt the target information by using a preset decryption algorithm to obtain plaintext data. According to the method and the device, the development workload can be reduced, the development period can be shortened, the development efficiency can be improved, and the development cost can be reduced.
Next, a data encryption and decryption method disclosed in an embodiment of the present application is introduced, which may include:
it should be noted that the data encryption and decryption method is based on a decomposition module and a development module.
The decomposition module is used for decomposing each complete encryption and decryption algorithm program into an encryption algorithm program and a decryption algorithm program;
the development module is used for writing the encryption algorithm program and the decryption algorithm program.
It should be noted that, for the same encryption algorithm program or decryption algorithm program, the development module only needs to be written once, and does not need to be written many times, which can reduce the development workload.
Based on the decomposition module and the development module, the data encryption and decryption method may include:
the steps executed by the encryption and decryption scheduler, as shown in fig. 1, may include:
and step S11, dispatching and running the encryption and decryption marking program to judge whether the target information needs to be encrypted or decrypted.
And step S12, if the target information needs to be encrypted, scheduling and operating a target encryption algorithm program to encrypt the target information by using a preset encryption algorithm to obtain ciphertext data.
The target encryption algorithm program can be understood as: and selecting the encryption algorithm programs required by the current encryption task from the encryption algorithm programs.
And step S13, if the target information needs to be decrypted, scheduling and operating a target decryption algorithm program to decrypt the target information by using a preset decryption algorithm to obtain plaintext data.
The target decryption algorithm program can be understood as: and selecting the decryption algorithm programs required by the current decryption personnel from the decryption algorithm programs.
It should be noted that, based on the foregoing development module, only one time of compiling and encrypting/decrypting the same encryption algorithm program or decryption algorithm program is needed, and the encryption/decryption functions can be completed by compiling a small number of programs, thereby reducing the development workload and saving the development cost. For example, there are 3 encryption algorithms and 3 decryption algorithms, and to satisfy all functions, 9 complete programs need to be written in the conventional manner, while the present application only needs to write 3 encryption algorithm programs, 3 decryption algorithm programs and one encryption and decryption scheduling program, and 7 programs in total, to satisfy all functions.
It should be noted that the data encryption and decryption method disclosed in the embodiment of the present application may be applied to any banking System, for example, a System developed by using CSPS (client Service Platform System, which is a c-language-based self-developed visual programming tool for chinese banking).
In the application, on the basis of decomposing a complete encryption and decryption algorithm program into an encryption algorithm program and a decryption algorithm program, the operation of a target encryption algorithm program and a target decryption algorithm program is coordinated by operating an encryption and decryption scheduling program, and by the method, when partial data needs to be updated, only the encryption algorithm program or the decryption algorithm program is updated, and a whole set of functional programs corresponding to encryption and decryption does not need to be updated, so that the development workload can be reduced, the development period can be shortened, the development efficiency can be improved, and the development cost can be reduced.
In another embodiment of the present application, another data encryption and decryption method is introduced, please refer to fig. 2, and the steps executed by running the encryption and decryption scheduling program may include:
and step S21, dispatching and running an encryption and decryption marking program to judge whether the target information needs to be encrypted or decrypted.
And step S22, if the target information needs to be encrypted, scheduling and operating a plaintext processing program to perform bit-filling processing on the target information, and taking the information after the bit-filling processing as an encryption pre-processing result.
And S23, scheduling and operating a target encryption algorithm program to encrypt the pre-encryption processing result by using a preset encryption algorithm to obtain ciphertext data.
Step S23 is a specific implementation manner of step S12 in the previous embodiment.
And step S24, scheduling and operating the target decryption algorithm program to decrypt the ciphertext data by using a preset decryption algorithm to obtain plaintext data.
And step S25, scheduling and operating the plaintext processing program to perform truncation processing on the plaintext data.
And step S26, if the target information needs to be decrypted, scheduling and operating a target decryption algorithm program to decrypt the target information by using a preset decryption algorithm to obtain plaintext data.
Step S26 is the same as step S13 in the previous embodiment, and the detailed process of step S26 can be referred to the related description of step S13, which is not described herein again.
In another embodiment of the present application, another data encryption and decryption method is introduced, and referring to fig. 3, the step of executing the encryption and decryption scheduling program may include:
and step S31, dispatching and running an encryption and decryption marking program to judge whether the target information needs to be encrypted or decrypted.
And step S32, if the target information needs to be encrypted, scheduling and operating a target encryption algorithm program to encrypt the target information by using a preset encryption algorithm to obtain ciphertext data.
And step S33, if the target information needs to be decrypted and is ciphertext data after being subjected to bit complementing processing, scheduling and running a ciphertext processing program to perform bit truncation processing on the target information, and taking the truncated target information as the target ciphertext data.
And step S34, scheduling and operating the target decryption algorithm program to decrypt the target ciphertext data by using a preset decryption algorithm to obtain plaintext data.
Step S34 is a specific implementation manner of step S13 in the previous embodiment.
In another embodiment of the present application, another data encryption and decryption method is introduced, and referring to fig. 4, the step of executing the encryption and decryption scheduling program may include:
and step S41, dispatching and running the encryption and decryption marking program to judge whether the target information needs to be encrypted or decrypted.
Step S41 is the same as step S11 in the previous embodiment, and the detailed process of step S41 can be referred to the related description of step S11, which is not described herein again.
Step S42, if the target information needs to be encrypted, scheduling and running a plaintext data formatting program to format the target information.
And formatting the target information to ensure that the formatted target information meets the corresponding data format requirement, thereby facilitating the subsequent processing.
And step S43, scheduling and operating a target encryption algorithm program to encrypt the formatted target information by using a preset encryption algorithm to obtain ciphertext data.
Step S43 is a specific implementation manner of step S12 in the previous embodiment.
And step S44, if the target information needs to be decrypted, scheduling and operating a target decryption algorithm program to decrypt the target information by using a preset decryption algorithm to obtain plaintext data.
Step S44 is the same as step S13 in the previous embodiment, and the detailed process of step S44 can be referred to the related description of step S13, which is not described herein again.
In another embodiment of the present application, another data encryption and decryption method is introduced, please refer to fig. 5, and the steps executed by running the encryption and decryption scheduling program may include:
and step S51, dispatching and running an encryption and decryption marking program to judge whether the target information needs to be encrypted or decrypted.
And step S52, if the target information needs to be encrypted, scheduling and operating a target encryption algorithm program to encrypt the target information by using a preset encryption algorithm to obtain ciphertext data.
Steps S51-S52 are the same as steps S11-S12 in the previous embodiment, and the detailed procedures of steps S51-S52 can be referred to the related descriptions of steps S11-S12, which are not described herein again.
And step S53, if the target information needs to be decrypted, scheduling and operating a ciphertext data formatting program to format the target information.
And formatting the target information to ensure that the formatted target information meets the corresponding data format requirement, thereby facilitating the subsequent processing.
And step S54, scheduling and operating the target decryption algorithm program to decrypt the formatted target information by using a preset decryption algorithm to obtain plaintext data.
Step S54 is a specific implementation manner of step S13 in the previous embodiment.
Next, a description will be given of a data encryption and decryption apparatus provided in an embodiment of the present application, and the encryption and decryption apparatus described below and the encryption and decryption method described above may be referred to in correspondence.
The data encryption and decryption device provided by the present application is based on a decomposition module that decomposes each complete encryption and decryption algorithm program into an encryption algorithm program and a decryption algorithm program, and a development module that writes the encryption algorithm program and the decryption algorithm program, please refer to fig. 6, which shows a schematic diagram of a logical structure of the data encryption and decryption device provided by the present application, and the data encryption and decryption device includes: the module 11 is run.
An operation module 11, configured to operate an encryption and decryption scheduler to perform the following steps:
scheduling and operating an encryption and decryption marking program to judge whether target information needs to be encrypted or decrypted;
if the target information needs to be encrypted, scheduling and operating a target encryption algorithm program to encrypt the target information by using a preset encryption algorithm to obtain ciphertext data;
and if the target information needs to be decrypted, scheduling and operating a target decryption algorithm program so as to decrypt the target information by using a preset decryption algorithm to obtain plaintext data.
In this embodiment, the running module 11 is further configured to run an encryption and decryption scheduling program, so as to schedule and run a target encryption algorithm program, so as to schedule and run a plaintext processing program, so as to perform bit padding processing on the target information, before a ciphertext data is obtained by using a preset encryption algorithm to encrypt the target information, and take information after the bit padding processing as an encryption pre-processing result;
the process that the operation module 11 runs an encryption and decryption scheduling program to schedule and run a target encryption algorithm program to encrypt the target information by using a preset encryption algorithm to obtain ciphertext data specifically includes:
scheduling and operating a target encryption algorithm program to encrypt the encryption pretreatment result by using a preset encryption algorithm to obtain ciphertext data;
the operation module 11 is further configured to operate an encryption and decryption scheduling program, to schedule and operate a target encryption algorithm program, to encrypt the pre-encryption processing result by using a preset encryption algorithm to obtain ciphertext data, to schedule and operate the target decryption algorithm program, to decrypt the ciphertext data by using a preset decryption algorithm to obtain plaintext data, and to schedule and operate the plaintext processing program to perform truncation processing on the plaintext data.
In this embodiment, the running module 11 is further configured to run an encryption and decryption scheduling program, so that if the target information needs to be decrypted and the target information is ciphertext data after bit complementing processing, the scheduling and running a target decryption algorithm program are performed, so as to schedule and run a ciphertext processing program before decrypting the target information by using a preset decryption algorithm to obtain plaintext data, so as to perform bit truncation on the target information, and use the target information after bit truncation as target ciphertext data;
the process that the operation module 11 operates the encryption and decryption scheduling program to schedule and operate the target decryption algorithm program, so as to decrypt the target information by using a preset decryption algorithm to obtain plaintext data specifically includes:
and scheduling and operating the target decryption algorithm program to decrypt the target ciphertext data by using a preset decryption algorithm to obtain plaintext data.
In this embodiment, the operation module 11 is further configured to operate an encryption and decryption scheduling program, so as to schedule and operate a target encryption algorithm program, so as to schedule and operate a plaintext data formatting program, so as to format the target information, before the target information is scheduled and operated to encrypt by using a preset encryption algorithm, so as to obtain ciphertext data;
the process that the operation module 11 runs an encryption and decryption scheduling program to schedule and run a target encryption algorithm program to encrypt the target information by using a preset encryption algorithm to obtain ciphertext data specifically includes:
and scheduling and operating a target encryption algorithm program to encrypt the formatted target information by using a preset encryption algorithm to obtain ciphertext data.
In this embodiment, the running module 11 is further configured to run an encryption and decryption scheduling program, so as to schedule and run a target decryption algorithm program, so as to schedule and run a ciphertext data formatting program, so as to format the target information, before decrypting the target information by using a preset decryption algorithm to obtain plaintext data;
the process that the operation module 11 operates an encryption and decryption scheduling program to schedule and operate a target decryption algorithm program to decrypt the target information by using a preset decryption algorithm to obtain plaintext data specifically includes:
and scheduling and operating a target decryption algorithm program to decrypt the formatted target information by using a preset decryption algorithm to obtain plaintext data.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. For the device-like embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
From the above description of the embodiments, it is clear to those skilled in the art that the present application can be implemented by software plus a necessary general hardware platform. Based on such understanding, the technical solutions of the present application may be essentially or partially implemented in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments or some parts of the embodiments of the present application.
The above detailed description is provided for a data encryption and decryption method and device, and a specific example is applied in this document to explain the principle and implementation of the present application, and the description of the above embodiment is only used to help understand the method and core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A data encryption/decryption method, based on a decomposition module that decomposes each complete encryption/decryption algorithm program into an encryption algorithm program and a decryption algorithm program, and a development module that writes the encryption algorithm program and the decryption algorithm program, the method comprising:
the encryption and decryption scheduling program is operated to execute the following steps:
scheduling and operating an encryption and decryption marking program to judge whether target information needs to be encrypted or decrypted;
if the target information needs to be encrypted, scheduling and operating a target encryption algorithm program to encrypt the target information by using a preset encryption algorithm to obtain ciphertext data; the target encryption algorithm program is an encryption algorithm program selected from a plurality of encryption algorithm programs;
if the target information needs to be decrypted, scheduling and operating a target decryption algorithm program so as to decrypt the target information by using a preset decryption algorithm to obtain plaintext data; the target decryption algorithm program is a decryption algorithm program selected from a plurality of decryption algorithm programs.
2. The method according to claim 1, wherein before scheduling and running the target encryption algorithm program to encrypt the target information by using a preset encryption algorithm to obtain the ciphertext data, the method further comprises:
scheduling and operating a plaintext processing program to perform bit complementing processing on the target information, and taking the information subjected to the bit complementing processing as an encryption pre-processing result;
the scheduling and running of the target encryption algorithm program to encrypt the target information by using a preset encryption algorithm to obtain ciphertext data comprises the following steps:
scheduling and operating a target encryption algorithm program to encrypt the pre-encryption processing result by using a preset encryption algorithm to obtain ciphertext data;
the scheduling and running of the target encryption algorithm program to encrypt the pre-encryption processing result by using a preset encryption algorithm to obtain ciphertext data further comprises:
scheduling and operating the target decryption algorithm program to decrypt the ciphertext data by using a preset decryption algorithm to obtain plaintext data;
and scheduling and operating the plaintext processing program to perform bit truncation processing on the plaintext data.
3. The method according to claim 1, wherein if the target information is ciphertext data after the bit padding processing, the scheduling and running a target decryption algorithm program to decrypt the target information by using a preset decryption algorithm, before obtaining plaintext data, further comprises:
scheduling and operating a ciphertext processing program to perform bit truncation processing on the target information, and taking the truncated target information as target ciphertext data;
the scheduling and operating of the target decryption algorithm program to decrypt the target information by using a preset decryption algorithm to obtain plaintext data includes:
and scheduling and operating the target decryption algorithm program to decrypt the target ciphertext data by using a preset decryption algorithm to obtain plaintext data.
4. The method according to claim 1, wherein before scheduling and running the target encryption algorithm program to encrypt the target information by using a preset encryption algorithm to obtain the ciphertext data, the method further comprises:
scheduling and operating a plaintext data formatting program to format the target information;
the scheduling and running of the target encryption algorithm program to encrypt the target information by using a preset encryption algorithm to obtain ciphertext data comprises the following steps:
and scheduling and operating a target encryption algorithm program to encrypt the formatted target information by using a preset encryption algorithm to obtain ciphertext data.
5. The method according to claim 1, wherein before scheduling and executing the target decryption algorithm program to decrypt the target information by using a preset decryption algorithm to obtain plaintext data, the method further comprises:
scheduling and operating a ciphertext data formatting program to format the target information;
the scheduling and operating of the target decryption algorithm program to decrypt the target information by using a preset decryption algorithm to obtain plaintext data includes:
and scheduling and operating a target decryption algorithm program to decrypt the formatted target information by using a preset decryption algorithm to obtain plaintext data.
6. A data encryption/decryption apparatus based on a decomposition module that decomposes each complete encryption/decryption algorithm program into an encryption algorithm program and a decryption algorithm program, and a development module that writes the encryption algorithm program and the decryption algorithm program, the apparatus comprising:
the operation module is used for operating the encryption and decryption scheduling program to execute the following steps:
scheduling and operating an encryption and decryption marking program to judge whether target information needs to be encrypted or decrypted;
if the target information needs to be encrypted, scheduling and operating a target encryption algorithm program to encrypt the target information by using a preset encryption algorithm to obtain ciphertext data; the target encryption algorithm program is an encryption algorithm program selected from a plurality of encryption algorithm programs;
if the target information needs to be decrypted, scheduling and operating a target decryption algorithm program so as to decrypt the target information by using a preset decryption algorithm to obtain plaintext data; the target decryption algorithm program is a decryption algorithm program selected from a plurality of decryption algorithm programs.
7. The device according to claim 6, wherein the running module is further configured to run an encryption and decryption scheduling program, to schedule and run a plaintext processing program, to perform bit-padding processing on the target information, and to take the information after the bit-padding processing as a pre-encryption processing result, before scheduling and running a target encryption algorithm program, to encrypt the target information by using a preset encryption algorithm, to obtain ciphertext data;
the operation module runs an encryption and decryption scheduling program to schedule and run a target encryption algorithm program, encrypts the target information by using a preset encryption algorithm, and obtains ciphertext data, and the process specifically comprises the following steps:
scheduling and operating a target encryption algorithm program to encrypt the pre-encryption processing result by using a preset encryption algorithm to obtain ciphertext data;
the operation module is further used for operating an encryption and decryption scheduling program, so that a target encryption algorithm program is scheduled and operated, the pre-encryption processing result is encrypted by using a preset encryption algorithm, ciphertext data is obtained, then the target decryption algorithm program is scheduled and operated, the ciphertext data is decrypted by using a preset decryption algorithm, plaintext data is obtained, and the plaintext processing program is scheduled and operated, so that the plaintext data is subjected to bit truncation processing.
8. The device according to claim 6, wherein the running module is further configured to run an encryption/decryption scheduler, so that if the target information needs to be decrypted and the target information is ciphertext data after bit complementing processing, the target decryption algorithm program is scheduled and run, so that before the target information is decrypted by using a preset decryption algorithm to obtain plaintext data, a ciphertext processing program is scheduled and run, so that bit truncation processing is performed on the target information, and the target information after bit truncation processing is used as target ciphertext data;
the operation module runs an encryption and decryption scheduling program to schedule and run a target decryption algorithm program, and decrypts the target information by using a preset decryption algorithm to obtain plaintext data, and the process specifically comprises the following steps:
and scheduling and operating the target decryption algorithm program to decrypt the target ciphertext data by using a preset decryption algorithm to obtain plaintext data.
9. The apparatus according to claim 6, wherein the running module is further configured to run an encryption/decryption scheduler to schedule and run a plaintext data formatter to format the target information before the target encryption algorithm program is scheduled and run to encrypt the target information using a preset encryption algorithm to obtain ciphertext data;
the operation module runs an encryption and decryption scheduling program to schedule and run a target encryption algorithm program, encrypts the target information by using a preset encryption algorithm, and obtains ciphertext data, and the process specifically comprises the following steps:
and scheduling and operating a target encryption algorithm program to encrypt the formatted target information by using a preset encryption algorithm to obtain ciphertext data.
10. The apparatus according to claim 6, wherein the running module is further configured to run an encryption/decryption scheduler to schedule and run a ciphertext data formatter to format the target information before the target decryption algorithm program is scheduled and run to decrypt the target information using a preset decryption algorithm to obtain plaintext data;
the operation module runs an encryption and decryption scheduling program to schedule and run a target decryption algorithm program, and decrypts the target information by using a preset decryption algorithm to obtain plaintext data, and the process specifically comprises the following steps:
and scheduling and operating a target decryption algorithm program to decrypt the formatted target information by using a preset decryption algorithm to obtain plaintext data.
CN201810638504.4A 2018-06-20 2018-06-20 Data encryption and decryption method and device Active CN108830095B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810638504.4A CN108830095B (en) 2018-06-20 2018-06-20 Data encryption and decryption method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810638504.4A CN108830095B (en) 2018-06-20 2018-06-20 Data encryption and decryption method and device

Publications (2)

Publication Number Publication Date
CN108830095A CN108830095A (en) 2018-11-16
CN108830095B true CN108830095B (en) 2022-05-27

Family

ID=64142952

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810638504.4A Active CN108830095B (en) 2018-06-20 2018-06-20 Data encryption and decryption method and device

Country Status (1)

Country Link
CN (1) CN108830095B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109818969A (en) * 2019-03-06 2019-05-28 电子科技大学成都学院 Cryptographic algorithm encrypting and deciphering system
CN113505377A (en) * 2021-05-25 2021-10-15 重庆沄析工业互联网有限公司 Method for integrating SM4 data encryption and decryption technology based on software framework

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101534311A (en) * 2009-04-14 2009-09-16 杨筑平 An information security method and procedure
EP2129115A1 (en) * 2008-05-29 2009-12-02 Nagracard S.A. Method for updating security data in a security module and security module for implementing this method
CN201479145U (en) * 2009-09-08 2010-05-19 同方股份有限公司 Enciphering deciphering adapter
CN101751531A (en) * 2010-01-14 2010-06-23 郭志刚 File encryption device with USB electronic key
CN102271124A (en) * 2010-06-01 2011-12-07 富士通株式会社 Data processing equipment and data processing method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2129115A1 (en) * 2008-05-29 2009-12-02 Nagracard S.A. Method for updating security data in a security module and security module for implementing this method
CN101534311A (en) * 2009-04-14 2009-09-16 杨筑平 An information security method and procedure
CN201479145U (en) * 2009-09-08 2010-05-19 同方股份有限公司 Enciphering deciphering adapter
CN101751531A (en) * 2010-01-14 2010-06-23 郭志刚 File encryption device with USB electronic key
CN102271124A (en) * 2010-06-01 2011-12-07 富士通株式会社 Data processing equipment and data processing method

Also Published As

Publication number Publication date
CN108830095A (en) 2018-11-16

Similar Documents

Publication Publication Date Title
US20180212752A1 (en) End-To-End Secure Operations from a Natural Language Expression
CN108520183B (en) Data storage method and device
CN107612683B (en) Encryption and decryption method, device, system, equipment and storage medium
CN107659632A (en) A kind of file encryption-decryption method, device and computer-readable recording medium
CN109493043A (en) The blocking method, apparatus of transaction record, electronic equipment and storage medium
KR20170087663A (en) Apparatus for performing on behalf an electronic signature for client terminal and operating method thereof
CN108830095B (en) Data encryption and decryption method and device
CN109409101A (en) The method and terminal device of data encryption
CN112016104B (en) Encryption method, device and system for financial sensitive data
WO2019120038A1 (en) Encrypted storage of data
US10536276B2 (en) Associating identical fields encrypted with different keys
CN115242644A (en) Micro-service development and management system
CN107066346A (en) A kind of data back up method, data reconstruction method and device
CN107306254A (en) Digital literary property protection method and system based on double layer encryption
WO2018099157A1 (en) Method and device for encrypting file system
CN111260080A (en) Process optimization method, device, terminal and storage medium based on machine learning
CN109560925A (en) Key information Supply Method and the device for utilizing key information Supply Method
CN112187909B (en) Financing information generation system and method based on block chain
CN113343254A (en) Insurance function encryption and decryption method, device, medium and electronic equipment based on OFD format
CN112149140B (en) Prediction method, prediction device, prediction equipment and storage medium
KR20180126853A (en) System and Method for automatic generation and execution of encryption SQL statements using meta-information and enterprise framework
CN109933994B (en) Data hierarchical storage method and device and computing equipment
CN110134387A (en) Document template data processing method, device and computer equipment in loan transaction
CN116028958B (en) Key encryption and decryption method and device, security machine and medium
EP4022471B1 (en) System and method for implementing market data rights enforcement

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
GR01 Patent grant
GR01 Patent grant