A mail tamper-proof encryption, decryption and processing method
By using an improved summary algorithm in the mail server to extract and compare the summary of email content, the complexity and cost of email anti-tampering in the existing technology are solved, and efficient email content verification and protection is achieved, which is suitable for large-scale applications. Large-scale communication scenarios.
Patent Information
- Application Number
- CN202410756231.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-13
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2044-06-13
AI Technical Summary
Existing email anti-tampering technologies have problems such as complex setup and management, reliance on third-party certificate authorities, high computing and network overhead, and inability to effectively protect the integrity of attachments. This is especially difficult to implement in large-scale or cross-organization communications. Efficient key management and secure verification.
Use an improved summary algorithm to summarize the email content, and add the summary string to the email header. By comparing it during transmission between mail servers, you can determine whether the email content has been tampered with, and use a salted summary algorithm or attribute combination summary. algorithm to ensure the integrity of email content.
Without increasing the computing resources of the sender and the receiver, adding equipment, or changing the email structure, it can effectively verify whether the email content has been tampered with, and does not occupy additional network bandwidth during transmission, achieving flexible and universal email defense. Tamper solution.
Smart Images

Figure CN118337531B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data transmission security, and in particular to a mail tamper-proof encryption, decryption and processing method. Background Art
[0002] Email is one of the important means of communication between people and between enterprises. A complete email system includes: Mail Transfer Agent (MTA), Mail Delivery Agent (MDA) and Mail User Agent (MUA). Email has the advantages of fast instant communication, low cost-effectiveness, convenience and flexibility, record retrieval, multimedia transmission, group communication, high privacy and high security. The above advantages make email one of the most commonly used communication methods in daily life and business office. This also makes enterprises and individuals pay great attention to the security and privacy of email. The current technical solutions for whether the content of email data is authentic and whether it has been tampered with include digital signatures, message authentication codes (MAC) and encryption.
[0003] Digital signature is an encryption technology used to verify the integrity and identity of email content. The sender uses his private key to sign the email, and the receiver uses the sender's public key to verify the signature. If the email content is tampered with, the signature will be invalid, thus ensuring the integrity of the email. There are currently two routes to implement digital signatures: 1) Use Public Key Infrastructure (PKI), including Certificate Authority (CA) to issue and manage digital certificates; the sender needs to obtain a digital certificate and use his private key to sign the email, and the receiver uses the sender's public key to verify the signature; 2) The encryption and signature standard developed by OpenPGP uses a combination of symmetric encryption and asymmetric encryption to protect the confidentiality and integrity of emails; encrypt and sign emails by using key pairs and symmetric encryption algorithms. Digital signatures have the following disadvantages: 1) The setup and management of PKI signatures requires certain technical knowledge and steps, including obtaining digital certificates, configuring signature software, handling certificate expiration and revocation, etc., which is complex and confusing for ordinary users or non-technical professionals. 2) PKI signatures rely on third-party certificate authorities (CAs) to issue and verify digital certificates. This means that both the sender and the receiver need to trust and rely on a specific CA. If the trust in the CA is broken or there is a problem, it may have an impact on the entire PKI signature system. 3) Digital certificates have an expiration date and need to be renewed regularly. If the sender's certificate expires or is revoked, the receiver may not be able to verify the validity of the signature, resulting in the inability to trust the signature. Managing the expiration and revocation status of certificates requires certain attention and maintenance. 4) PKI signatures usually only sign the body of the email, not the attachments. This means that even if the signature of the email body is valid, the integrity of the attachments may still be at risk of tampering. 5) PKI signatures require computational operations such as encryption and hashing, and digital certificates and signature information need to be transmitted over the network. This may increase computational and network overhead and have a certain impact on performance. 6) Although OpenPGP does not rely on the same trust model for users to form public and private keys themselves and then exchange public keys through other means to establish a trust relationship, it requires users to manage their own secret keys, which increases the difficulty of use and reduces security; when using asymmetric encryption algorithms, there will be performance bottlenecks for large attachments.
[0004] Message authentication code is a technology used to verify the integrity of emails. It generates a fixed-length summary by hashing the email content with a shared key. The sender and receiver share the same key. The receiver can use the same key to hash the email content and compare the results to verify whether the email has been tampered with. MAC usually uses a strong hash function (such as HMAC-SHA256) and a key to ensure integrity and security. The sender and receiver must have a secure method to share the key to ensure the integrity of the email content. Message authentication codes have the following disadvantages: 1) MAC uses a shared symmetric key to generate and verify the summary of the message. This means that the sender and receiver must share the same key in advance. The distribution and management of keys may bring certain challenges, especially in large-scale or cross-organizational communications; 2) The distribution, update and revocation of symmetric keys may bring some challenges. In large-scale systems, a reliable key management mechanism needs to be established to ensure the security and timely update of keys. 3) In distributed environments, such as cloud computing or systems with multiple participants, it becomes more difficult to use shared symmetric keys. In this case, a digital signature mechanism using public key cryptography may be more suitable for providing security and identity authentication. 4) The receiver needs to perform summary + secret key calculation, which increases the amount of additional calculation.
[0005] Email content encryption is a method to protect the security of email content. By encrypting the email content, even if the email is tampered with, unauthorized third parties cannot read or modify the email content. Encryption can use symmetric encryption algorithms (such as symmetric block encryption algorithm (AES, Advanced Encryption Standard)) or asymmetric encryption algorithms (such as RSA, composed of the initials of three inventors, Ron Rivest, Adi Shamir, Leonard Adleman). Symmetric encryption requires the sender and the receiver to share a key, while asymmetric encryption uses the sender's public key to encrypt the email content, and the receiver uses his private key to decrypt it. This method uses the sender to encrypt the email data and the receiver to decrypt the data to view the data, which belongs to the category of confidentiality protection; it can solve the problem of anti-tampering to a certain extent, but it increases the amount of calculation for the sender and the receiver, and there is also a risk of shared transmission leakage for the encryption method and encryption key. Summary of the invention
[0006] The purpose of the present invention is to provide an anti-tampering encryption, decryption and processing method for emails, which can verify whether the email content has been tampered with without increasing the computing resources of the sender and the receiver, adding system equipment, and changing the email content structure, and at the same time does not occupy additional network transmission bandwidth during transmission.
[0007] To achieve the above object, the present invention provides the following solutions:
[0008] A mail tamper-proof encryption method, the mail tamper-proof encryption method is applied to a sending mail server in a mail server network; the mail server network includes multiple mail servers; the multiple mail servers are interconnected; the mail servers are used to send or receive mails; when the mail server sends mails, it is a sending mail server; when the mail server receives mails, it is a receiving mail server;
[0009] The email tamper-proof encryption method includes: obtaining email writing data of a sender user;
[0010] Convert the email writing data into a preset format to obtain an encoded email;
[0011] The improved digest algorithm is used to extract the digest of the email content in the encoded email to obtain a sender digest string; the email content includes the email body and attachments; the improved digest algorithm is a salted digest algorithm or an attribute combination digest algorithm;
[0012] The sender summary string is added to the mail header of the encoded mail to obtain the sender mail, and the sender mail is sent.
[0013] Optionally, the salt digest algorithm includes: setting a salt string at a preset salt position of the email content part in the encoded email to obtain the salted email content;
[0014] A digest algorithm is used to extract the digest of the salted email content to obtain a sender digest string.
[0015] Optionally, the attribute combination summary algorithm includes: determining an attribute to be added; the attribute to be added is a custom attribute, or a preset number of attributes in the mail header of the encoded mail;
[0016] Setting the attribute to be added at a preset attribute addition position of the mail content part in the encoded mail to obtain the attribute-combined mail content;
[0017] A digest algorithm is used to extract the digest of the attribute combination email content to obtain a sender summary string.
[0018] A method for decrypting mails to prevent tampering, the method for decrypting mails to prevent tampering is applied to a receiving mail server in a mail server network; the mail server network includes a plurality of mail servers; the plurality of mail servers are interconnected; the mail servers are used to send or receive mails; when the mail server sends mails, it is a sending mail server; when the mail server receives mails, it is a receiving mail server;
[0019] The mail tamper-proof decryption method comprises: receiving a sender's mail; the sender's mail is obtained by converting the sender's mail writing data into a preset format by a sending mail server, and obtaining an encoded mail; extracting a summary of the mail content part in the encoded mail by using an improved summary algorithm, and obtaining a sender's summary string, and adding the sender's summary string to the mail header of the encoded mail;
[0020] Obtaining the sender summary string in the email header of the sender email;
[0021] Extracting a summary of the email content in the sender's email using an improved summary algorithm to obtain a receiver's summary string; the email content includes the email body and attachments;
[0022] The tampering status of the mail writing data of the sender user is determined according to the recipient summary string and the sender summary string.
[0023] Optionally, the improved digest algorithm is a salted digest algorithm or an attribute combination digest algorithm.
[0024] Optionally, determining the tampering status of the email writing data of the sender user according to the receiving party summary string and the sending party summary string includes: when the receiving party summary string and the sending party summary string are the same, determining that the tampering status of the email writing data of the sender user is not tampered with;
[0025] When the recipient summary string is different from the sender summary string, the tampering status of the sender's email writing data is determined to be tampered with, and a tampering prompt email is generated according to the email header of the sender's email, and the tampering prompt email is sent to the sender's email sending mail server.
[0026] A method for processing mail tamper-proofing, the method for encrypting mail tamper-proofing is applied to a mail server network; the mail server network includes a plurality of mail servers; the plurality of mail servers are interconnected; the mail servers are used to send or receive mails; when the mail server sends mails, it is a sending mail server; when the mail server receives mails, it is a receiving mail server;
[0027] The mail tamper-proof processing method comprises: the sending mail server obtains the mail writing data of the sending user;
[0028] The sending mail server converts the mail writing data into a preset format to obtain an encoded mail;
[0029] The sending mail server uses an improved digest algorithm to extract the digest of the mail content part in the encoded mail to obtain a sender digest string; the mail content part includes the mail body and attachments; the improved digest algorithm is a salted digest algorithm or an attribute combination digest algorithm;
[0030] The sending mail server adds the sender summary string to the mail header of the encoded mail to obtain the sender mail;
[0031] The sending mail server sends the sender mail to the target receiving mail server;
[0032] The target receiving mail server receives the sender's mail;
[0033] The target receiving end mail server obtains the sender summary string from the mail header of the sender mail;
[0034] The target receiving end mail server uses an improved digest algorithm to extract a digest of the mail content part in the sender's mail to obtain a receiving end summary string; the mail content part includes the mail body and attachments;
[0035] The target receiving-end mail server determines the tampering status of the mail writing data of the sending user according to the receiving-end summary string and the sending-end summary string.
[0036] Optionally, the improved digest algorithm is a salted digest algorithm or an attribute combination digest algorithm;
[0037] Optionally, the salt digest algorithm includes: setting a salt string at a preset salt position of the email content part in the encoded email to obtain the salted email content;
[0038] Using a digest algorithm to extract a digest of the salted email content to obtain a sender digest string;
[0039] The attribute combination summary algorithm includes: determining the attribute to be added; the attribute to be added is a custom attribute, or a preset number of attributes in the mail header of the encoded mail;
[0040] Setting the attribute to be added at a preset attribute addition position of the mail content part in the encoded mail to obtain the attribute-combined mail content;
[0041] A digest algorithm is used to extract the digest of the attribute combination email content to obtain a sender summary string.
[0042] Optionally, the target receiving-end mail server determines the tampering status of the mail writing data of the sender user according to the receiving-end summary string and the sending-end summary string, including: when the receiving-end summary string and the sending-end summary string are the same, determining that the tampering status of the mail writing data of the sender user is not tampered with;
[0043] When the recipient summary string is different from the sender summary string, the tampering status of the sender's email writing data is determined to be tampered with, and a tampering prompt email is generated according to the email header of the sender's email, and the tampering prompt email is sent to the sender's email sending mail server.
[0044] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:
[0045] The present invention provides an anti-tampering encryption, decryption and processing method for mail, which adds extended attributes to the mail, uses an agreed digest algorithm to calculate the mail content (text, attachments) to form a digest string before sending, and then adds the calculated digest string to the extended attributes of the mail header, so that the mail receiver (server, client, etc.) decodes the information in the mail header to obtain the digest string of the original mail content, and then uses the agreed digest algorithm to calculate the mail content (text, attachments) to obtain a new digest string, and compares it with the digest string in the original mail to confirm whether the mail content has been tampered with; the use of the digest algorithm consumes less computing resources than encryption and decryption; the flexible and variable digest algorithm can have a certain degree of randomness; adding the digest string to the mail header has little effect on the size of the mail itself, and will not bring much change to network transmission and storage capacity compared with the "digital signature" method; the implementation algorithm has universality and is easy to implement in different languages and different platforms. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0047] Figure 1 A flowchart of the email tamper-proof encryption method provided in Example 1 of the present invention;
[0048] Figure 2 A flow chart of the email tamper-proof decryption method provided in Example 2 of the present invention;
[0049] Figure 3 A flow chart of a mail anti-tampering processing method provided in Example 3 of the present invention;
[0050] Figure 4 A flowchart of a user using a client to send and receive mail via a mail server provided in Embodiment 4 of the present invention;
[0051] Figure 5 A flowchart of sending and receiving mails between two mail servers using a client provided by Embodiment 4 of the present invention;
[0052] Figure 6 A flowchart of a sender (client or server) constructing an email summary string provided in Embodiment 4 of the present invention;
[0053] Figure 7 A flowchart of a client receiving an email and performing signature verification provided in Embodiment 4 of the present invention;
[0054] Figure 8 Flow chart of mail signature verification for the mail server delivery service provided in Example 4 of the present invention;
[0055] Fig. 9 A flowchart of a user using a browser to send and receive mail via an email server provided in Embodiment 5 of the present invention;
[0056] Fig.10 A flow chart of sending and receiving mails between two mail servers provided by a user using a browser in Embodiment 5 of the present invention. DETAILED DESCRIPTION
[0057] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0058] The purpose of the present invention is to provide an anti-tampering encryption, decryption and processing method for emails, which can verify whether the email content has been tampered with without increasing the computing resources of the sender and the receiver, adding system equipment, and changing the email content structure, and at the same time does not occupy additional network transmission bandwidth during transmission.
[0059] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0060] Embodiment 1: In this embodiment, an email tamper-proof encryption method is applied to a sending email server in a mail server network. The mail server network includes multiple mail servers. The multiple mail servers are connected to each other. The mail server is used to send or receive mail. When the mail server sends mail, it is a sending mail server. When the mail server receives mail, it is a receiving mail server.
[0061] like Figure 1 As shown, the email tamper-proof encryption method includes the following steps.
[0062] Step 101: Obtain the email writing data of the sender user.
[0063] Step 102: Convert the email writing data into a preset format to obtain an encoded email.
[0064] Step 103: Use the improved digest algorithm to extract the digest of the email content in the encoded email to obtain the sender's digest string. The email content includes the email body and attachments. The improved digest algorithm is a salted digest algorithm or an attribute combination digest algorithm.
[0065] Step 104: Add the sender summary string to the mail header of the encoded mail, obtain the sender mail, and send the sender mail.
[0066] The salted digest algorithm includes: setting a salted string at a preset salted position of the mail content in the encoded mail to obtain the salted mail content. Using the digest algorithm to extract the digest of the salted mail content to obtain the sender's digest string.
[0067] The attribute combination digest algorithm includes: determining the attribute to be added. The attribute to be added is a custom attribute, or a preset number of attributes in the mail header of the encoded mail. The attribute to be added is set at the preset attribute position of the mail content part in the encoded mail to obtain the attribute combination mail content;
[0068] The summary algorithm is used to extract the summary of the attribute-combined email content to obtain the sender's summary string.
[0069] Embodiment 2: This embodiment provides a mail tamper-proof decryption method, which is applied to a receiving mail server in a mail server network as described in Embodiment 1. The mail server network includes a plurality of mail servers; the plurality of mail servers are interconnected; the mail servers are used to send or receive mails; when the mail server sends mails, it is a sending mail server; when the mail server receives mails, it is a receiving mail server.
[0070] like Figure 2 As shown, the email tamper-proof decryption method includes the following steps.
[0071] Step 201: receiving the sender's email. The sender's email is obtained by converting the sender's email writing data into a preset format by the sender's email server. The improved digest algorithm is used to extract the email content part in the encoded email to obtain the sender's summary string, and the sender's summary string is added to the email header of the encoded email.
[0072] Step 202: Obtain the sender summary string in the email header of the sender email.
[0073] Step 203: Use the improved summary algorithm to extract the summary of the email content in the sender's email to obtain the receiver's summary string. The email content includes the email body and attachments.
[0074] Step 204: Determine the tampering status of the email writing data of the sender user according to the recipient summary string and the sender summary string.
[0075] The improved digest algorithm is a salted digest algorithm or an attribute combination digest algorithm.
[0076] The salted digest algorithm includes: setting a salted string at a preset salted position of the mail content in the encoded mail to obtain the salted mail content. Using the digest algorithm to extract the digest of the salted mail content to obtain the sender's digest string.
[0077] The attribute combination digest algorithm includes: determining the attribute to be added. The attribute to be added is a custom attribute, or a preset number of attributes in the mail header of the encoded mail. The attribute to be added is set at the preset attribute position of the mail content part in the encoded mail to obtain the attribute combination mail content;
[0078] The summary algorithm is used to extract the summary of the attribute-combined email content to obtain the sender's summary string.
[0079] Step 204 includes: when the receiving party summary string is the same as the sending party summary string, determining that the tampering status of the email writing data of the sending party user is not tampered with. When the receiving party summary string is different from the sending party summary string, determining that the tampering status of the email writing data of the sending party user is tampered with, and generating a tampering prompt email according to the email header of the sending party email, and sending the tampering prompt email to the sending end email server of the sending party email.
[0080] Embodiment 3: This embodiment provides a method for processing mail tamper-proof, and the mail tamper-proof encryption method is applied to a mail server network as described in Embodiment 1. The mail server network includes multiple mail servers; the multiple mail servers are interconnected; the mail servers are used to send or receive mails; when the mail server sends mails, it is a sending mail server; when the mail server receives mails, it is a receiving mail server.
[0081] like Figure 3 As shown, the mail anti-tampering processing method includes the following steps.
[0082] Step 301: The originating mail server obtains the mail writing data of the sending user.
[0083] Step 302: The originating mail server converts the mail writing data into a preset format to obtain an encoded mail.
[0084] Step 303: The sending mail server uses an improved digest algorithm to extract the digest of the mail content in the encoded mail to obtain a sender digest string. The mail content includes the mail body and attachments. The improved digest algorithm is a salted digest algorithm or an attribute combination digest algorithm.
[0085] Step 304: The sending mail server adds the sender summary string to the mail header of the encoded mail to obtain the sender mail.
[0086] Step 305: The sending mail server sends the sender's mail to the target receiving mail server.
[0087] Step 306: The target mail server receives the sender's mail.
[0088] Step 307: The target receiving mail server obtains the sender summary string in the mail header of the sender's mail.
[0089] Step 308: The target receiving end mail server uses the improved digest algorithm to extract the digest of the mail content part in the sender's mail to obtain the receiving end digest string. The mail content part includes the mail body and attachments.
[0090] Step 309: The target receiving mail server determines the tampering status of the mail writing data of the sending user according to the receiving party summary string and the sending party summary string.
[0091] The improved digest algorithm is a salted digest algorithm or an attribute combination digest algorithm.
[0092] The salted digest algorithm includes: setting a salted string at a preset salted position of the mail content in the encoded mail to obtain the salted mail content. Using the digest algorithm to extract the digest of the salted mail content to obtain the sender's digest string.
[0093] The attribute combination digest algorithm includes: determining the attribute to be added. The attribute to be added is a custom attribute, or a preset number of attributes in the mail header of the encoded mail. The attribute to be added is set at the preset attribute addition position of the mail content part in the encoded mail to obtain the attribute combination mail content. The digest algorithm is used to extract the digest of the attribute combination mail content to obtain the sender's digest string.
[0094] Step 309 includes: when the receiving party summary string is the same as the sending party summary string, determining that the tampering status of the email writing data of the sending party user is not tampered with. When the receiving party summary string is different from the sending party summary string, determining that the tampering status of the email writing data of the sending party user is tampered with, and generating a tampering prompt email according to the email header of the sending party email, and sending the tampering prompt email to the sending end email server of the sending party email.
[0095] Embodiment 4: The mail server in Embodiment 1 to Embodiment 3 is a sender or a receiver, and the sender or the receiver may also be a user terminal.
[0096] like Figures 4 to 8 , this embodiment discloses a mail signature verification process between terminals.
[0097] Step 1: User 1 configures MUA-C1 and User 2 configures MUA-C2, and both parties use the agreed algorithm.
[0098] Agreed digest algorithms, such as: MD5 (Message-Digest Algorithm version 5), SHA1 (Secure Hash Algorithm 1), SHA2 (Secure Hash Algorithm 2; the successor to SHA1 with higher security), SHA224 (cryptographic hash algorithm, belonging to the SHA2 series, the generated information digest length is 224 bits), SHA256 (Secure Hash Algorithm, belonging to the SHA2 series, generates a hash value of a fixed length (256 bits, i.e. 32 bytes)), SHA384 (Secure Hash Algorithm 384 bits, converts input data (message) into a hash value with a length of 384 bits), SHA512 (Secure Hash Algorithm 512 bits, converts input data (message) into a hash value with a length of 512 bits), private digest algorithms, etc.
[0099] The agreed digest algorithm is combined with the salting principle, that is, before performing a digest operation on the email content (text + attachments), an agreed random string (salted string) is added to the beginning, end or specified position of the email content to form a new email content. The new email content is digested.
[0100] The summary algorithm is a combination of the agreed attributes in the email body + email header. For example, for the content of the summary operation, the email content (body + attachments) is used, and one or more attributes in the email header (such as Date (email time), Subject (email subject), From (email sender), or custom attributes) are added as the new content to perform summary processing.
[0101] Determine the agreed set of digest algorithms and salts (such as using the salting principle).
[0102] The summary algorithm includes M1~Mn, a total of n algorithms, where M1 to Mn represent different algorithms in the algorithm set, as follows:
[0103] M1: Md5 algorithm is a widely used cryptographic hash function, the full name of which is Message-Digest Algorithm version 5.
[0104] M2: SHA1 algorithm, full name of Secure Hash Algorithm 1: Secure Hash Algorithm 1.
[0105] M3: Secure Hash Algorithm 2 Full name: Secure Hash Algorithm 2; it is the successor of SHA1 and has higher security. ....
[0107] Mn: Private digest algorithm, such as a combination of two or more of the above algorithms.
[0108] In practical applications, these algorithms can be selected and configured according to specific needs to meet the performance and security requirements in different scenarios.
[0109] The salt set includes multiple different salt values from Sa1 to San, where Sa1 to San represent different values in the salt set, as follows:
[0110] Sa1: Use Greenwich time stamp as salt value.
[0111] Sa2: A string of fixed length agreed upon by both parties is used as the salt value.
[0112] Sa3: Use the MD5 string of the email body as the salt value. ....
[0114] San: A combination of two or more of the above is used as the salt value.
[0115] Step 2: User User1 uses MUA-C1 to send email A. Email A is processed by M algorithm (such as combining with salting principle) to form the email summary string H1.
[0116] Step 3: MUA-C1 adds the digest string H1 to the header of email A, such as: X-Digest-Chain: H1, and finally forms a new email A1.
[0117] Step 4: MUA-C1 submits email A1 to the mail server. The mail server receives email A1 and delivers it to the mailbox of user User2 through the MDA component.
[0118] Step 5: User User2 uses MUA-C2 to receive email A1.
[0119] Step 6: When user User2 uses MUA-C2 to read email A1, the email content (body + attachments) of email A1 (if a combined attribute summary is used, the agreed email header is added) is digested using the M algorithm (if salting is used, the salt value is combined) to obtain the digest string H2.
[0120] Step 7: Use the digest string H2 to compare with the H1 of X-Digest-Chain in the header of email A1. If they are consistent, it means that the email has not been tampered with and the data is authentic. If they are inconsistent, it means that the content of A1 email has been tampered with and the data is unreliable. You can give a clear prompt on the MUA-C2 interface or discard the email.
[0121] Example 5: Figures 9 and 10 , this embodiment discloses a signature verification process between mail servers:
[0122] Step 1: The mail servers agree on a digest algorithm. The algorithms that can be used are: agreed digest algorithms, such as: MD5, SHA1, SHA224, SHA256, SHA384, SHA512, private digest algorithms, etc.
[0123] The agreed digest algorithm is combined with the salting principle, that is, before performing a digest operation on the email content (text + attachments), an agreed random string (salted string) is added to the beginning, end or specified position of the email content to form a new email content. The new email content is digested.
[0124] The digest algorithm is a combination of the specified attributes in the email body and the email header. For example, the digest operation uses the email content (body + attachments) and one or more attributes in the email header (such as Date, Subject, From, or custom attributes) as the new content to perform digest processing.
[0125] Determine the agreed digest algorithm set and salt set: algorithm set M (M1~Mn), salt set (Sax-Say).
[0126] Step 2: User Test1 logs in to the mail server S1 through a browser, writes an email to Test2, fills in the subject, body, and attachment attributes, and forms data E1. Submits the data to the web service of the mail server S1.
[0127] Step 3: The web service of the mail server S1 processes the data E1 and constructs it into an encoded mail E2 in MIME format.
[0128] Step 4: Mail server S1 processes the mail content (text + attachments) in mail E2 using the M algorithm (combining the salt value and attribute combination algorithm if salting is used) to form a digest string H1.
[0129] Step 5: Mail server S1 adds digest string H1 to the header of mail E2 to form mail E3 (for example: mail E3 header: X-Digest-Chain: H1).
[0130] Step 6: Mail server S1 sends mail E3 to mail server S2 through the mail MTA component, and delivers it to target user Test2 through the mail MDA component of mail server S2.
[0131] Step 7: The mail MDA component of the mail server S2 uses the M algorithm (if the salting algorithm is used, salting is required) to digest the content (body + attachment) (or the value of the combined attribute) in the mail E3 to form a digest string H2.
[0132] Step 8: The mail MDA component of mail server S2 compares the digest string H2 with H1 of X-Digest-Chain in the header of mail E3. If they are consistent, it means that the mail has not been tampered with and the data is authentic and valid. If they are inconsistent, it means that the content of mail E3 has been tampered with and the data is unreliable. Mail E3 is discarded.
[0133] Step 9: If the E3 email is tampered with, the mail server S2 generates a notification email En1 and sends it to the mail server S1 to the user Test1. The email En1 includes the key information in E2 (sender, recipient, sending time, subject, and attachment name), indicating that this email has been tampered with.
[0134] The present invention can realize the inspection of whether the content of the email has been tampered with in an email communication-based system architecture by adopting an efficient and simple method without increasing the amount of calculation, adding an additional equipment system, increasing the transmission amount and storage amount corresponding to the email size, and without any change.
[0135] Application scenarios:
[0136] 1) The information exchange system is established based on the mail system. Under the premise that the client and browser applications are controllable, this method can be used to meet the requirements of data tamper-proofing.
[0137] 2) The email system is naturally a decentralized system, and the data flow system that communicates across systems can quickly and efficiently realize the flow of verifiable data.
[0138] 3) IoT communication scenarios. In the current era of the Internet of Everything, various edge devices support email protocol communication. Data collection and reporting can be completed by email without establishing an IoT center platform. This is a fast and feasible solution for rapid access. The authenticity of the reported content must be taken into consideration, but due to the limitations of its own computing resources and network access bandwidth, the use of PKI (S / MIME), OpenGPG, encryption, message authentication codes, etc. have various drawbacks. The use of this invention can solve the problem of email content authenticity without having to make higher requirements on hardware and network resources, and meet the timeliness requirements.
[0139] In order to improve work efficiency and find people for things in enterprises and institutions, a third-party business system will be designed to send notifications, agency information and other information to the user's mailbox through the email system, so that users can grasp the work they need to handle through the mailbox to improve office efficiency. The security mechanism of the existing third-party system and email system mainly adopts access security control (such as assigning accounts and passwords that can be used by the third-party system, adding the IP address of the third-party system to the whitelist, etc.). There is no feasible verification mechanism for whether the content of the email sent by the third-party business system has been tampered with or is authentic. The above problems can be solved by adopting this invention.
[0140] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0141] The principles and implementation methods of the present invention are described herein using specific examples. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A mail tamper-proof encryption method, characterized in that: The mail tamper-proof encryption method is applied to a sending mail server in a mail server network; the mail server network includes a plurality of mail servers; the plurality of mail servers are interconnected; the mail servers are used to send or receive mails; When the mail server sends mail, it is the originating mail server; When the mail server receives mail, it is a terminal mail server; The email tamper-proof encryption method comprises: Get the email writing data of the sender user; Convert the email writing data into a preset format to obtain an encoded email; The improved digest algorithm is used to extract the digest of the mail content part in the encoded mail to obtain the sender's digest string; the mail content part includes the mail body and attachments; the improved digest algorithm is a salted digest algorithm or an attribute combination digest algorithm; the salted digest algorithm includes: setting the salted string at a preset salted position of the mail content part in the encoded mail to obtain the salted mail content; using the digest algorithm to extract the digest of the salted mail content to obtain the sender's summary string; the attribute combination digest algorithm includes: determining the attribute to be added; the attribute to be added is a custom attribute, or a preset number of attributes in the mail header of the encoded mail; setting the attribute to be added at a preset attributed position of the mail content part in the encoded mail to obtain the attribute combination mail content; using the digest algorithm to extract the digest of the attribute combination mail content to obtain the sender's summary string; The sender summary string is added to the mail header of the encoded mail to obtain the sender mail, and the sender mail is sent.
2. A method for decrypting mail to prevent tampering, characterized in that: The mail tamper-proof decryption method is applied to a terminal mail server in a mail server network; the mail server network includes a plurality of mail servers; the plurality of mail servers are interconnected; the mail servers are used to send or receive mails; When the mail server sends mail, it is the originating mail server; When the mail server receives mail, it is a terminal mail server; The email tamper-proof decryption method comprises: Receiving a sender's email; the sender's email is obtained by converting the sender's email writing data into a preset format by the sending email server; extracting a summary of the email content in the encoded email using an improved summary algorithm to obtain a sender's summary string, and adding the sender's summary string to the email header of the encoded email; Obtaining the sender summary string in the email header of the sender email; The improved digest algorithm is used to extract the digest of the email content part in the sender's email to obtain the receiver's digest string; the email content part includes the email body and attachments; the improved digest algorithm is a salted digest algorithm or an attribute combination digest algorithm; the salted digest algorithm includes: setting the salted string at a preset salting position of the email content part in the encoded email to obtain the salted email content; using the digest algorithm to extract the digest of the salted email content to obtain the sender's digest string; the attribute combination digest algorithm includes: determining the attribute to be added; the attribute to be added is a custom attribute, or a preset number of attributes in the email header of the encoded email; setting the attribute to be added at a preset attribute position of the email content part in the encoded email to obtain the attribute combination email content; using the digest algorithm to extract the digest of the attribute combination email content to obtain the sender's summary string; The tampering status of the mail writing data of the sender user is determined according to the recipient summary string and the sender summary string.
3. The mail tamper-proof decryption method according to claim 2, characterized in that: Determining the tampering status of the email writing data of the sender user according to the recipient summary string and the sender summary string includes: When the receiving party summary string is identical to the sending party summary string, determining that the tampering status of the email writing data of the sending user is not tampered with; When the recipient summary string is different from the sender summary string, the tampering status of the sender's email writing data is determined to be tampered with, and a tampering prompt email is generated according to the email header of the sender's email, and the tampering prompt email is sent to the sender's email sending mail server.
4. A method for preventing mail from being tampered with, characterized in that: The mail tamper-proof encryption method is applied to a mail server network; the mail server network includes a plurality of mail servers; the plurality of mail servers are interconnected; the mail servers are used to send or receive mails; When the mail server sends mail, it is the originating mail server; When the mail server receives mail, it is a terminal mail server; The mail anti-tampering processing method comprises: The sending mail server obtains the mail writing data of the sending user; The sending mail server converts the mail writing data into a preset format to obtain an encoded mail; The sending mail server uses an improved digest algorithm to extract the digest of the mail content part in the encoded mail to obtain a sender's digest string; the mail content part includes the mail body and attachments; the improved digest algorithm is a salted digest algorithm or an attribute combination digest algorithm; the salted digest algorithm includes: setting a salted string at a preset salted position of the mail content part in the encoded mail to obtain salted mail content; using a digest algorithm to extract the digest of the salted mail content to obtain a sender's digest string; the attribute combination digest algorithm includes: determining an attribute to be added; the attribute to be added is a custom attribute, or a preset number of attributes in the mail header of the encoded mail; setting the attribute to be added at a preset attributed position of the mail content part in the encoded mail to obtain attribute combination mail content; using a digest algorithm to extract the digest of the attribute combination mail content to obtain a sender's summary string; The sending mail server adds the sender summary string to the mail header of the encoded mail to obtain the sender mail; The sending mail server sends the sender mail to the target receiving mail server; The target receiving mail server receives the sender's mail; The target receiving end mail server obtains the sender summary string from the mail header of the sender mail; The target receiving end mail server uses an improved digest algorithm to extract a digest of the mail content part in the sender's mail to obtain a receiving end summary string; the mail content part includes the mail body and attachments; The target receiving-end mail server determines the tampering status of the mail writing data of the sending user according to the receiving-end summary string and the sending-end summary string.
5. The mail anti-tampering processing method according to claim 4, characterized in that: The target receiving-end mail server determines the tampering status of the mail writing data of the sending user according to the receiving-end summary string and the sending-end summary string, including: When the receiving party summary string is identical to the sending party summary string, determining that the tampering status of the email writing data of the sending user is not tampered with; When the recipient summary string is different from the sender summary string, the tampering status of the sender's email writing data is determined to be tampered with, and a tampering prompt email is generated according to the email header of the sender's email, and the tampering prompt email is sent to the sender's email sending mail server.
