Summary of the invention
For addressing the above problem, the object of the present invention is to provide a kind of method, make that Email can just be signed on user's the browser in the client of webmail, cryptographic operation, be sent on the web server host through webmail then; Receiving course is to download mail from the web server too, through checking, the decryption oprerations of browser control part, gives the user by browser display, if fail correct deciphering or checking, explains that there is safety problem in this mail.
Another important content provided by the invention is that needed certificate of encrypted signature and private key can be stored in (like USBKEY) in the special hardware device; Can more comprehensively guarantee fail safe and ease for use like this; The user only needs USBKEY is inserted any PC, just can receive and dispatch secure e-mail easily through its browser.
For reaching above-mentioned requirements; A kind of webmail mail signature encryption method based on browser control part of the present invention is that the user is when sending mail; Pass through control; Send the signature of SMIME form and/or the mail of encryption to webmail, when receiving mail, receive mail, and the mail of SMIME form is verified and/or deciphered from webmail through control; And when sending and receive mail, the user writes mail through browser page, and this control shows mail through browser page.
Wherein, the user is preferably through control certificate of utility and private key login when login webmail system.
The logical interface of can crossing of this control uses hardware encipher equipment or uses mobile certificate equipment.
The encapsulation and the parsing of the MIME form of mail also can be provided for this control of compatible surface mail.
And this control to be preferably in whole use be user transparent.
This hardware encipher equipment or mobile certificate equipment are smart card or USBKEY.
Webmail provides downloading and installing of this control, and whether webmail can control control and open.
This encrypted signature algorithm can use any existing public key algorithm.
Need the encrypted certificate of request to obtain, or dispose by webmail is concentrated by the signature mail that the other side sends; CA certificate that checking needs and CRL obtain by request CA server or dispose by webmail is concentrated.
Useful technique effect of the present invention is:
1, by carrying out alternately through control and webmail server; Mail carries out the encrypted signature operation in the browser control part of client; Carry out data interaction through HTTP request with webmail, safety that both can certified mail does not change user's use habit again.
2, be highly susceptible to disposing and using, control can be downloaded and upgrade at any time, and USBKEY once upgrades, and repeatedly uses, and the certificate part both can realize through disposing the CA server, also can concentrate to dispose through webmail and realize.
3, can freely customize high-intensity AES, the user can control the unlatching of encrypted signature voluntarily.
4, for rough draft, to reply, the mail under the situation such as forwarding can carry out the encrypted signature operation equally.
Utilize the present invention, can under the prerequisite that does not change user's use habit, easily carry out the encrypted signature operation of mail.
Embodiment
For the object of the invention, technical scheme and advantage are understood better, now with specific embodiment also in conjunction with the accompanying drawings, specify as follows:
Design of the present invention is to provide a kind of method; Make and write mail through browser page; And Email can just be signed on user's the browser in the client of webmail, cryptographic operation, is sent on the web server host through webmail then; Receiving course is to download mail from the web server too, through checking, decryption oprerations, gives the user by browser display, if fail correct deciphering or checking, explains that there is safety problem in this mail.In order to realize this functional sequence; Used the browser control part technology; This technology can be the functional module of browser extension through authentication through the navigator product interface, and the present invention is encapsulated into product safety transmission and encryption and decryption flow process in the browser control part by this technology; Make complicated originally and bulky Mail Clients product can be achieved in webmail with the size of thousands of bytes, and whole signature encryption flow processing procedure is fully to user transparent.
And during login webmail system, the user can use traditional account number and password mode login, in order to ensure safety, is preferably the user and can passes through control, and certificate of utility and private key are logined.System can carry out encrypted signature operation and carry out data interaction through the HTTP request with webmail having in the browser control part of mail at client functionality like this, has both guaranteed the safety of mail, does not change user's use habit again.Whether wherein control is preferably to be provided by webmail and downloads and installs, and can control this system control and open.
Wherein control can use hardware encipher equipment such as smart card through interface, also can use mobile certificate equipment such as USBKEY.
At first the present invention implements to download and install a control earlier, below with the user through control certificate of utility and private key log on as the example explanation.
Fig. 1 realizes the general flow chart that mail signature is encrypted for the present invention; When sending mail; The user writes earlier Mail Contents s101 in the page of browser; Forward then that browser control part is signed to mail to and/or cryptographic operation obtains the mail s102 of SMIME form, by control mail is sent to webmail s103 at last; When receiving mail, download mail s104 by control earlier equally, again the mail of SMIME form is verified and/or decryption oprerations s105, at last Mail Contents is presented at s106 in the page of browser.
Fig. 2 is a system assumption diagram of the present invention, and the present invention has provided a kind of better mail signature encipherment scheme on architecture, in the face of user's just browser 101; Control 102 is hidden in the browser back; The user can pass through browser and web server 105 interaction datas, mainly is other data except that mail, like script file; Interface patterns etc. also comprise non-secure e-mail.For secure e-mail, carry out mutual through control 102 and web server.Control also just carries out the request 104 of http data with the web server, and then through the smtp agreement mail is sent to smpt server 106 by webmail, and webmail is simultaneously through the mail on the imap consultative management imap server 107.
In needs sender certificate and private key, control is searched (103) in USBKEY, and in order to guarantee the safety of private key, private key is unreadable in usbkey, can only use (signature or deciphering) through the interface that usbkey provides.Use addressee's certificate at needs, CA certificate, in the time of CRL, control obtains through webmail inquiry certificate repository 108.
Below in conjunction with the concrete steps (generation of certificate private key that is elaborated; And to usbkey perfusion certificate private key; With insert in certificate repository that more new authentication is not in the discussion scope of this paper, the present invention supposes user's certificate, private key; All available with the server certificate repository), mainly be divided into following four processes:
One, when the user lands for the first time, or behind the change account number password, needs to upgrade user's password ciphertext field.
Referring to Fig. 3, enumerate the certificate (among the USBKEY a plurality of certificates can be arranged) among the USBKEY earlier, the mailbox tabulation that certificate is bound shows user s203, by the user select the certificate that will use.At step s204; The user imports traditional account number password, and input guarantees that the password of twice input is consistent once more, uses this password of the public key encryption s205 in the user-selected certificate then; The algorithm that algorithm is supported for this PKI; Password ciphertext after will encrypting at last sends to webmail, and webmail is saved in its attribute as this user in the subscriber's meter.
This method is supported traditional account number password login and certificate private key login simultaneously, and the login of account number password needs subscriber mailbox name and entry password, the certificate private key login certificate of necessity and private key password (PIN code).The user is behind change account number password, and webmail can empty this user's password ciphertext field, and doing like this is in order to guarantee the user when certificate of necessity private key is logined, can trigger process one, see process two for details.
Two, the user is with certificate private key login webmail process.
Referring to Fig. 4, in the first two steps of login process, be equally enumerate earlier certificate s302 and user among the USBKEY select the certificate s303 that will use.At step s304, the name that need bind with this certificate is as logon account, the password ciphertext of in database, inquire about this user through webmail, if ciphertext does not exist, the s204 step that then goes to procedure in continues execution; If ciphertext exists, then take out this ciphertext, by the pairing private key decrypting ciphertext of certificate user-selected among the USBKEY, the result of deciphering is account's a entry password.In step 307, send account number and entry password and login with checking to webmail.
This process can guarantee that the people who only has correct private key can login, and personal certificate is being represented individual's identity, and the pairing private key of certificate can not be forged, so this process has guaranteed the safety of login.Carry in order to adapt to various situation, this control also can supply the encapsulation and the parsing of the MIME form of mail, and can support browser as much as possible.For example, also can use traditional password mode to login, be preferably the mail that it can not send encrypted signature is set, have only the user who logins through the mode of certificate private key could send the mail of encrypted signature as USBKEY not at one's side the time.
Three, the user sends the encrypted signature mail to the webmail process.
Referring to Fig. 5, the user writes mail s402 on the page of browser, and the mail that this envelope is being write can be the rough draft mail, the mail of answer, and the mail of forwarding is finished writing the MIME form is carried out in the back by control encapsulation s403.If this envelope mail needs to encrypt, and need be parameter with the address of the addressee of this mail, in certificate repository, ask list of cert by webmail, encrypt this mail together with certificate and sender's certificate of asking then, with the encapsulation of SMIME form; If this envelope mail needs signature, need change mail with sender's private key and certificate signature, with the encapsulation of SMIME form.Signature and encryption can be carried out (being generally signs earlier afterwards encrypts) simultaneously, also can not sign and not encrypt.Last http request mode is sent this mail s407 to webmail, and webmail can select mail is sent with the mode of SMTP, or deposits rough draft or with the transmission file with the mode of IMAP.
For editor is rough draft, the mail of replying or transmitting shows that this mail once was opened, then in the process of opening with mail decryption verification (if mail is by encrypted signature), see process four for details.
Four, the user opens the mail of encrypted signature, needs deciphering and checking.
Referring to Fig. 6, when the user need open an envelope mail, control at first will be downloaded this mail to local; If this mail is through signature, control need be downloaded CA certificate and CRL (certificate cancels and tabulates) to the webmail request, in order to verify the signature of this mail; If through checking; Show this mail really from the sender, and do not distorted, otherwise explain that there is safety problem in this mail; If this mail is through encrypting, control need be used the private key deciphering mail among the USBKEY, if the deciphering failure shows that this mail does not use this user's certificate to encrypt, perhaps Mail Contents changes; Behind successful decryption, also will continue the inspection mail head, whether also need decipher or verify in order to check this mail.If mail decryption verification success, the content of mail is presented on the browser, otherwise, the reason of failure is fed back to the user.
To guarantee when control is opened mail that webmail does not open mail because if webmail opens mail earlier, control again open mail, inefficiency not only, and make Mail Contents be shown twice, influence is used.So shield webmail opens mail at server end function.
In addition; Of the present inventionly a kind ofly can use any known public key algorithm based on the encrypted signature algorithm in the webmail mail signature encryption method of browser control part; And need the encrypted certificate of request both can to obtain in this method by the signature mail that the other side sends, also can concentrate and dispose by webmail; CA certificate that checking needs and CRL both can obtain by request CA server, also can concentrate by webmail and dispose; Used certificate of encrypted signature process and private key can be stored in the local file, also can be stored in the specialized apparatus (for example usbkey), and public key cryptosyst can use the CA server additionally to dispose, and also can on webmail, concentrate deployment.
In sum, the present invention is through the use of control, and the encrypted signature function of mail is merged in webmail, makes the user can pass through webmail mailing system safe in utilization; Utilize the present invention, can on the basis of original webmail, carry out the encrypted signature method to mail, thereby reach the confidentiality of mail, integrality, the effect of non-repudiation through browser control part.