[go: up one dir, main page]

CN118013553A - Method for encrypting text editing appointed content - Google Patents

Method for encrypting text editing appointed content Download PDF

Info

Publication number
CN118013553A
CN118013553A CN202410224938.5A CN202410224938A CN118013553A CN 118013553 A CN118013553 A CN 118013553A CN 202410224938 A CN202410224938 A CN 202410224938A CN 118013553 A CN118013553 A CN 118013553A
Authority
CN
China
Prior art keywords
information
encryption
text
ciphertext
key
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410224938.5A
Other languages
Chinese (zh)
Inventor
林绵雄
林瑞和
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Individual filed Critical Individual
Priority to CN202410224938.5A priority Critical patent/CN118013553A/en
Publication of CN118013553A publication Critical patent/CN118013553A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Human Computer Interaction (AREA)
  • Storage Device Security (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The invention discloses a method for encrypting text editing appointed content, which comprises a key generator, a cache processor and an encryption and decryption algorithm, wherein the key generator is used for generating a corresponding key according to password information, the cache processor is used for caching plaintext data and ciphertext data, and the encryption and decryption algorithm is used for executing encryption and decryption on the data, and the method has the beneficial effects that: the method can solve the encryption requirement of authors on part of information, does not influence the display effect of the existing editing interface, protects part of important information, and simultaneously does not influence the normal readability of text information. Has substantial protection value for important papers, experimental data and sensitive information.

Description

Method for encrypting text editing appointed content
Technical Field
The invention relates to the technical field of text editing, in particular to a method for encrypting text editing appointed content.
Background
In the computer era informatization process, various text editing tools are not available for editing, reading and sharing information; office OA, computer programming, and text editing specific to each industry are all independent of the corresponding text editing tools. The text information contains data information which is not lack of relevant important data information, such as experimental data, enterprise important business data, personal privacy data, paper core information, formula data, development core code and the like, and the important information is used as a part of a text information file. When the text files are stored, circulated, disclosed, shared and cooperatively edited, the important content is difficult to protect from being acquired (or read), and the safety protection processing cannot be performed in a targeted manner only through some basic processing (such as deletion, star beating, screenshot shielding and the like).
Disclosure of Invention
The invention aims to provide a method for encrypting text editing appointed content, which aims to solve the problem that in the background technology, an author of text editing can encrypt and protect the appointed editing content and other people cannot read important information original information at the same time in the text editing process.
In order to achieve the above purpose, the present invention provides the following technical solutions:
the method for encrypting the text editing appointed content comprises a key generator, a caching processor and an encryption and decryption algorithm, wherein the key generator is used for generating a corresponding key according to password information, the caching processor is used for caching plaintext data and ciphertext data, and the encryption and decryption algorithm is used for encrypting and decrypting the data and specifically comprises the following steps of:
s1, data encryption:
s1.1, in the process of editing text information, important content information can be appointed, and the encryption function of the appointed information is selected;
S1.2, the system pops up an input password window, an author inputs password information for encrypting the text, and a key generator generates a corresponding encryption key;
s1.3, the encryption algorithm encrypts the selected text according to the encryption key, displays ciphertext information in the same-position area, and sets the area as non-modifiable;
S2, decrypting data:
S2.1, selecting a ciphertext display area and selecting a decryption function of the specified information;
S2.2, the system pops up an input password window, the author inputs password information for encrypting the text, and a key generator generates a corresponding decryption key;
S2.3, the decryption algorithm decrypts the selected text ciphertext according to the decryption key, displays plaintext information in the same position area, and sets the area as modifiable;
S2.4, restoring the text to the original normal editing state.
As a preferred embodiment of the present invention: the key generator specifically comprises the following steps in operation:
S3.1, inputting password information set by an author;
s3.2, performing abstract calculation on the input password information;
S3.3, taking the first 16 bytes of the abstract information as a secret key (the length of the secret key is calculated according to the algorithm requirement);
s3.4, if the key length is insufficient, the subsequent value can be converted through password inversion and the like.
As a preferred embodiment of the present invention: the processing process of the buffer processor for the plaintext specifically comprises the following steps:
s4.1, performing summary calculation on the selected encrypted text information content;
s4.2, taking the first 8 bytes of the abstract result as a check code of a plaintext;
S4.3, storing the text and storing the check code together.
As a preferred embodiment of the present invention: the processing process of the ciphertext by the cache processor specifically comprises the following steps:
S5.1, performing summary calculation on the encrypted ciphertext information content;
S5.2, taking the first 8 bytes of the abstract result as a check code of the ciphertext;
S5.3, storing the text, and storing the check code together.
As a preferred embodiment of the present invention: the encryption and decryption algorithm performs the specific steps as follows:
S6.1, obtaining key information;
S6.2, encrypting the data cached in the plaintext (a customizable algorithm), and calculating the abstract of the ciphertext information;
s6.3, outputting ciphertext information and returning the ciphertext information to ciphertext caching.
As a preferred embodiment of the present invention: the specific steps of the decryption operation performed by the encryption and decryption algorithm are as follows:
S7.1, obtaining key information;
S7.2, checking the integrity of the ciphertext cache data, and decrypting the ciphertext cache data;
s7.3, outputting the plaintext information, checking the integrity of the plaintext information, and returning to the plaintext caching process.
As a preferred embodiment of the present invention: the password information is any visible character on the keyboard, the length is not limited, and the value length of the secret key is according to a specified algorithm and the basic length of the secret key.
As a preferred embodiment of the present invention: the encryption and decryption algorithm of the encryption and decryption algorithm is preferably a symmetric encryption algorithm in SM4 and AES, and the algorithm can be customized.
Compared with the prior art, the invention has the beneficial effects that:
The invention can solve the encryption requirement of authors on part of important information, does not influence the display effect of the existing editing interface, protects part of important information and simultaneously does not influence the normal readability of text information. Has substantial protection value for important papers, experimental data and sensitive information.
Drawings
FIG. 1 is a workflow diagram of the present invention;
FIG. 2 is a workflow diagram of an encryption process of the present invention;
fig. 3 is a workflow diagram of the decryption process of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, the present invention provides a technical solution:
the method for encrypting the text editing appointed content comprises a key generator, a caching processor and an encryption and decryption algorithm, wherein the key generator is used for generating a corresponding key according to password information, the caching processor is used for caching plaintext data and ciphertext data, and the encryption and decryption algorithm is used for encrypting and decrypting the data and specifically comprises the following steps of:
s1, data encryption:
s1.1, designating important information content information in the text information editing process, and selecting a designated encryption function;
S1.2, the system pops up an input password window, an author inputs password information for encrypting the text, and a key generator generates a corresponding encryption key;
s1.3, the encryption algorithm encrypts the selected text according to the encryption key, displays ciphertext information in the same-position area, and sets the area as non-modifiable;
S2, decrypting data:
s2.1, selecting a ciphertext display area, executing a decryption function, and generating a corresponding decryption key by a key generator;
S2.2, the system pops up an input password window, the author inputs password information for encrypting the text, and a key generator generates a corresponding encryption key;
S2.3, the decryption algorithm decrypts the selected text ciphertext according to the decryption key, displays plaintext information in the same position area, and sets the area as modifiable;
S2.4, restoring the text to the original normal editing state.
Further, the key generator specifically includes the following steps when in operation:
S3.1, inputting password information set by an author;
s3.2, performing abstract calculation on the input password information;
S3.3, taking the first 16 bytes of the abstract information as a secret key;
s3.4, if the key length is insufficient, the subsequent value can be converted through password inversion and the like.
Further, the processing procedure of the buffer processor on the plaintext specifically includes the following steps:
s4.1, performing summary calculation on the selected encrypted text information content;
s4.2, taking the first 8 bytes of the abstract result as a check code of a plaintext;
and S4.3, storing the text, and storing the check codes together.
Further, the processing procedure of the buffer processor on the ciphertext specifically includes the following steps:
S5.1, performing summary calculation on the encrypted ciphertext information content;
S5.2, taking the first 8 bytes of the abstract result as a check code of the ciphertext;
S5.3, storing the text, and storing the check code together.
Further, the encryption and decryption algorithm performs the following specific steps:
S6.1, obtaining key information;
S6.2, encrypting the data cached in the plaintext;
s6.3, outputting ciphertext information and returning the ciphertext information to ciphertext caching.
Further, the specific steps of the encryption and decryption algorithm for decryption operation are as follows:
S7.1, obtaining key information;
s7.2, decrypting the data cached in the ciphertext;
S6.3, outputting the plaintext information and returning to the plaintext caching process.
Further, the password information is any visible character on the keyboard, the length is not limited, and the value length of the secret key is according to a specified algorithm and the basic length of the secret key.
Further, the encryption and decryption algorithm of the encryption and decryption algorithm is preferably one of SM4 and AES.
Specifically, when the method is used, the specific operation steps are as follows:
encryption:
1. Text braid selection (hacker forum, trade market, extranet community, news community, 113016);
2. Encryption interactions
A. Inputting an encryption password: 12345678
B. Calculating password abstract and taking encryption key (SM 3 algorithm)
Digest value:
0FFFFF81E971FA3F09107ABF77931463FC0710BFB8962EFEAE3D5654B073BB0C
the key value takes the first 16 bytes, 0FFFFF81E971FA3F09107ABF77931463
C. summarizing plaintext information (SM 3 algorithm)
Digest value:
04C71E420647FA198F2A1B7240FEC732A7F3ECC79AC2863D8942EAB1B787624B
taking the first 8 bytes of the abstract: 04C71E420647FA19
D. Encrypting the plaintext by using the secret key to obtain ciphertext:
韕篹籿设罰緧嶺馵逄匁涉榝灊茣鷦沫帄賶参壜DM`4H
E. Summarizing ciphertext information (SM 3-HMAC)
Digest value:
A387AC44393A017F3A360EA78E5E128E7856244C3A3BD3C7D3966B10A78C7CB6
Taking the first 8 bytes of the abstract: a387AC44393A017F
F. outputting ciphertext:
韕篹籿设罰緧嶺馵逄匁涉榝灊茣鷦沫帄賶参壜DM`4H
3. Outputting an encryption result;
Decryption:
1. Text braiding selection
Text cache records information:
Ciphertext digest value: a387AC44393A017F
Plaintext digest value: 04C71E420647FA19
2. Decrypting interactions
A. Inputting a decryption password: 12345678
B. Calculating password abstract and taking encryption key (SM 3 algorithm)
Digest value:
0FFFFF81E971FA3F09107ABF77931463FC0710BFB8962EFEAE3D5654B073BB0C
the key value takes the first 16 bytes, 0FFFFF81E971FA3F09107ABF77931463
C. verification ciphertext abstract (SM 3-HMAC)
Calculating a digest value for the ciphertext:
A387AC44393A017F3A360EA78E5E128E7856244C3A3BD3C7D3966B10A78C7CB6
whether the first 8 bytes are identical to the original recorded ciphertext digest value.
D. decrypting the ciphertext with the key to obtain plaintext
Hack forum, trade market, extranet community, news community 113016
E. Verifying plaintext abstract (SM 3)
Calculating a digest value for the plaintext cloud:
04C71E420647FA198F2A1B7240FEC732A7F3ECC79AC2863D8942EAB1B787624B
whether the first 8 bytes are identical to the original record plaintext digest value.
F. Outputting plaintext
Hack forum, trade market, extranet community, news community 113016
3. And outputting a decryption result.
Although embodiments of the present invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made therein without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.

Claims (8)

1. The method for encrypting the text editing appointed content comprises a key generator, a cache processor and an encryption and decryption algorithm, and is characterized in that the key generator is used for generating a corresponding key according to password information, the cache processor is used for caching plaintext data and ciphertext data, and the encryption and decryption algorithm is used for encrypting and decrypting the data, and specifically comprises the following steps:
s1, data encryption:
s1.1, in the process of editing text information, important content information can be appointed, and the encryption function of the appointed information is selected;
S1.2, the system pops up an input password window, an author inputs password information for encrypting the text, and a key generator generates a corresponding encryption key;
s1.3, the encryption algorithm encrypts the selected text according to the encryption key, displays ciphertext information in the same-position area, and sets the area as non-modifiable;
S2, decrypting data:
S2.1, selecting a ciphertext display area and selecting a decryption function of the specified information;
S2.2, the system pops up an input password window, the author inputs password information for encrypting the text, and a key generator generates a corresponding decryption key;
S2.3, the decryption algorithm decrypts the selected text ciphertext according to the decryption key, displays plaintext information in the same position area, and sets the area as modifiable;
S2.4, restoring the text to the original normal editing state.
2. A method for text editing specified content encryption as recited in claim 1, wherein: the key generator specifically comprises the following steps in operation:
S3.1, inputting password information set by an author;
s3.2, performing abstract calculation on the input password information;
S3.3, taking the first 16 bytes of the abstract information as a secret key (the length of the secret key is calculated according to the algorithm requirement);
s3.4, if the key length is insufficient, the subsequent value can be converted through password inversion and the like.
3. A method for text editing specified content encryption as recited in claim 1, wherein: the processing process of the buffer processor for the plaintext specifically comprises the following steps:
s4.1, performing summary calculation on the selected encrypted text information content;
s4.2, taking the first 8 bytes of the abstract result as a check code of a plaintext;
S4.3, storing the text and storing the check code together.
4. A method for text editing specified content encryption as recited in claim 1, wherein: the processing process of the ciphertext by the cache processor specifically comprises the following steps:
S5.1, performing summary calculation on the encrypted ciphertext information content;
S5.2, taking the first 8 bytes of the abstract result as a check code of the ciphertext;
S5.3, storing the text, and storing the check code together.
5. A method for text editing specified content encryption as recited in claim 1, wherein: the encryption and decryption algorithm performs the specific steps as follows:
S6.1, obtaining key information;
S6.2, encrypting the data cached in the plaintext (a customizable algorithm), and calculating the abstract of the ciphertext information;
s6.3, outputting ciphertext information and returning the ciphertext information to ciphertext caching.
6. A method for text editing specified content decryption according to claim 1, wherein: the specific steps of the decryption operation performed by the encryption and decryption algorithm are as follows:
S7.1, obtaining key information;
S7.2, checking the integrity of the ciphertext cache data, and decrypting the ciphertext cache data;
s7.3, outputting the plaintext information, checking the integrity of the plaintext information, and returning to the plaintext caching process.
7. A method for text editing specified content encryption as claimed in claim 2, wherein: the password information is any visible character on the keyboard, the length is not limited, and the value length of the secret key is according to a specified algorithm and the basic length of the secret key.
8. A method for text editing specified content encryption as recited in claim 1, wherein: the encryption and decryption algorithm of the encryption and decryption algorithm is preferably a symmetric encryption algorithm in SM4 and AES, and the algorithm can be customized.
CN202410224938.5A 2024-02-28 2024-02-28 Method for encrypting text editing appointed content Pending CN118013553A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410224938.5A CN118013553A (en) 2024-02-28 2024-02-28 Method for encrypting text editing appointed content

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410224938.5A CN118013553A (en) 2024-02-28 2024-02-28 Method for encrypting text editing appointed content

Publications (1)

Publication Number Publication Date
CN118013553A true CN118013553A (en) 2024-05-10

Family

ID=90956168

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410224938.5A Pending CN118013553A (en) 2024-02-28 2024-02-28 Method for encrypting text editing appointed content

Country Status (1)

Country Link
CN (1) CN118013553A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118965381A (en) * 2024-07-16 2024-11-15 上海腾你信息科技有限公司 A secure and reliable information leakage prevention system capable of real-time encryption

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118965381A (en) * 2024-07-16 2024-11-15 上海腾你信息科技有限公司 A secure and reliable information leakage prevention system capable of real-time encryption

Similar Documents

Publication Publication Date Title
US10958638B2 (en) Securely sharing confidential information in a document
US8175268B2 (en) Generating and securing archive keys
CN106682521B (en) File transparent encryption and decryption system and method based on driver layer
CN101719209A (en) General digital rights protection method on WINDOWS platform
Park et al. Research on Note-Taking Apps with Security Features.
KR102417814B1 (en) Electronic document management server that supports security settings for some content embedded in electronic documents based on member identification information and operating method thereof
KR102136656B1 (en) Electronic terminal device capable of processing conditional security settings for a memo entered in a spreadsheet and operating method thereof
CN118013553A (en) Method for encrypting text editing appointed content
US12238200B2 (en) Cryptographic technique for encrypting and decrypting on a single data processing device
Sassani et al. Evaluating encryption algorithms for sensitive data using different storage devices
CN110113151A (en) A kind of non-intrusion type real-time encryption and decryption method of pair of ELF format program
CN103379133A (en) Safe and reliable cloud storage system
CN103516722A (en) Subscriber stage file automatic encryption and decryption method and device
CN113806785B (en) Method and system for carrying out security protection on electronic document
CN101018117A (en) Webpage log encryption system and method
CN114629643A (en) Key processing method, device and medium
CN108540426A (en) A method, device and server for realizing data processing
CN112883397A (en) Data storage method, data reading method, device, equipment and storage medium
Alkhadhr et al. Cryptography and randomization to dispose of data and boost system security
CN114969789B (en) Host-based password ciphertext storage and use method and device
KR102417811B1 (en) Document translation service server which provides document translation services with personal information protection function and the operating method thereof
CN115470525B (en) File protection method, system, computing device and storage medium
US20130036474A1 (en) Method and Apparatus for Secure Data Representation Allowing Efficient Collection, Search and Retrieval
JP5540584B2 (en) Electronic document browsing system, method and computer program
CN116028971A (en) Method, system, equipment and storage medium for desensitizing enterprise credit investigation data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination