ENCRYPTION METHOD
20220337391 · 2022-10-20
Inventors
- Chang Hsien Sung (New Taipei City, TW)
- Chun Hao Chang (New Taipei City, TW)
- Yu Cheng Wu (New Taipei City, TW)
Cpc classification
H04L9/0618
ELECTRICITY
H04L9/065
ELECTRICITY
International classification
Abstract
A encryption method comprising: (a) segmenting a data stream into a plurality of equal length blocks, wherein each equal length block of the plurality of equal length blocks has a fixed length; (b) verifying the readability of the plurality of blocks segmented form the data stream, and then performing step (c) if any of blocks segmented from the data stream is sorted to be readable, and performing step (d) if the blocks segmented from the data stream are all un-readable; (c) encrypting the block that is readable; (d) encrypting the block in specific order in the sequence.
Claims
1. A machine-readable storage medium having stored thereon machine-readable instructions to cause a processor to: (a) segment a data stream into a plurality of equal length blocks, wherein each equal length block of the plurality of equal length blocks has a fixed length; (b) verify the readability of the plurality of blocks segmented form the data stream, and then to perform step (c) if any of blocks segmented from the data stream is sorted to be readable, and to perform step (d) if the blocks segmented from the data stream are all un-readable; (c) encrypt the block that is readable; (d) encrypt the block in specific order in the sequence.
2. The medium as claimed in claim 1, wherein the instructions to cause a processor to perform the instruction (b) verifying the readability of the blocks by measuring the data size of the data stream, and identifying the block as readable if the block contains a data stream which is shorter than the fixed block length.
3. The medium as claimed in claim 1, wherein the instructions to cause a processor to perform the instruction (b) verifying the readability of the blocks by examine the data formation of the data stream, and identifying the first block of the data stream as readable if the data formation of the data stream contains a header.
4. A method comprising: (a) segmenting a data stream into a plurality of equal length blocks, wherein each equal length block of the plurality of equal length blocks has a fixed length; (b) verifying the readability of the plurality of blocks segmented form the data stream, and then performing step (c) if any of blocks segmented from the data stream is sorted to be readable, and performing step (d) if the blocks segmented from the data stream are all un-readable; (c) encrypting the block that is readable; (d) encrypting the block in specific order in the sequence.
5. The method as claimed in claim 4, wherein the step (b) further comprising verifying the readability of the blocks by measuring the data size of the data stream, and identifying the block as readable if the block contains a data stream which is shorter than the fixed block length.
6. The method as claimed in claim 4, wherein the step (b) further comprising verifying the readability of the blocks by examine the data formation of the data stream, and identifying the first block of the data stream as readable if the data formation of the data stream contains a header.
7. A system comprising: a processor; and a memory storing machine readable instructions to cause the processor to: (a) segment a data stream into a plurality of equal length blocks, wherein each equal length block of the plurality of equal length blocks has a fixed length; (b) verify the readability of the plurality of blocks segmented form the data stream, and then to perform step (c) if any of blocks segmented from the data stream is sorted to be readable, and to perform step (d) if the blocks segmented from the data stream are all un-readable; (c) encrypt the block that is readable; (d) encrypt the block in specific order in the sequence.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The present invention will be apparent to those skilled in the art by reading the following description, with reference to the attached drawings, in which:
[0018]
[0019]
[0020]
[0021]
[0022]
[0023]
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT
[0024] Reference will now be made in detail to embodiments, examples of which are illustrated in the accompanying drawings. In the following detailed description, numerous specific details are set forth in order to provide a thorough understanding of the present invention. However, it will be apparent to one of ordinary skill in the art that the present invention may be practiced without these specific details. In other instances, well-known methods, procedures, components, and circuits have not been described in detail so as not to unnecessarily obscure aspects of the embodiments.
[0025]
[0026] Instructions A01 stored on transmitting device memory are to cause transmitting device processor to segment a data stream into a plurality of blocks. The term “data stream” as used herein can, for example, refer to a plaintext message or information that is readable and meaningful to humans or to a computer. For example, such a data stream can be in the form of a textual message, computer code (e.g., to run a program, produce an image, etc.), image data, or any other suitable information to be communicated between entities. The term “plaintext” as used herein can generally refer to a representation of data before any action has been taken to conceal, compress, or digest it. The term “block” as used herein can, for example, refer to a fixed-length groups of bits of the largest protocol data unit that the network layer can transfer. Referring to
[0027] In some implementations, most of the data streams become un-readable as they are segmented into blocks, because not a single block contains enough information that is meaningful to human or to a computer, but in some situation, the segmented blocks may still be readable. For example, the data stream is shorter than a block size so the whole data stream is contained in a single block (e.g., a command code for control the receiving device), or the data stream is consisted of a sequence of fixed segments, and the block contains a certain segment which can be interpreted independently without reference to other segments (e.g., header of a JPEG file, a textual message, protocol parameters between devices, etc.).
[0028] Instructions A02 to A04 stored on transmitting device memory are to cause transmitting device processor to encrypt the blocks that meet the predefined conditions to ensure at least one block of the data stream is encrypted. Referring to
[0029] Instructions A05 stored on transmitting device memory are to cause data transmitting unit to transmit the blocks to the receiving device, and instructions B01 stored on receiving device memory are to cause data receiving unit to receive the blocks from the transmitting device. In some implementations, referring to
[0030] Instructions B02 stored on receiving device memory are to cause receiving device processor to decrypt blocks that meet the predefined conditions, and the rule for choosing which block to decrypt in the instructions B02 is same as the rule for choosing which block to encrypt in the instructions A01 to ensure every encrypted block are decrypted before concatenating. In some implementations, the receiving device processor decrypts the blocks that contains a whole data stream. In some implementations, the receiving device processor decrypts the blocks that contains readable information. As an example, the data stream is a JPEG image of which the first block contains a readable header 111, so the receiving device processor decrypts the information first block of the data stream. In some implementations, the receiving device processor counts the quantity of blocks of the data stream, and decrypts the blocks in specific order in the sequence. As an example, the receiving device processor counts the quantity of received blocks, and decrypts every second block in sequence. It is appreciated that any suitable block of data from each data stream can be used. As another example, in some implementations, the receiving device processor decrypts the last block in sequence.
[0031] Instructions B03 stored on receiving device memory are to cause receiving device processor to concatenate all blocks of the data stream into a single plaintext.
[0032] In some implementations, the transmitting device is a scanning device, the receiving device is an electronical device, the data streams are images scanned by the transmitting device, the transmitting device processor is a MPU of the scanning device, the receiving device processor is a MPU of the electronical device, and the instructions that when executed by the transmitting device processor and the receiving device processor are to encrypt the data streams and to transmit the data streams are stored in the scanning device and the electronical device. In some implementations, the transmitting device is an electronical device, the receiving device is an exporting device (e.g., a printer) for exporting data of images. The electronical device encrypts the data streams and transmits the data stream to the exporting device, and the exporting device decrypts the data streams and prints it out. In some implementations, the transmitting device and the receiving device are both electronical devices, so that the transmitting device encrypts the data streams and transmits the data streams to the receiving device, and the receiving device decrypts the data streams for further processing (e.g., store the data, display the data, etc.).
[0033] In some implementations, the encryption method in this invention is applicated on a scanner of which the scan rate is 60 image per minute (ipm), and the quantity of images to be scanned are 60. The images to be scanned are scanned in three different image quality (e.g., high, medium, and low quality) and the total data size of each scanning results are 548 MB, 325 MB, and 172 MB. If the scanning results are encrypted with the conventional encryption method and each block size is set to 0.5 MB, then the number of encryptions would be 1096 times for high quality images, 650 times for medium quality images and 344 times for low quality images. However, if the scanning results are encrypted with the encryption method in this invention and the block size remains 0.5 MB, then the number of encryptions would be 60 times no matter what kind of image quality the images are, since the encryption method in this invention only encrypts the blocks that contains header. Therefore, images can be encrypted in only 20 seconds and only takes 60 encryptions for the encryption method in this invention while still providing acceptable security in comparing to the conventional encryption method that takes roughly 361 seconds and 1096 encryptions to encrypt all the images. The encryption method of the present disclosure is far more efficient than conventional methods.
[0034] In summary, the encryption method in this invention encrypts the blocks that meet the predefined conditions to save time on encryption while still providing acceptable security.