A kind of encryption method and relevant apparatus of electrical power distribution automatization system
Technical field
This application involves electrical power distribution automatization system technical field, in particular to a kind of encryption side of electrical power distribution automatization system
Method, encryption device, server and computer readable storage medium.
Background technique
With power distribution network Fast Construction, power distribution network is responsible for more and more important function in the power system, as direct
Contact user power utilization important link, it safety whether be directly related to power supply capacity and power supply quality, also influence user
Daily production and living activity.
Power distribution automation network is built in actual area, passes through laying between the node in general power distribution network
Private communication optical fiber is communicated, and when being built to city expropriation of land and old town, the transformation difficulty of power distribution network increases, nothing
Method is laid with private communication optical fiber.Therefore, in this case, power distribution network uses public network communication (GPRS/CDMA/TD-
SCDMA/230Mhz etc.) transmit electric network information and control instruction.Correspondingly, needing to be added during wireless public network communication
The Security mechanism of network layer and application layer.
But the prior art is general to be only encrypted in network layer or application layer, causes security protection not comprehensive enough.
And two-way authentication is carried out usually using symmetric key before application layer establishes network communication in the prior art, and it is right
Claim key safety lower, distribution main website and distribution terminal can not be protected, when there are malicious attack, pseudo-base station can not be handled and attacked
The problem of hitting is unfavorable in this application environment of the needs compared with high safety protection level of power distribution network, it is possible to cause serious
Security consequences.
Therefore, how to improve safety of the power distribution network in network connection is that those skilled in the art's emphasis of interest is asked
Topic.
Summary of the invention
The purpose of the application is to provide encryption method, encryption device, server and the meter of a kind of electrical power distribution automatization system
Calculation machine readable storage medium storing program for executing establishes the high ipsec security tunnel of safety coefficient by elder generation between security gateway and terminal, protects
Electrical power distribution automatization system has been held in the data transmission security of network layer, on this basis using asymmetric between main website and terminal
Key carries out two-way authentication, improves the safety of bidirectional identification verifying, uses encrypted transmission after being verified again, maintains and match
Electric automation system realizes electrical power distribution automatization system in the dual of network layer and application layer in the data transmission security of application layer
Data encryption improves the data safety protection level of electrical power distribution automatization system, a possibility that reducing by malicious attack.
In order to solve the above technical problems, the application provides a kind of encryption method of electrical power distribution automatization system, including:
Security gateway establishes ipsec security tunnel in network layer using ipsec protocol and terminal;
When the ipsec security tunnel is successfully established, main website is by encryption authentication device with the terminal according to asymmetric
Key executes bidirectional identity authentication operation;
When bidirectional identity authentication operation passes through, the main website according to the chip serial number of the terminal of acquisition and
Key version chooses symmetric key, and carries out encrypted transmission to data message in application layer according to the symmetric key.
Optionally, security gateway establishes ipsec security tunnel using ipsec protocol and terminal, including:
The security gateway carries out working key generation processing to the terminal, is conversated according to obtained working key
Key generation processing, obtains session key;
The ipsec security tunnel is established according to the working key and the session key and the terminal, and is used
Symmetric cryptography mode encrypts the data message in the ipsec security tunnel to obtain encryption message, is sealed using ESP agreement
Dress mode is packaged transmission to the encryption message.
Optionally, security gateway establishes ipsec security tunnel using ipsec protocol and terminal, further includes:
The working key and the session key are updated according to the first predetermined period.
Optionally, main website executes bidirectional identity authentication behaviour according to unsymmetrical key by encryption authentication device and the terminal
Make, including:
The first random number that the encryption authentication device obtains is sent to the terminal by the main website, so that the terminal
First random number received and the second random number obtained the first signature calculation is carried out according to the first private key to handle
To the first signature, first random number, second random number and first signature are sent;
Whether first signature received according to the judgement of the first public key is correct;
It handles to obtain the second signature if so, carrying out the second signature calculation to second random number according to the second private key,
Second signature is sent so that the terminal received according to the second public key and second random number judgement described the
Whether two signatures are correct, if so, sending authenticate-acknowledge information to the main website;
Receive the authenticate-acknowledge information.
Optionally, terminal carries out first random number received and the second random number obtained according to the first private key
First signature calculation handles to obtain the first signature, by first random number, second random number and first signature
It sends, including:
The terminal obtains second random number, and to first random number and second random number received
Cryptographic Hash calculating is carried out, the first cryptographic Hash is obtained;
First cryptographic Hash is encrypted according to first private key, obtains first signature;
First random number, second random number and first signature are sent.
Optionally, whether first signature received according to the judgement of the first public key is correct, including:
Main website is decrypted first signature according to first public key, obtains first cryptographic Hash;
First random number and second random number are subjected to cryptographic Hash calculating, obtain the second cryptographic Hash;
Judge whether first cryptographic Hash and second cryptographic Hash are identical.
Optionally, further include:
First private key, first public key, second private key and second public affairs are updated according to predetermined period
Key.
The application also provides a kind of encryption device of electrical power distribution automatization system, including:
Network layer encryption module, for establishing ipsec security tunnel using ipsec protocol and terminal;
Application layer authentication module, for being successfully established when the ipsec security tunnel, main website passes through encryption certification dress
It sets and bidirectional identity authentication operation is executed according to unsymmetrical key with the terminal;
Application layer encryption module is chosen symmetrical close for the chip serial number and key version according to the terminal of acquisition
Key, and encrypted transmission is carried out to data message in application layer according to the symmetric key.
The application also provides a kind of server, including:
Memory, for storing computer program;
Processor, the step of encryption method as described above is realized when for executing the computer program.
The application also provides a kind of computer readable storage medium, and calculating is stored on the computer readable storage medium
The step of machine program, the computer program realizes encryption method as described above when being executed by processor.
A kind of encryption method of electrical power distribution automatization system provided herein, including:Security gateway uses ipsec protocol
Ipsec security tunnel is established in network layer with terminal;When the ipsec security tunnel is successfully established, main website passes through encryption certification
Device and the terminal execute bidirectional identity authentication according to unsymmetrical key and operate;When bidirectional identity authentication operation passes through
When, the main website chooses symmetric key according to the chip serial number and key version of the terminal of acquisition, and according to described right
Key is claimed to carry out encrypted transmission to data message in application layer.
The high ipsec security tunnel of safety coefficient is established between security gateway and terminal by elder generation, maintains distribution
Automated system is carried out between main website and terminal using unsymmetrical key on this basis in the data transmission security of network layer
Two-way authentication improves the safety of bidirectional identification verifying, uses encrypted transmission after being verified again, maintains power distribution automation
In the data transmission security of application layer, the double data for realizing electrical power distribution automatization system in network layer and application layer adds system
It is close, the data safety protection level of electrical power distribution automatization system is improved, a possibility that reducing by malicious attack.
The application also provides the encryption device, server and computer-readable storage medium of a kind of electrical power distribution automatization system
Matter has the above beneficial effect, and this will not be repeated here.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
The embodiment of application for those of ordinary skill in the art without creative efforts, can also basis
The attached drawing of offer obtains other attached drawings.
Fig. 1 is a kind of flow chart of the encryption method of electrical power distribution automatization system provided by the embodiment of the present application;
Fig. 2 is the flow chart for establishing ipsec security tunneling process of encryption method provided by the embodiment of the present application;
Fig. 3 is the flow chart of the bidirectional identity authentication operation of encryption method provided by the embodiment of the present application;
Fig. 4 is the flow chart of the encryption side of another kind electrical power distribution automatization system provided by the embodiment of the present application;
Fig. 5 is a kind of structural schematic diagram of the encryption device of electrical power distribution automatization system provided by the embodiment of the present application.
Specific embodiment
The core of the application is to provide encryption method, encryption device, server and the meter of a kind of electrical power distribution automatization system
Calculation machine readable storage medium storing program for executing establishes the high ipsec security tunnel of safety coefficient by elder generation between security gateway and terminal, protects
Electrical power distribution automatization system has been held in the data transmission security of network layer, on this basis using asymmetric between main website and terminal
Key carries out two-way authentication, improves the safety of bidirectional identification verifying, uses encrypted transmission after being verified again, maintains and match
Electric automation system realizes electrical power distribution automatization system in the dual of network layer and application layer in the data transmission security of application layer
Data encryption improves the data safety protection level of electrical power distribution automatization system, a possibility that reducing by malicious attack.
To keep the purposes, technical schemes and advantages of the embodiment of the present application clearer, below in conjunction with the embodiment of the present application
In attached drawing, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described embodiment is
Some embodiments of the present application, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art
Every other embodiment obtained without making creative work, shall fall in the protection scope of this application.
The prior art is general to be only encrypted in network layer or application layer, causes security protection not comprehensive enough.And
Two-way authentication is carried out usually using symmetric key before application layer establishes network communication in the prior art, and it is symmetrical close
Key safety is lower, can not protect distribution main website and distribution terminal, when there are malicious attack, can not handle pseudo-base station attack
Problem is unfavorable in this application environment of the needs compared with high safety protection level of power distribution network, it is possible to cause serious safety
Property consequence.
Therefore, the present embodiment provides a kind of encryption methods of electrical power distribution automatization system, by elder generation in security gateway and terminal
Between establish the high ipsec security tunnel of safety coefficient, maintain electrical power distribution automatization system network layer data transmission peace
Entirely, two-way authentication is carried out using unsymmetrical key between main website and terminal on this basis, improves bidirectional identification verifying
Safety uses encrypted transmission again after being verified, maintain electrical power distribution automatization system in the data transmission security of application layer, in fact
Show electrical power distribution automatization system to encrypt in the double data of network layer and application layer, improves the data peace of electrical power distribution automatization system
Full protection is horizontal, a possibility that reducing by malicious attack.
Specifically, referring to FIG. 1, Fig. 1 is a kind of encryption side of electrical power distribution automatization system provided by the embodiment of the present application
The flow chart of method.
This method may include:
S101, security gateway establish ipsec security tunnel in network layer using ipsec protocol and terminal;
It should be noted that the structure of the electrical power distribution automatization system in the present embodiment is that main website is connect with security gateway, pacify
Full gateway is connect with terminal by public network.
Therefore, this step is intended to security gateway establishing ipsec security tunnel in network layer using ipsec protocol and terminal
Road.Specifically, this step is to pass through the Safeguard tactics using the Safeguard tactics based on national secret algorithm ipsec protocol
Ipsec security tunnel is established by security gateway and Distributing Terminal Assembly, the encryption and decryption and certification of network layer data may be implemented.
Wherein, IPSec (InternetProtocolSecurity) agreement is for providing the safety of IP layers (network layer).
When being communicated due to all hosts for supporting ICP/IP protocol, IP layers of processing will be passed through, so providing IP layers of peace
Full property is equivalent to provide the basis of secure communication for whole network.
S102, when ipsec security tunnel is successfully established, main website is by encryption authentication device and terminal according to unsymmetrical key
Execute bidirectional identity authentication operation;
On the basis of step S101, this step is intended to be successfully established when ipsec security tunnel, and main website passes through encryption certification
Device and terminal execute bidirectional identity authentication according to unsymmetrical key and operate.
In this step, due to being recognized in embodiment bidirectional identification using the bidirectional identity authentication operation based on unsymmetrical key
During card, need the data of certain length as the plaintext data in verification process, and whether plaintext data is stolen,
Also it will affect the safety in verification process, therefore use random number as the plaintext data in verification process in this step.Institute
By encryption authentication device acquisition random number in this step, and to pass through encryption authentication device and distribution certainly using the random number
Terminal in dynamicization system executes bidirectional identity authentication operation according to unsymmetrical key.
It should be noted that the safety of authentication is improved in the present embodiment, bidirectional identity authentication operation difference
Two-wheeled main website is carried out to terminal, terminal operates the authentication of main website, correspondingly, also saving respectively in main website and terminal
Two sets of unsymmetrical key, further increase the safety of authentication operation, the security risk for avoiding pseudo-base station from invading.
S103, when bidirectional identity authentication operation passes through, the main website is according to the chip serial number of the terminal of acquisition
Symmetric key is chosen with key version, and encrypted transmission is carried out to data message in application layer according to the symmetric key.
On the basis of step S102, that is, when bidirectional identity authentication operation passes through, main website obtains terminal at this time
Chip serial number and key version, so that getting and being used for according to chip serial number and key version between subsequent main website and terminal
Data message is encrypted in application layer to the symmetric key of data encryption, and according to the symmetric key, is realized in application layer
To the encrypted transmission of data message.
It should be noted that the ipsec security tunnel that security gateway and terminal are established in the present embodiment is in network layer
Implement corresponding safeguard protection, after the completion of IP Security protection, main website and terminal are laggard in application layer progress authentication
Row secure encrypted transmission, that is, the safe transmission of the response in application layer foundation.Therefore, the present embodiment is the equal of in distribution
It establishes in automated system and is protected in the double-encryption of network layer and application layer.
To sum up, the present embodiment between security gateway and terminal by first establishing the high ipsec security tunnel of safety coefficient
Road maintains electrical power distribution automatization system in the data transmission security of network layer, uses between main website and terminal on this basis
Unsymmetrical key carries out two-way authentication, improves the safety of bidirectional identification verifying, uses encrypted transmission after being verified again, protects
Electrical power distribution automatization system has been held in the data transmission security of application layer, has realized electrical power distribution automatization system in network layer and application layer
Double data encryption, improve the data safety protection level of electrical power distribution automatization system, reduce by the possibility of malicious attack
Property.
Based on a upper embodiment, the present embodiment mainly does the ipsec security tunnel of how establishing in a upper embodiment
Illustrate, other parts are substantially the same with a upper embodiment, and same section can refer to a upper embodiment, and this will not be repeated here.
Referring to FIG. 2, Fig. 2 is that encryption method provided by the embodiment of the present application establishes ipsec security tunneling process
Flow chart.
The process may include:
S201, security gateway carry out working key generation processing to terminal, are conversated according to obtained working key close
Key generation processing, obtains session key;
S202 establishes ipsec security tunnel according to working key and session key and terminal, and uses symmetric cryptography mode
Data message in ipsec security tunnel is encrypted to obtain encryption message, using ESP protocol encapsulation mode to encryption message
It is packaged transmission.
The peace in network layer can be established between the security gateway and terminal of electrical power distribution automatization system through this embodiment
Full protection mechanism improves the vertical protection range in distribution system, solves network layer attacks bring security risk.
Based on a upper embodiment, the present embodiment is mainly to explain to the bidirectional identity authentication operation in a upper embodiment,
Other parts are substantially the same with a upper embodiment, and same section can refer to a upper embodiment, and this will not be repeated here.
Referring to FIG. 3, Fig. 3 is the process of the bidirectional identity authentication operation of encryption method provided by the embodiment of the present application
Figure.
S301, main website are sent to terminal for the first random number that authentication device obtains is encrypted, so that terminal is according to the first private
The first random number received and the second random number obtained are carried out the first signature calculation and handle to obtain the first signature by key, by the
One random number, the second random number and the first signature are sent;
This step, which is intended to obtain main website, is used to carry out the original text namely the first random number of signature verification, and by this first
Random number is sent in terminal.It can just make terminal that the first random number received and the second random number are carried out the first signature to count
It calculates, obtains the first signature for verifying, and the signature being calculated and the first random number and the second random number are sent to
In main website.
Wherein, the first random number can be obtains from the encryption authentication device being arranged with main website, is also possible to according to soft
Part obtains random number.Certainly, it is true random number by the random number that the encryption authentication device being separately provided obtains, further increases
The safety of two-way authentication, a possibility that reduction by malicious attack.
It is obtained from the encrypting module or encryption chip being arranged with terminal correspondingly, the second random number can be, it can also be with
It is that random number is obtained according to software.Certainly, by the random number that the encryption device or encryption chip that are separately provided obtain be very with
A possibility that machine number further increases the safety of two-way authentication, reduces by by malicious attack.
Wherein, it is that signature is calculated by key side when carrying out signature authentication by unsymmetrical key, it is logical holds public key side
Cross the correctness that public key judges the key.Therefore main website is to terminal the first random number of transmission in the present embodiment, and terminal is according to first
The first signature is calculated in private key.
Whether S302, the first signature received according to the judgement of the first public key are correct;
On the basis of step S301, this step is intended to get the first random number, second transmitted by terminal when main website
When random number and the first signature, the first signature is verified according to the first public key.
S303 handles to obtain the second signature if so, carrying out the second signature calculation to the second random number according to the second private key,
Second signature is sent, so that whether terminal is correct according to the second signature that the second public key and the judgement of the second random number receive,
If so, sending authenticate-acknowledge information to main website;
On the basis of step S302, this step is intended to when S302 is when being verified, that is, the first signature is correct,
Main website carries out the second signature calculation processing to the second random number further according to the second private key, obtains the second signature, then second is signed
It is sent at terminal and is verified, can determine that certification passes through between main website and terminal when being verified.When be verified for
Informing main website then sends authenticate-acknowledge information to main website.
In general, when two devices just complete unilateral authentication after once signed is verified, namely hold one end of public key
Unilateral authentication is completed after verifying to signature.But malicious party steals to the first private key and disguises oneself as terminal in order to prevent,
Or the first public key of replacement makes main website that malicious peer is identified as correct terminal, therefore also need between main website and terminal again into
The certification of row once signed is calculated the second signature at this time with the second private key that main website is held, then carries out signature by terminal and test
Card, completes signature verification operations twice, improves the safety of verification operation, avoids side's key is stolen pseudo-base station is caused to invade
The case where.
S304 receives authenticate-acknowledge information.
On the basis of step S303, main website receives authenticate-acknowledge information in this step, completes between main website and terminal
Two-way authentication operation.
Wherein, the first private key and the first public key of the present embodiment introduction are the public key and private key of terminal, and the first private key saves
In the terminal, the first public key is stored in main website.Second private key and the second public key are the public key and private key of main website, and the second private key is protected
There are in main website, the second public key is saved in the terminal.
Optionally, in order to improve the reliability of bidirectional identity authentication, the present embodiment can also include:
The first private key, the first public key, the second private key and the second public key are updated according to predetermined period.
Wherein, predetermined period can choose such as 1 day or 1 week, can also be selected according to actual applicable cases, tool
Body is it is not limited here.
Above step S301 to S304 provide it is a kind of with unsymmetrical key carry out mutual authentication method, by private key with
The signature verification operations of public key improve the safety of bidirectional identification verifying, avoid the security risk of pseudo-base station intrusion.And
And to being verified than in the prior art by diploma system, this programme only needs to obtain random number and pre-set non-right
Key is claimed just to complete two-way authentication.
The first signature calculation processing in a upper embodiment, the second signature calculation are handled and according to the first public key or second
The signature judgment method that public key carries out can use following explanation using any one method provided in the prior art
The method of offer.
Wherein, the processing of the first signature calculation is handled with the second signature calculation in addition to the parameter brought into is different with result, other
Part is essentially identical, and following handled with the first signature calculation is illustrated, and the processing of the second signature calculation can refer to descendants.
The processing method may include:
S401, terminal obtains the second random number, and carries out cryptographic Hash to the first random number received and the second random number
It calculates, obtains the first cryptographic Hash;
Wherein, the first cryptographic Hash is called the abstract for doing the first random number and the second random number, usually transmits to needs
Text carries out cryptographic Hash and is calculated, can be using SHA1 (a kind of hash algorithm), SHA2 (another hash algorithm) or SHA3
(also a kind of hash algorithm) obtains.Wherein, the safety highest of SHA3 algorithm.
S402 is encrypted the first cryptographic Hash according to the first private key, obtains the first signature;
On the basis of step S401, this step is intended to that the first cryptographic Hash is encrypted by the first private key, obtains
To encrypted first signature.
S403 sends the first random number, the second random number and the first signature.
On the basis of step S402, by original text (the first random number and the second random number) and the first signature being calculated
It is sent in main website and is verified.
Wherein, the signature judgment method that the first public key or the second public key carry out, in addition to judging object difference, other parts base
This is identical, can mutually refer to, illustrate the signature judgment method of the first public key below.
This method may include:
S501, main website are decrypted the first signature according to the first public key, obtain the first cryptographic Hash;
This step is intended to go out according to the first public key decryptions the abstract of the original text transmitted in the first cryptographic Hash, that is, signature.
First random number and the second random number are carried out cryptographic Hash calculating, obtain the second cryptographic Hash by S502;
The original text that this step is intended to obtain directly carries out cryptographic Hash calculating, obtains the second cryptographic Hash.
It should be noted that the precedence relationship being not carried out between step S501 and step S502, can execute side by side,
It can be executed at random, as long as last available first cryptographic Hash and the second cryptographic Hash, specifically it is not limited here.
S503 judges whether the first cryptographic Hash and the second cryptographic Hash are identical.
On the basis of step S501 and step S502, this step is intended to judge whether are the first cryptographic Hash and the second cryptographic Hash
Identical, if the same decision verification passes through, and decision verification does not pass through if not identical.
Based on all of above embodiment, can also be provided between a kind of application main website in the actual environment and terminal below
The encryption method in network layer and application layer, that is, on the basis of original network layer encryption add the present embodiment in
In the mutual authentication method of the implementation of application layer.
Referring to FIG. 4, Fig. 4 is the process of the encryption side of another kind electrical power distribution automatization system provided by the embodiment of the present application
Figure.
In the method, the encryption of network layer is completed by security gateway and terminal, it is specific as follows:
The network layer encryption stage uses the Safeguard tactics based on national secret algorithm ipsec protocol, by security gateway and end
End device establishes ipsec security tunnel, realizes the encryption and decryption and certification of network layer data.Including following sub-step:
Step S601, both sides negotiate security mechanism, and security gateway first sends a security mechanism, terminal dress to terminal installation
Corresponding security mechanism is put back into again, and sends to security gateway oneself signing certificate and encrypted certificate simultaneously;
Step S602, both sides are based on digital certificate and complete authentication and data exchange, the data of exchange including the use of with
Identity number, signing certificate and encrypted certificate after machine number and public key encryption etc., it is substantially close that both sides are based on above data generation
Key parameter, and further calculate generation working key;
Step S603, carries out data verification, and both sides count security mechanism, identity number etc. with basic key parameter
Verify data is generated according to abstract operation, verify data is exchanged and verifies mutually;
Step S604 verifies errorless rear determining working key.
The main purpose of step S601 to step S603 are to generate working key.
Step S605, security gateway and terminal installation both sides carry out data exchange, and the data of exchange include that security mechanism (contains
Random number), encryption and signature key parameter, identity, and based on working key to above-mentioned data carry out abstract operation obtain
The hash key arrived;
Step S606, carry out data verification, based on working key to the information such as the encryption of both sides and signature key parameter into
Row abstract operation, generates verify data, exchanges verify data and verifies mutually;
Step S607 generates session key, encryption and signature key parameter to random number, both sides contained by security mechanism etc.
Information carries out abstract operation, obtains session encryption key and integrity of sessions check key;
Step S608 establishes the tunnel IPSec-VPN.
The main purpose of step S605 to step S608 are to generate session key.
Step S609, after security gateway and the foundation of the tunnel IPSec-VPN of terminal installation both sides, it is logical that both sides enter encryption
The letter stage;All data messages use symmetric cryptography mode, and encapsulate to ESP protocol massages and transmitted, and complete the network number of plies
According to encryption.
Step S609 is generated in the IPSec-VPN tunnel basis established after working key and session key, using encryption
Transmission.
The network layer encryption stage uses the Safeguard tactics based on ipsec protocol, is built by security gateway and terminal installation
Vertical ipsec security tunnel provides safe transmission service for distribution automation system data, and passes through Network Isolation and access control
The application of technology establishes safety curtain between the internal network and public network of distribution main station system.
In application layer, the encryption of application layer is completed by main website and terminal, it is specific as follows:
The application layer encryption stage uses the Safeguard tactics based on 101/104 agreement, is realized by main website and terminal installation
Bidirectional identity authentication, and the encryption and decryption based on standard national secret algorithm realization application layer data.Including following sub-step:
Step S610, main website and terminal installation establish link, and main website initiates the linking request with terminal, and security gateway returns
With terminal installation successful authentication result;
Step S611, main website and terminal installation complete bidirectional identity authentication, and main website takes random number R 1 from encryption authentication device,
It is sent to terminal installation, terminal installation takes random number R 2, main website is sent to after R1+R2 signs according to unsymmetrical key, simultaneously
Terminal installation saves R1, and main website verifies terminal signature validity according to unsymmetrical key, and main website is completed after being verified to terminal
Authentication, subsequent main website according to asymmetric key pair R2 sign, result is sent into terminal, terminal is tested according to unsymmetrical key
The correctness for demonstrate,proving main website signature completes authentication and return authentication confirmation message of the terminal to main website after being verified;
Step S612, the chip serial number of main website reading terminals device, after bidirectional identity authentication success, main website, which is sent, to be read
The message of terminal chip sequence number, terminal return to the sequence number of chip;
Step S613, main website obtain the current key version of terminal installation, and main website sends the report of reading terminals key version
Text, terminal return to the version number of key in current chip;
Step S610 to step S613 completes the operation of the bidirectional identity authentication between main website and terminal.
Step S614, both sides complete the negotiation of interactive key, application layer data are carried out encrypted transmission.
After the bidirectional identity authentication operation of step S610 to step S613 passes through, this step S614 is mainly in application layer
Complete encrypted transmission.
The application layer encryption stage on the basis of setting up ipsec security tunnel, realizes main website and distribution network terminal device
Between transmission channel connection, initiate authentication from main website to terminal installation, both sides are using domestic commercial asymmetric cryptographic algorithm
(SM2, SM3) realizes bidirectional identity authentication, and the second weight of business datum is realized based on pre-buried safe distribution of electric power protection key code system
Encryption and decryption.
To sum up, the high ipsec security tunnel of safety coefficient is established between security gateway and terminal by elder generation, is maintained
Electrical power distribution automatization system uses unsymmetrical key in the data transmission security of network layer between main website and terminal on this basis
Two-way authentication is carried out, the safety of bidirectional identification verifying is improved, uses encrypted transmission after being verified again, maintains distribution certainly
Dynamicization system realizes electrical power distribution automatization system in the double data of network layer and application layer in the data transmission security of application layer
Encryption, improves the data safety protection level of electrical power distribution automatization system, a possibility that reducing by malicious attack.
A kind of encryption device of electrical power distribution automatization system provided by the embodiments of the present application is introduced below, is described below
The encryption device of electrical power distribution automatization system a kind of can be mutual with a kind of above-described encryption method of electrical power distribution automatization system
To should refer to.
Specifically, referring to FIG. 5, Fig. 5 is a kind of encryption dress of electrical power distribution automatization system provided by the embodiment of the present application
The structural schematic diagram set.
The apparatus may include:
Network layer encryption module 100, for establishing ipsec security tunnel using ipsec protocol and terminal;
Application layer authentication module 200, for being successfully established when the ipsec security tunnel, main website passes through encryption certification dress
It sets and bidirectional identity authentication operation is executed according to unsymmetrical key with the terminal;
Application layer encryption module 300, for when bidirectional identity authentication operation passes through, the main website to be according to acquisition
The chip serial number and key version of the terminal choose symmetric key, and according to the symmetric key in application layer to datagram
Text carries out encrypted transmission.
The application also provides a kind of server, which is characterized in that including:
Memory, for storing computer program;
Processor, when for executing computer program the step of the realization such as encryption method of above embodiments.
The application also provides a kind of computer readable storage medium, which is characterized in that deposits on computer readable storage medium
The step of containing computer program, the encryption method such as above embodiments realized when computer program is executed by processor.
Each embodiment is described in a progressive manner in specification, the highlights of each of the examples are with other realities
The difference of example is applied, the same or similar parts in each embodiment may refer to each other.For device disclosed in embodiment
Speech, since it is corresponded to the methods disclosed in the examples, so being described relatively simple, related place is referring to method part illustration
?.
Professional further appreciates that, unit described in conjunction with the examples disclosed in the embodiments of the present disclosure
And algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardware and
The interchangeability of software generally describes each exemplary composition and step according to function in the above description.These
Function is implemented in hardware or software actually, the specific application and design constraint depending on technical solution.Profession
Technical staff can use different methods to achieve the described function each specific application, but this realization is not answered
Think beyond scope of the present application.
The step of method described in conjunction with the examples disclosed in this document or algorithm, can directly be held with hardware, processor
The combination of capable software module or the two is implemented.Software module can be placed in random access memory (RAM), memory, read-only deposit
Reservoir (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technology
In any other form of storage medium well known in field.
Above to a kind of encryption method of electrical power distribution automatization system provided herein, encryption device, server and
Computer readable storage medium is described in detail.Principle and embodiment of the specific case to the application used herein
It is expounded, the description of the example is only used to help understand the method for the present application and its core ideas.It should be pointed out that
For those skilled in the art, under the premise of not departing from the application principle, can also to the application into
Row some improvements and modifications, these improvement and modification are also fallen into the protection scope of the claim of this application.