TW201911105A - Encryption and decryption system, encryption and decryption method, and non-transitory computer readable recording medium - Google Patents

Encryption and decryption system, encryption and decryption method, and non-transitory computer readable recording medium Download PDF

Info

Publication number
TW201911105A
TW201911105A TW106127364A TW106127364A TW201911105A TW 201911105 A TW201911105 A TW 201911105A TW 106127364 A TW106127364 A TW 106127364A TW 106127364 A TW106127364 A TW 106127364A TW 201911105 A TW201911105 A TW 201911105A
Authority
TW
Taiwan
Prior art keywords
original
file
blocks
original block
encrypted
Prior art date
Application number
TW106127364A
Other languages
Chinese (zh)
Inventor
李信穎
陳守賢
謝周熾
孫美君
Original Assignee
新穎數位文創股份有限公司
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 新穎數位文創股份有限公司 filed Critical 新穎數位文創股份有限公司
Priority to TW106127364A priority Critical patent/TW201911105A/en
Priority to CN201810609735.2A priority patent/CN109388964A/en
Publication of TW201911105A publication Critical patent/TW201911105A/en

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/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • 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
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2107File encryption

Abstract

An encryption/decryption system that includes a division module, a disarrangement module and a reconstruction module. The division module is used to slice the file, that requires encryption, into blocks that contains their original block information. The disarrangement module is connected to the division module and is used to randomly disarrange the original blocks to form an encrypted file. The reconstruction module is connected to the division module and disarrangement module, and receives the original block information of the original blocks and the encrypted file. The reconstruction module then reconstructs the original file based on the encrypted file and the original block information it receives.

Description

加解密系統、加解密方法以及非暫態電 腦可讀取記錄媒體    Encryption and decryption system, encryption and decryption method, and non-transitory computer-readable recording medium   

本揭示文件係關於一種加解密系統、加解密方法以及非暫態電腦可讀取記錄媒體,尤指一種用於電子檔案的加解密系統、加解密方法以及非暫態電腦可讀取記錄媒體。 The present disclosure relates to an encryption and decryption system, an encryption and decryption method, and a non-transitory computer-readable recording medium, and more particularly, to an encryption and decryption system for an electronic file, an encryption and decryption method, and a non-transitory computer-readable recording medium.

為避免檔案被未經授權的人不當使用,一般來說會將此檔案進行加密,並將加密的鑰匙給予經授權的人予以解密此檔案。然而,習知的檔案加解密機制往往要經過一連串的計算而過於複雜,對於加解密系統而言造成一定的負擔。 To prevent the file from being used improperly by unauthorized persons, the file is generally encrypted and an encrypted key is given to an authorized person to decrypt the file. However, the conventional file encryption and decryption mechanism is often too complicated after a series of calculations, which causes a certain burden for the encryption and decryption system.

本揭示文件係揭示一種加解密系統、加解密方法以及非暫態電腦可讀取記錄媒體。 The present disclosure discloses an encryption and decryption system, an encryption and decryption method, and a non-transitory computer-readable recording medium.

本揭示文件的一種加解密系統包含切割模組、排列模組以及還原模組。切割模組用以將待加密檔案切割成各自具有原始區塊資訊的複數個原始區塊。排列模組係與切割模組連接,用以隨機排列原始區塊以形成加密檔案。還原模組係與切割模組以及排列模組連接,用以接收原始區塊的原始區塊資訊以及加密檔案,並基於原始區塊的原始區塊資訊將加密檔案還原成對應待加密檔案的還原檔案。 An encryption and decryption system of the present disclosure includes a cutting module, an arranging module, and a restoring module. The cutting module is used to cut the file to be encrypted into a plurality of original blocks each having original block information. The arranging module is connected with the cutting module to randomly arrange the original blocks to form an encrypted file. The restoration module is connected to the cutting module and the arrangement module to receive the original block information of the original block and the encrypted file, and restore the encrypted file to the restoration corresponding to the file to be encrypted based on the original block information of the original block. file.

本揭示文件的一種加解密方法包含以下步驟:接收待加密檔案;將待加密檔案切割成各自具有原始區塊資訊的複數個原始區塊;隨機排列原始區塊、隨機排列原始區塊與複數添加區塊的組合,或組合添加區塊與經隨機排列的原始區塊的步驟,形成加密檔案;以及接收原始區塊的原始區塊資訊以及加密檔案,並基於原始區塊的原始區塊資訊將加密檔案還原成對應待加密檔案的還原檔案。 An encryption and decryption method of the disclosed document includes the following steps: receiving a file to be encrypted; cutting the file to be encrypted into a plurality of original blocks each having original block information; randomly arranging the original blocks, randomly arranging the original blocks, and adding the plural numbers The combination of blocks, or the steps of adding blocks and randomly arranged original blocks to form encrypted files; and receiving the original block information and encrypted files of the original blocks, and based on the original block information of the original blocks, The encrypted file is restored to a restored file corresponding to the file to be encrypted.

本揭示文件的一種非暫態電腦可讀取記錄媒體,該非暫態電腦可讀取記錄媒體記錄至少一程式指令,該至少一程式指令在載入一加解密系統後,執行下列步驟:接收待加密檔案;將待加密檔案切割成各自具有原始區塊資訊的複數個原始區塊;隨機排列原始區塊、隨機排列原始區塊與複數添加區塊的組合,或組合添加區塊與經隨機排列的原始區塊的步驟,形成加密檔案;以及接收原始區塊的原始區塊資訊以及加密檔案,並基於原始區塊的原始區塊資訊將加密檔案還原成對應待加密檔案的還原檔案。 A non-transitory computer of the present disclosure can read a recording medium. The non-transitory computer can read the recording medium and record at least one program instruction. After the at least one program instruction is loaded into an encryption and decryption system, the following steps are performed: Encrypted files; cut files to be encrypted into multiple original blocks each with original block information; randomly arranged original blocks, a combination of randomly arranged original blocks and plural added blocks, or a combination of added blocks and randomly arranged The step of forming the original block is to form an encrypted file; and to receive the original block information and the encrypted file of the original block, and restore the encrypted file to a restored file corresponding to the file to be encrypted based on the original block information of the original block.

100‧‧‧加解密系統 100‧‧‧ encryption and decryption system

110‧‧‧轉換模組 110‧‧‧ Conversion Module

120‧‧‧切割模組 120‧‧‧ cutting module

140‧‧‧排列模組 140‧‧‧Array Module

160‧‧‧還原模組 160‧‧‧Restore module

200‧‧‧加解密系統 200‧‧‧ encryption and decryption system

210‧‧‧轉換模組 210‧‧‧ Conversion Module

220‧‧‧切割模組 220‧‧‧ cutting module

230‧‧‧添加模組 230‧‧‧Add Module

240‧‧‧排列模組 240‧‧‧Array Module

242‧‧‧組合單元 242‧‧‧Combination Unit

244‧‧‧打散單元 244‧‧‧ Break up unit

260‧‧‧還原模組 260‧‧‧Restore Module

300‧‧‧加解密系統 300‧‧‧ encryption and decryption system

310‧‧‧轉換模組 310‧‧‧ Conversion Module

320‧‧‧切割模組 320‧‧‧ cutting module

330‧‧‧添加模組 330‧‧‧Add Module

340‧‧‧排列模組 340‧‧‧Arrange Module

342‧‧‧組合單元 342‧‧‧Combination unit

344‧‧‧打散單元 344‧‧‧Disruption unit

360‧‧‧還原模組 360‧‧‧ Recovery Module

AB1~AB3‧‧‧第一添加區塊~第三添加區塊 AB1 ~ AB3‧‧‧The first added block ~ the third added block

ED‧‧‧加密檔案 ED‧‧‧Encrypted File

H1,H2‧‧‧高度 H1, H2 ‧‧‧ height

W1,W2‧‧‧寬度 W1, W2‧‧‧Width

OB1~OB9‧‧‧第一原始區塊~第九原始區塊 OB1 ~ OB9‧‧‧ the first original block ~ the ninth original block

OBI‧‧‧原始區塊資訊 OBI‧‧‧Original Block Information

OD‧‧‧待加密檔案 OD‧‧‧File to be encrypted

RD‧‧‧還原檔案 RD‧‧‧Restore File

ADS‧‧‧添加階段 ADS‧‧‧Add Phase

ARS‧‧‧排列階段 ARS‧‧‧Rank

RCS‧‧‧接收階段 RCS‧‧‧ Reception Phase

RSS‧‧‧還原階段 RSS‧‧‧ Restore stage

DVS‧‧‧切割階段 DVS‧‧‧ cutting stage

URSS‧‧‧未還原階段 URSS‧‧‧Not restored

M100‧‧‧加解密方法 M100‧‧‧Encryption and decryption method

M200‧‧‧加解密方法 M200‧‧‧Encryption and decryption method

M300‧‧‧加解密方法 M300‧‧‧Encryption and decryption method

S120~S180‧‧‧步驟 S120 ~ S180‧‧‧step

S220~S280‧‧‧步驟 S220 ~ S280‧‧‧step

S320~S380‧‧‧步驟 S320 ~ S380‧‧‧step

為讓本揭示內容之上述和其他目的、特徵、優點與實施例能更明顯易懂,所附圖式之說明如下:第1圖為根據本揭示文件一實施例所示之加解密系統的功能方塊圖。 In order to make the above and other objects, features, advantages, and embodiments of the present disclosure more comprehensible, the description of the drawings is as follows: FIG. 1 is a function of an encryption and decryption system according to an embodiment of the present disclosure. Block diagram.

第2圖為根據本揭示文件一實施例所示之加解密方法的流程示意圖。 FIG. 2 is a schematic flowchart of an encryption / decryption method according to an embodiment of the present disclosure.

第3圖為利用第1圖所示之加解密系統進行文件加解密的流程示意圖。 FIG. 3 is a schematic flowchart of file encryption and decryption using the encryption and decryption system shown in FIG.

第4A圖為根據本揭示文件一實施例所示之已切割成3X3原始區塊的待加密檔案的示意圖。 FIG. 4A is a schematic diagram of a file to be encrypted that has been cut into 3 × 3 original blocks according to an embodiment of the disclosure document.

第4B圖為對應第4A圖所示之原始區塊的位置資訊以、第4B圖以及旋轉資訊的示意圖。 FIG. 4B is a schematic diagram corresponding to the position information of the original block shown in FIG. 4A, FIG. 4B, and rotation information.

第4C圖為第4A圖所示之原始區塊與由第4B圖所示之位置資訊、尺寸資訊以及旋轉資訊組成的原始區塊資訊的對照表。 FIG. 4C is a comparison table between the original block shown in FIG. 4A and the original block information composed of position information, size information, and rotation information shown in FIG. 4B.

第5圖為根據本揭示文件另一實施例所示之加解密系統的功能方塊圖。 FIG. 5 is a functional block diagram of an encryption / decryption system according to another embodiment of the present disclosure.

第6圖為根據本揭示文件另一實施例所示之加解密方法的流程示意圖。 FIG. 6 is a schematic flowchart of an encryption / decryption method according to another embodiment of the present disclosure.

第7圖為利用第5圖所示之加解密系統進行文件加解密的流程示意圖。 FIG. 7 is a flowchart of file encryption and decryption using the encryption and decryption system shown in FIG. 5.

第8圖為根據本揭示文件又一實施例所示之加解密系統的功能方塊圖。 FIG. 8 is a functional block diagram of an encryption / decryption system according to another embodiment of the present disclosure.

第9圖為根據本揭示文件又一實施例所示之加解密方法的流程示意圖。 FIG. 9 is a schematic flowchart of an encryption / decryption method according to another embodiment of the present disclosure.

第10圖為利用第8圖所示之加解密系統進行檔案加解密的流程示意圖。 FIG. 10 is a schematic flowchart of file encryption and decryption using the encryption and decryption system shown in FIG. 8.

下文係舉實施例配合所附圖式作詳細說明,以更好地理解本案的態樣,但所供給之實施例並非用以限制本案所涵蓋的範圍,而結構操作之描述非用以限制其執行之順序,任何由元件重新組合之結構,所產生具有均等功效的裝置,皆為本案所涵蓋的範圍。 The following is a detailed description of the embodiments with the accompanying drawings to better understand the situation of the case, but the examples provided are not intended to limit the scope covered by the case, and the description of the structural operation is not used to limit it. In the order of execution, any structure that reassembles the components and produces a device with equal efficacy is within the scope of this case.

請同時參照第1圖、第2圖以及第3圖。第1圖為根據本揭示文件一實施例所示之加解密系統100的功能方塊圖,第2圖為根據本揭示文件一實施例所示之加解密方法M100的流程示意圖,第3圖為利用第1圖所示之加解密系統100進行檔案加解密的流程示意圖。 Please refer to Figure 1, Figure 2, and Figure 3 at the same time. FIG. 1 is a functional block diagram of the encryption and decryption system 100 according to an embodiment of the present disclosure document, FIG. 2 is a flowchart of the encryption and decryption method M100 according to an embodiment of the present disclosure document, and FIG. FIG. 1 is a schematic diagram of a file encryption / decryption process performed by the encryption / decryption system 100 shown in FIG. 1.

於本實施例中,加解密系統100可應用加解密方法M100來對檔案進行加解密。進一步地,加解密方法M100的步驟流程可藉由一種非暫態可讀取記錄媒體記錄至少一程式指令,此至少一程式指令在載入加解密系統100後,執行加解密方法M100,加解密方法包含步驟S120、步驟S140、步驟S160以及步驟S180。 In this embodiment, the encryption / decryption system 100 can apply the encryption / decryption method M100 to encrypt / decrypt files. Further, the step flow of the encryption and decryption method M100 can record at least one program instruction through a non-transitory readable recording medium. After the at least one program instruction is loaded into the encryption and decryption system 100, the encryption and decryption method M100 is executed to encrypt and decrypt The method includes steps S120, S140, S160, and S180.

加解密系統100包含切割模組120、排列模組140以及還原模組160。切割模組120與排列模組140以及還原模組160 連接,排列模組140與還原模組160連接。 The encryption and decryption system 100 includes a cutting module 120, an arranging module 140, and a reduction module 160. The cutting module 120 is connected to the alignment module 140 and the reduction module 160, and the alignment module 140 is connected to the reduction module 160.

於一實施例中,切割模組120可依據步驟S120接收尺寸為15(cm)x15(cm)(即寬度W1為15(cm),高度H1為15(cm))的待加密檔案OD(如第3圖的接收階段RCS所示)。切割模組120將待加密檔案OD切割成各自具有原始區塊資訊OBI的九個原始區塊(如第3圖的切割階段DVS所示),分別是第一原始區塊OB1、第二原始區塊OB2、第三原始區塊OB3、第四原始區塊OB4、第五原始區塊OB5、第六原始區塊OB6、第七原始區塊OB7、第八原始區塊OB8以及第九原始區塊OB9,其中第一原始區塊OB1至第九原始區塊OB9的形狀為方形,且第一原始區塊OB1至第九原始區塊OB9的尺寸為5(cm)x5(cm)(即寬度W2為5(cm),高度H2為5(cm))。於一實施例中,待加密檔案OD的原始來源OS可以是一個如第3圖中所示的圖片檔,但本揭示文件並不以此為限。 In an embodiment, the cutting module 120 may receive the files to be encrypted OD (such as the width W1 is 15 (cm) and the height H1 is 15 (cm)) according to step S120 (such as the width W1 is 15 (cm) and the height H1 is 15 (cm)). Figure 3 shows the reception phase RCS). The cutting module 120 cuts the files to be encrypted OD into nine original blocks each having original block information OBI (as shown in the cutting stage DVS in FIG. 3), which are the first original block OB1 and the second original region, respectively. Block OB2, third original block OB3, fourth original block OB4, fifth original block OB5, sixth original block OB6, seventh original block OB7, eighth original block OB8, and ninth original block OB9, where the shapes of the first original block OB1 to the ninth original block OB9 are square, and the size of the first original block OB1 to the ninth original block OB9 is 5 (cm) x 5 (cm) (that is, the width W2 5 (cm) and height H2 is 5 (cm)). In an embodiment, the original source OS of the file OD to be encrypted may be a picture file as shown in FIG. 3, but this disclosure file is not limited thereto.

於另一實施例中,待加密檔案OD的原始來源OS可以為非圖片檔的文字檔、圖文交錯的報導或網頁等,加解密系統100更可進一步包含轉換模組110,用以將原始來源OS為非圖片檔的待加密內容轉換為圖片化之後的待加密檔案OD。於此實施例中,若待加密檔案OD的原始來源OS並非圖片檔時(例如文字檔、圖文交錯的報導或網頁等,第3圖中未示),轉換模組110可將上述原始來源OS轉換為圖片格式,並傳送至切割模組120,切割模組120將圖片化之後的待加密檔案OD進行切割,也就是說,即使待加密的原始來源OS是純文字檔案,加解密系統100亦可以將其透過轉換模組110轉換為待加密檔案OD後進行 後續處理。 In another embodiment, the original source OS of the file OD to be encrypted may be a text file that is not a picture file, a report with interlaced text or a web page, etc. The encryption and decryption system 100 may further include a conversion module 110 for converting the original The content to be encrypted whose source OS is a non-picture file is converted into an image to be encrypted OD after being imaged. In this embodiment, if the original source OS of the file to be encrypted OD is not a picture file (such as a text file, a report with interlaced graphics or a web page, etc., not shown in Figure 3), the conversion module 110 may transfer the original source The OS is converted into a picture format and transmitted to the cutting module 120. The cutting module 120 cuts the OD file to be encrypted after the picture is cut, that is, even if the original source OS to be encrypted is a plain text file, the encryption and decryption system 100 It can also be converted to a file to be encrypted OD through the conversion module 110 for subsequent processing.

應注意的是,本實施例所述之待加密檔案OD的尺寸、原始區塊的數量、原始區塊的形狀以及原始區塊的尺寸僅為例示,並不以此為限。 It should be noted that the size of the file to be encrypted OD described in this embodiment, the number of original blocks, the shape of the original blocks, and the size of the original blocks are merely examples, and are not limited thereto.

進一步地,第一原始區塊OB1至第九原始區塊OB9更具有相對應的原始區塊資訊OBI,且原始區塊資訊OBI包含第一原始區塊OB1至第九原始區塊OB9的位置資訊PI以尺寸資訊SI以及旋轉資訊RI,其中位置資訊PI、尺寸資訊SI以及旋轉資訊RI分別表示第一原始區塊OB1至第九原始區塊OB9的位置、尺寸以及旋轉角度。 Further, the first original block OB1 to the ninth original block OB9 have corresponding original block information OBI, and the original block information OBI includes the position information of the first original block OB1 to the ninth original block OB9. PI uses size information SI and rotation information RI, where position information PI, size information SI, and rotation information RI indicate the positions, sizes, and rotation angles of the first original block OB1 to the ninth original block OB9, respectively.

為更清楚說明原始區塊資訊OBI,請一併參照第4A圖、第4B圖以及第4C圖。第4A圖為根據本揭示文件一實施例所示之已切割成3X3原始區塊(即第一原始區塊OB1至第九原始區塊OB9)的待加密檔案OD的示意圖,第4B圖為對應第4A圖所示之第一原始區塊OB1至第九原始區塊OB9的位置資訊PI、尺寸資訊SI以及旋轉資訊RI的示意圖,第4C圖為第4A圖所示之第一原始區塊OB1至第九原始區塊OB9與由第4B圖所示之位置資訊PI、尺寸資訊SI以及旋轉資訊RI組合成的原始區塊資訊OBI的對照表。 In order to explain the original block information OBI more clearly, please refer to FIG. 4A, FIG. 4B, and FIG. 4C together. FIG. 4A is a schematic diagram of an OD file to be encrypted that has been cut into 3 × 3 original blocks (ie, the first original block OB1 to the ninth original block OB9) according to an embodiment of the disclosure document, and FIG. 4B is a corresponding diagram. A schematic diagram of position information PI, size information SI, and rotation information RI of the first to ninth original blocks OB1 to OB9 shown in FIG. 4A. FIG. 4C is the first original block OB1 shown in FIG. 4A. The comparison table between the ninth original block OB9 and the original block information OBI composed of the position information PI, the size information SI, and the rotation information RI shown in FIG. 4B.

如第4A圖所示,待加密檔案OD的尺寸為15(cm)x15(cm),即寬度W1以及高度H1皆為15(cm),且待加密檔案OD被切割成3X3個方形的原始區塊(即第一原始區塊OB1至第九原始區塊OB9),因此每一個原始區塊的尺寸如第4B圖所示為5(cm)x5(cm),即寬度W2以及高度H2皆為5(cm)。 As shown in Figure 4A, the size of the file OD to be encrypted is 15 (cm) x 15 (cm), that is, the width W1 and the height H1 are both 15 (cm), and the file OD to be encrypted is cut into 3X3 square original areas. Blocks (ie, the first original block OB1 to the ninth original block OB9), so the size of each original block is 5 (cm) x 5 (cm) as shown in Figure 4B, that is, the width W2 and height H2 are both 5 (cm).

接著,將每一個原始區塊的位置資訊PI、尺寸資訊SI以及旋轉資訊RI定義出來,再將位置資訊PI、尺寸資訊SI以及旋轉資訊RI組合在一起即可定義出原始區塊資訊OBI。詳言之,位置資訊PI可用二維座標系的座標來表示,尺寸資料SI可用經切割的原始區塊之寬度以及高度來表示,旋轉資訊RI可用經切割的原始區塊之旋轉角度來表示。 Then, the position information PI, size information SI, and rotation information RI of each original block are defined, and then the position information PI, size information SI, and rotation information RI are combined to define the original block information OBI. In detail, the position information PI can be expressed by the coordinates of the two-dimensional coordinate system, the size data SI can be expressed by the width and height of the cut original block, and the rotation information RI can be expressed by the rotation angle of the cut original block.

具體來說,如第4B圖所示,先將二維座標系統建立於已切割成3X3原始區塊的待加密檔案OD上,再將第五原始區塊OB5的中心點座標定義為(0,0),因此第一原始區塊OB1、第二原始區塊OB2、第三原始區塊OB3、第四原始區塊OB4、第六原始區塊OB6、第七原始區塊OB7、第八原始區塊OB8以及第九原始區塊OB9的中心點座標分別為(-5,5)、(0,5)、(5,5)、(-5,0)、(5,0)、(-5,-5)、(0,-5)、(5,-5)。藉此,可以得到第一原始區塊OB1至第九原始區塊OB9的位置資訊PI。 Specifically, as shown in FIG. 4B, the two-dimensional coordinate system is first established on the to-be-encrypted file OD that has been cut into 3X3 original blocks, and then the center point coordinate of the fifth original block OB5 is defined as (0, 0), so the first original block OB1, the second original block OB2, the third original block OB3, the fourth original block OB4, the sixth original block OB6, the seventh original block OB7, and the eighth original region The coordinates of the center points of the block OB8 and the ninth original block OB9 are (-5,5), (0,5), (5,5), (-5,0), (5,0), (-5 , -5), (0, -5), (5, -5). Thereby, the position information PI of the first original block OB1 to the ninth original block OB9 can be obtained.

此外,由於第一原始區塊OB1至第九原始區塊OB9的寬度W2為5(cm)、高度H2為5(cm),因此可以得第一原始區塊OB1至第九原始區塊OB9的尺寸資訊SI。 In addition, since the width W2 of the first original block OB1 to the ninth original block OB9 is 5 (cm) and the height H2 is 5 (cm), the first original block OB1 to the ninth original block OB9 can be obtained. Size information SI.

再者,第一原始區塊OB1至第九原始區塊OB9分別以其中心為旋轉中心,由於第一原始區塊OB1至第九原始區塊OB9相較於各個旋轉中心並未旋轉,因此第一原始區塊OB1至第九原始區塊OB9的旋轉角度皆為0度。 Furthermore, the first original block OB1 to the ninth original block OB9 have their centers as the rotation centers, respectively. Since the first original block OB1 to the ninth original block OB9 are not rotated compared to the respective rotation centers, the first The rotation angles of an original block OB1 to a ninth original block OB9 are all 0 degrees.

第一原始區塊OB1至第九原始區塊OB9的原始區塊資訊OBI可用包含位置資訊PI、尺寸資訊SI以及旋轉資訊RI的矩陣來表示。於本實施例中,第一原始區塊OB1至第九原始區塊OB9 的原始區塊資訊OBI可以表示成[x軸位置,y軸位置,寬度,高度,旋轉角度]。 The original block information OBI of the first original block OB1 to the ninth original block OB9 may be represented by a matrix including position information PI, size information SI, and rotation information RI. In this embodiment, the original block information OBI of the first original block OB1 to the ninth original block OB9 may be expressed as [x-axis position, y-axis position, width, height, rotation angle].

如第4C圖所示,其係排列出第一原始區塊OB1至第九原始區塊OB9與其相應的原始區塊資訊OBI。 As shown in FIG. 4C, the first original block OB1 to the ninth original block OB9 and their corresponding original block information OBI are arranged.

以第一原始區塊OB1為例,第一原始區塊OB1的中心點位置座標為(-5,5),且此座標可作為第一原始區塊OB1的位置資訊PI;第一原始區塊OB1的寬度W2以及高度H2皆為5(cm),且此切割尺寸可作為第一原始區塊OB1的尺寸資訊SI;第一原始區塊OB1的旋轉角度為0度,且此旋轉角度可作為第一原始區塊OB1的旋轉資訊RI。接著,將作為位置資訊PI的座標、作為尺寸資訊SI的寬度以及高度與作為旋轉資訊RI的旋轉角度組合,因此第一原始區塊OB1的原始區塊資訊OBI可以定義為[-5,5,5,5,0]。 Taking the first original block OB1 as an example, the position of the center point of the first original block OB1 is (-5,5), and this coordinate can be used as the position information PI of the first original block OB1; the first original block The width W2 and height H2 of OB1 are both 5 (cm), and this cut size can be used as the size information SI of the first original block OB1; the rotation angle of the first original block OB1 is 0 degrees, and this rotation angle can be used as Rotation information RI of the first original block OB1. Next, the coordinates of the position information PI, the width and height of the size information SI, and the rotation angle of the rotation information RI are combined. Therefore, the original block information OBI of the first original block OB1 can be defined as [-5,5, 5,5,0].

第二原始區塊OB2至第九原始區塊OB9的原始區塊資訊OBI採用與第一原始區塊OB1的原始區塊資訊OBI相同的定義方式而分別定義成[0,5,5,5,0]、[5,5,5,5,0]、[-5,0,5,5,0]、[0,0,5,5,0]、[5,0,5,5,0]、[-5,-5,5,5,0]、[0,-5,5,5,0]以及[5,-5,5,5,0]。 The original block information OBI of the second original block OB2 to the ninth original block OB9 is defined in the same way as the original block information OBI of the first original block OB1 and is defined as [0,5,5,5, 0], [5,5,5,5,0], [-5,0,5,5,0], [0,0,5,5,0], [5,0,5,5,0 ], [-5, -5,5,5,0], [0, -5,5,5,0], and [5, -5,5,5,0].

應注意的是,第一原始區塊OB1至第九原始區塊OB9的原始區塊資訊OBI的定義方式僅為示例,並不以此為限。 It should be noted that the definition method of the original block information OBI of the first original block OB1 to the ninth original block OB9 is merely an example, and is not limited thereto.

再請回到第1圖、第2圖以及第3圖。排列模組140依據步驟S140隨機排列第一原始區塊OB1至第九原始區塊OB9(如第3圖的排列階段ARS所示)。也就是說,第一原始區塊OB1至第九原始區塊OB9的位置以及旋轉角度將被重新安排。 Please go back to Figure 1, Figure 2, and Figure 3. The arrangement module 140 randomly arranges the first original block OB1 to the ninth original block OB9 according to step S140 (as shown in the arrangement stage ARS in FIG. 3). That is, the positions and rotation angles of the first original block OB1 to the ninth original block OB9 will be rearranged.

具體來說,排列模組140先將第一原始區塊OB1 至第九原始區塊OB9的位置重新安排;接著,再自位置經重新安排的第一原始區塊OB1至第九原始區塊OB9中隨機挑選數個原始區塊,並旋轉被挑選的原始區塊。或者,排列模組140可先自第一原始區塊OB1至第九原始區塊OB9中隨機挑選數個原始區塊,並旋轉被挑選的原始區塊;接著,再將經旋轉以及未經旋轉的第一原始區塊OB1至第九原始區塊OB9的位置重新安排。 Specifically, the arranging module 140 first rearranges the positions of the first original block OB1 to the ninth original block OB9; then, it rearranges the first original block OB1 to the ninth original block OB9 from the rearranged positions In the process, several original blocks are randomly selected, and the selected original blocks are rotated. Alternatively, the arranging module 140 may first randomly select several original blocks from the first original block OB1 to the ninth original block OB9, and rotate the selected original blocks; then, the rotated and unrotated The positions of the first original block OB1 to the ninth original block OB9 are rearranged.

於本實施例中,第一原始區塊OB1至第九原始區塊OB9的位置皆被重新安排;此外,被旋轉的原始區塊以第二原始區塊OB2以及第七原始區塊OB7為示例,也就是第二原始區塊OB2以及第七原始區塊OB7的旋轉角度被重新安排,例如第二原始區塊OB2係以其中心順時針旋轉90度,第七原始區塊OB7係以其中心順時針旋轉180度。 In this embodiment, the positions of the first original block OB1 to the ninth original block OB9 are rearranged. In addition, the rotated original block is exemplified by the second original block OB2 and the seventh original block OB7. That is, the rotation angles of the second original block OB2 and the seventh original block OB7 are rearranged. For example, the second original block OB2 is rotated clockwise by 90 degrees at its center, and the seventh original block OB7 is rotated at its center. Rotate 180 degrees clockwise.

應注意的是,被旋轉的原始區塊以及其旋轉角度僅為示例,並不以此為限。 It should be noted that the original block being rotated and its rotation angle are only examples, and are not limited thereto.

詳言之,經隨機排列的第一原始區塊OB1之位置係位於原本第五原始區塊OB5之位置,經隨機排列的第二原始區塊OB2之位置係位於原本第一原始區塊OB1之位置,經隨機排列的第三原始區塊OB3之位置係位於原本第九原始區塊OB9之位置,經隨機排列的第四原始區塊OB4之位置係位於原本第七原始區塊OB7之位置,經隨機排列的第五原始區塊OB5之位置係位於原本第三原始區塊OB3之位置,經隨機排列的第六原始區塊OB6之位置係位於原本第八原始區塊OB8之位置,經隨機排列的第七原始區塊OB7之位置係位於原本第六原 始區塊OB6之位置,經隨機排列的第八原始區塊OB8之位置係位於原本第四原始區塊OB4之位置,經隨機排列的第九原始區塊OB9之位置係位於原本第二原始區塊OB2之位置。 In detail, the position of the first randomly arranged original block OB1 is located in the original fifth original block OB5, and the position of the randomly arranged second original block OB2 is located in the original first original block OB1. Position, the position of the third randomly arranged original block OB3 is located in the original ninth original block OB9, and the position of the randomly arranged fourth original block OB4 is located in the original seventh original block OB7, The randomly arranged fifth original block OB5 is located in the original third original block OB3, and the randomly arranged sixth original block OB6 is located in the original eighth original block OB8. The position of the seventh original block OB7 is located in the original sixth original block OB6, and the position of the randomly arranged eighth original block OB8 is located in the original fourth original block OB4. The position of the ninth original block OB9 is located at the position of the original second original block OB2.

此外,第一原始區塊OB1至第九原始區塊OB9的原始區塊資訊OBI並不會因為經隨機排列而改變,也就是說,經隨機排列的第一原始區塊OB1至第九原始區塊OB9仍保有其原始區塊資訊OBI。 In addition, the original block information OBI of the first original block OB1 to the ninth original block OB9 is not changed due to random arrangement, that is, the first original block OB1 to the ninth original region are randomly arranged. Block OB9 still retains its original block information OBI.

經隨機排列的第一原始區塊OB1至第九原始區塊OB9依據步驟S160形成如第3圖的排列階段ARS所示之加密檔案ED,且加密檔案ED的尺寸為15(cm)x15(cm)。於本實施例中,加密檔案ED的格式為圖片格式。 The randomly arranged first original block OB1 to the ninth original block OB9 form the encrypted file ED as shown in the arrangement stage ARS in FIG. 3 according to step S160, and the size of the encrypted file ED is 15 (cm) x 15 (cm ). In this embodiment, the format of the encrypted file ED is a picture format.

還原模組160依據步驟S180接收第一原始區塊OB1至第九原始區塊OB9的原始區塊資訊OBI(如[-5,5,5,5,0]、[0,5,5,5,0]、[5,5,5,5,0]、[-5,0,5,5,0]、[0,0,5,5,0]、[5,0,5,5,0]、[-5,-5,5,5,0]、[0,-5,5,5,0]與[5,-5,5,5,0])以及加密檔案ED,並基於第一原始區塊OB1至第九原始區塊OB9的原始區塊資訊OBI以及加密檔案ED,將加密檔案ED還原成如第3圖的還原階段RSS所示之還原檔案RD。 The restoration module 160 receives the original block information OBI of the first original block OB1 to the ninth original block OB9 according to step S180 (such as [-5,5,5,5,0], [0,5,5,5 , 0], [5,5,5,5,0], [-5,0,5,5,0], [0,0,5,5,0], [5,0,5,5, 0], [-5, -5,5,5,0], [0, -5,5,5,0] and [5, -5,5,5,0]) and the encrypted file ED, based on The original block information OBI of the first original block OB1 to the ninth original block OB9 and the encrypted file ED restore the encrypted file ED to a restored file RD as shown in the restoration stage RSS in FIG. 3.

詳言之,還原模組160在接收到第一原始區塊OB1至第九原始區塊OB9的原始區塊資訊OBI以及加密檔案ED後,根據原始區塊資訊OBI中的尺寸資訊SI,如原始區塊的寬度W2以及高度H2皆為5(cm),而將加密檔案ED進行切割成3X3的區塊。接著,再利用原始區塊資訊OBI中的位置資訊PI,如第一原始區塊OB1至第九原始區塊OB9的中心點座標分別 為(-5,5)、(0,5)、(5,5)、(-5,0)、(0,0)、(5,0)、(-5,-5)、(0,-5)以及(5,-5),而將經隨機排列的第一原始區塊OB1至第九原始區塊OB9之位置重新排列成尚未經隨機排列的第一原始區塊OB1至第九原始區塊OB9之位置。最後,再將經旋轉的第二原始區塊OB2以及第七原始區塊OB7依據旋轉資訊RI,將經順時針旋轉90度的第二原始區塊OB2的旋轉角度還原為0度,並將經順時針旋轉180度的第七原始區塊OB7的旋轉角度還原為0度,以形成如第3圖的還原階段RSS所示之還原檔案RD,其中還原檔案RD的圖案內容會對應(於一實施例中完全相同於)原始的待加密檔案OD。 In detail, after receiving the original block information OBI of the first original block OB1 to the ninth original block OB9 and the encrypted file ED, the restoration module 160 uses the size information SI in the original block information OBI, such as the original The width W2 and height H2 of the block are both 5 (cm), and the encrypted file ED is cut into 3 × 3 blocks. Then, the position information PI in the original block information OBI is used. For example, the coordinates of the center points of the first original block OB1 to the ninth original block OB9 are (-5, 5), (0, 5), and (5). , 5), (-5,0), (0,0), (5,0), (-5, -5), (0, -5), and (5, -5), and will be randomly arranged The positions of the first original block OB1 to the ninth original block OB9 are rearranged to the positions of the first original block OB1 to the ninth original block OB9 that have not been randomly arranged. Finally, according to the rotation information RI, the rotated second original block OB2 and the seventh original block OB7 are restored to a rotation angle of the second original block OB2 rotated 90 degrees clockwise to 0 degrees, and The rotation angle of the seventh original block OB7 rotated 180 degrees clockwise is reduced to 0 degrees to form a restored file RD as shown in the restoration stage RSS in FIG. 3, where the pattern content of the restored file RD will correspond (in an implementation The example is exactly the same as) the original OD file to be encrypted.

簡言之,若取得第一原始區塊OB1至第九原始區塊OB9的原始區塊資訊OBI,則可將加密檔案ED解密,並還原成對應待加密檔案OD的還原檔案RD。然而,若未取得第一原始區塊OB1至第九原始區塊OB9的原始區塊資訊OBI,則無法將加密檔案ED解密,故僅能輸出如第3圖的未還原階段URSS所示之加密檔案ED。再者,由於加密檔案ED的圖案內容(笑臉的圖案)與原始的待加密檔案OD的圖案內容(無法辨識的圖案)差異太大,因此未經授權之人難以從加密檔案ED而得到原始的待加密檔案OD,進而達到保護待加密檔案OD之目的。 In short, if the original block information OBI of the first original block OB1 to the ninth original block OB9 is obtained, the encrypted file ED can be decrypted and restored to a restored file RD corresponding to the file OD to be encrypted. However, if the original block information OBI of the first original block OB1 to the ninth original block OB9 is not obtained, the encrypted file ED cannot be decrypted, so only the encryption shown in the unrecovered stage URSS in FIG. 3 can be output Archive ed. Furthermore, because the content of the pattern of the encrypted file ED (the pattern of the smiley face) is too different from the original content of the file OD to be encrypted (the unrecognizable pattern), it is difficult for unauthorized persons to obtain the original from the encrypted file ED. The OD of the file to be encrypted, thereby achieving the purpose of protecting the OD of the file to be encrypted.

於另一實施例中,若待加密檔案OD的原始來源OS為非圖片檔時,則在步驟S180之後會更包含將屬於圖片格式的還原檔案RD還原成原本格式的步驟,例如待加密檔案OD的原始來源OS為文字檔時,則在步驟S180之後,屬於圖片格式的還原檔案RD將會被還原成文字檔。 In another embodiment, if the original source OS of the file OD to be encrypted is a non-picture file, after step S180, the method further includes a step of restoring the restored file RD belonging to the picture format to the original format, such as the file OD to be encrypted. When the original source OS is a text file, after step S180, the restored file RD belonging to the picture format will be restored to a text file.

請同時參照第5圖、第6圖以及第7圖。第5圖為根 據本揭示文件另一實施例所示之加解密系統200的功能方塊圖,第6圖為根據本揭示文件一實施例所示之加解密方法M200的流程示意圖,第7圖為利用第5圖所示之加解密系統200進行檔案加解密的流程示意圖。 Please refer to Figures 5, 6, and 7 at the same time. FIG. 5 is a functional block diagram of the encryption and decryption system 200 according to another embodiment of the present disclosure. FIG. 6 is a flowchart of the encryption and decryption method M200 according to one embodiment of the present disclosure. FIG. 7 is A schematic flowchart of file encryption and decryption using the encryption and decryption system 200 shown in FIG. 5.

於本實施例中,加解密系統200可應用加解密方法M200來對檔案進行加解密。進一步地,加解密方法M200的步驟流程可藉由一種非暫態可讀取記錄媒體記錄至少一程式指令,此至少一程式指令在載入加解密系統200後,執行加解密方法M200,加解密方法包含步驟S220、步驟S230、步驟S240、步驟S260以及步驟S280。 In this embodiment, the encryption / decryption system 200 may apply the encryption / decryption method M200 to encrypt / decrypt files. Further, the step flow of the encryption and decryption method M200 can record at least one program instruction through a non-transitory readable recording medium. After the at least one program instruction is loaded into the encryption and decryption system 200, the encryption and decryption method M200 is executed to encrypt and decrypt The method includes steps S220, S230, S240, S260, and S280.

加解密系統200包含切割模組220、添加模組230、排列模組240以及還原模組260。排列模組240包含彼此連接的組合單元242以及打散單元244,排列模組240的組合單元242係與切割模組220以及添加模組230連接,排列模組240的打散單元244係與還原模組260連接。還原模組260係與切割模組220連接。於另一實施例中,加解密系統200更可進一步包含轉換模組210,轉換模組210係與切割模組220連接。此外,由於轉換模組210係與加解密系統100的轉換模組110的架構、功能以及適用時機大致相同,故不另贅述。 The encryption and decryption system 200 includes a cutting module 220, an adding module 230, an arranging module 240, and a reducing module 260. The arrangement module 240 includes a combination unit 242 and a dispersing unit 244 that are connected to each other. The combination unit 242 of the arrangement module 240 is connected to the cutting module 220 and the addition module 230. The disassembly unit 244 of the arrangement module 240 is to restore The module 260 is connected. The reduction module 260 is connected to the cutting module 220. In another embodiment, the encryption and decryption system 200 may further include a conversion module 210. The conversion module 210 is connected to the cutting module 220. In addition, since the conversion module 210 is substantially the same in structure, function, and application timing as the conversion module 110 of the encryption / decryption system 100, it will not be repeated here.

切割模組220依據步驟S220接收待加密檔案OD,並將待加密檔案OD切割成各自具有原始區塊資訊OBI的九個原始區塊。關於切割模組220的進一步說明,其係與加解密系統100的切割模組120大致相同(如第7圖的接收階段RCS以及切割階段DVS所示),故不另贅述。 The cutting module 220 receives the file OD to be encrypted according to step S220, and cuts the file OD to be encrypted into nine original blocks each having original block information OBI. The further description of the cutting module 220 is substantially the same as the cutting module 120 of the encryption and decryption system 100 (as shown in the receiving stage RCS and the cutting stage DVS in FIG. 7), so it will not be repeated here.

添加模組230依據步驟S230添加第一添加區塊AB1、第二添加區塊AB2以及第三添加區塊AB3,其中第一添加區塊AB1、第二添加區塊AB2以及第三添加區塊AB3的形狀為方形,且第一添加區塊AB1、第二添加區塊AB2以及第三添加區塊AB3的尺寸與第一原始區塊OB1至第九原始區塊OB9的尺寸皆為5(cm)x5(cm)。 The adding module 230 adds a first added block AB1, a second added block AB2, and a third added block AB3 according to step S230, wherein the first added block AB1, the second added block AB2, and the third added block AB3 The shape is square, and the sizes of the first added block AB1, the second added block AB2, and the third added block AB3 and the sizes of the first original block OB1 to the ninth original block OB9 are 5 (cm). x5 (cm).

應注意的是,本實施例所述之添加區塊的數量、形狀以及尺寸僅為示例,並不以此為限。 It should be noted that the number, shape, and size of the added blocks described in this embodiment are merely examples, and are not limited thereto.

排列模組240的組合單元242將自切割模組220產生的第一原始區塊OB1至第九原始區塊OB9與自添加模組230產生的第一添加區塊AB1至第三添加區塊AB3組合在一起,也就是第一添加區塊AB1係緊鄰第三原始區塊OB3的右邊,第二添加區塊AB2係緊鄰第六原始區塊OB6的右邊,第三添加區塊AB3係緊鄰第九原始區塊OB9的右邊(如第7圖的添加階段ADS所示)。 The combination unit 242 of the arrangement module 240 combines the first original block OB1 to the ninth original block OB9 generated from the cutting module 220 and the first added block AB1 to the third added block AB3 generated from the adding module 230. Put together, that is, the first added block AB1 is right next to the third original block OB3, the second added block AB2 is right next to the sixth original block OB6, and the third added block AB3 is right next to the ninth The right side of the original block OB9 (as shown in the add stage ADS in Figure 7).

應注意的是,本實施例所述之添加區塊的位置僅為示例,並不以此為限。 It should be noted that the locations of the added blocks described in this embodiment are merely examples, and are not limited thereto.

排列模組240的打散單元244依據步驟S240隨機排列組合在一起的第一原始區塊OB1至第九原始區塊OB9以及第一添加區塊AB1至第三添加區塊AB3(如第7圖的排列階段ARS所示)。也就是說,第一原始區塊OB1至第九原始區塊OB9以及第一添加區塊AB1至第三添加區塊AB3的位置以及旋轉角度將被重新安排。 The breaking unit 244 of the arrangement module 240 randomly arranges and combines the first original block OB1 to the ninth original block OB9 and the first added block AB1 to the third added block AB3 according to step S240 (as shown in FIG. 7). The permutation stage is shown in ARS). That is, the positions and rotation angles of the first original block OB1 to the ninth original block OB9 and the first added block AB1 to the third added block AB3 will be rearranged.

具體來說,排列模組140先將第一原始區塊OB1至第九原始區塊OB9以及第一添加區塊AB1至第三添加區塊 AB3的位置重新安排;接著,再自位置經重新安排的第一原始區塊OB1至第九原始區塊OB9中隨機挑選數個原始區塊以及添加區塊,並旋轉被挑選的原始區塊以及添加區塊。或者,排列模組140可先自第一原始區塊OB1至第九原始區塊OB9以及第一添加區塊AB1至第三添加區塊AB3中隨機挑選數個原始區塊,並旋轉被挑選的原始區塊以及添加區塊;接著,再將經旋轉以及未經旋轉的第一原始區塊OB1至第九原始區塊OB9以及第一添加區塊AB1至第三添加區塊AB3的位置重新安排。 Specifically, the arranging module 140 rearranges the positions of the first original block OB1 to the ninth original block OB9 and the first added block AB1 to the third added block AB3 first, and then rearranges the positions from the positions. Among the first original block OB1 to the ninth original block OB9, several original blocks and added blocks are randomly selected, and the selected original blocks and added blocks are rotated. Alternatively, the arrangement module 140 may first randomly select several original blocks from the first original block OB1 to the ninth original block OB9 and the first added block AB1 to the third added block AB3, and rotate the selected block. The original block and the added block; then, the positions of the rotated first and ninth original blocks OB1 to OB9 and the first added block AB1 to third added block AB3 are rearranged .

於本實施例中,第一原始區塊OB1至第九原始區塊OB9以及第一添加區塊AB1至第三添加區塊AB3的位置皆被重新安排;此外,被旋轉的原始區塊以第二原始區塊OB2、第七原始區塊OB7、第二添加區塊AB2以及第三添加區塊AB3為示例,也就是第二原始區塊OB2、第七原始區塊OB7、第二添加區塊AB2以及第三添加區塊AB3的旋轉角度被重新安排,例如第二原始區塊OB2係以其中心順時針旋轉90度,第七原始區塊OB7係以其中心順時針旋轉180度,第二添加區塊AB2係以其中心順時針旋轉270度,第三原始區塊AB3係以其中心順時針旋轉90度。 In this embodiment, the positions of the first original block OB1 to the ninth original block OB9 and the first added block AB1 to the third added block AB3 are rearranged; moreover, the rotated original block The second original block OB2, the seventh original block OB7, the second added block AB2, and the third added block AB3 are examples, that is, the second original block OB2, the seventh original block OB7, and the second added block The rotation angles of AB2 and the third added block AB3 are rearranged. For example, the second original block OB2 is rotated 90 degrees clockwise at its center, the seventh original block OB7 is rotated 180 degrees clockwise at its center, and the second The added block AB2 is rotated 270 degrees clockwise at its center, and the third original block AB3 is rotated 90 degrees clockwise at its center.

應注意的是,被旋轉的原始區塊與添加區塊以及其旋轉角度僅為示例,並不以此為限。 It should be noted that the rotated original block and the added block and their rotation angles are only examples, and are not limited thereto.

詳言之,經隨機排列的第一原始區塊OB1之位置係位於原本第五原始區塊OB5之位置,經隨機排列的第二原始區塊OB2之位置係位於原本第一原始區塊OB1之位置,經隨機排列的第三原始區塊OB3之位置係位於原本第九原始區塊 OB9之位置,經隨機排列的第四原始區塊OB4之位置係位於原本第二添加區塊AB2之位置,經隨機排列的第五原始區塊OB5之位置係位於原本第三添加區塊AB3之位置,經隨機排列的第六原始區塊OB6之位置係位於原本第八原始區塊OB8之位置,經隨機排列的第七原始區塊OB7之位置係位於原本第六原始區塊OB6之位置,經隨機排列的第八原始區塊OB8之位置係位於原本第四原始區塊OB4之位置,經隨機排列的第九原始區塊OB9之位置係位於原本第二原始區塊OB2之位置,經隨機排列的第一添加區塊AB1之位置係位於原本第三原始區塊OB3之位置,經隨機排列的第二添加區塊AB2之位置係位於原本第七原始區塊OB7之位置,經隨機排列的第三添加區塊AB3之位置係位於原本第一添加區塊AB1之位置。 In detail, the position of the first randomly arranged original block OB1 is located in the original fifth original block OB5, and the position of the randomly arranged second original block OB2 is located in the original first original block OB1. Position, the position of the third randomly arranged original block OB3 is located at the original ninth original block OB9, and the position of the randomly arranged fourth original block OB4 is located at the original second added block AB2, The randomly arranged fifth original block OB5 is located at the original third added block AB3, and the randomly arranged sixth original block OB6 is located at the original eighth original block OB8. The position of the seventh original block OB7 is located in the original sixth original block OB6, and the position of the randomly arranged eighth original block OB8 is located in the original fourth original block OB4. The position of the ninth original block OB9 is located in the original second original block OB2, and the position of the randomly added first added block AB1 is located in the original third original block OB3, and the randomly arranged second add The position of the added block AB2 is located at the original seventh original block OB7, and the position of the third added block AB3, which is randomly arranged, is located at the original first added block AB1.

應注意的是,第一原始區塊OB1至第九原始區塊OB9的原始區塊資訊OBI並不會因為經隨機排列而改變,也就是說,經隨機排列的第一原始區塊OB1至第九原始區塊OB9仍保有其原始區塊資訊OBI。 It should be noted that the original block information OBI of the first original block OB1 to the ninth original block OB9 is not changed due to random arrangement, that is, the first original block OB1 to Nine original blocks OB9 still retains its original block information OBI.

經隨機排列的第一原始區塊OB1至第九原始區塊OB9以及第一添加區塊AB1至第三添加區塊AB3依據步驟S260形成如第7圖的排列階段ARS所示之加密檔案ED,且加密檔案ED的尺寸為15(cm)x20(cm)。 The randomly arranged first original block OB1 to the ninth original block OB9 and the first added block AB1 to the third added block AB3 form the encrypted file ED as shown in the arrangement stage ARS of FIG. 7 according to step S260, The size of the encrypted file ED is 15 (cm) x 20 (cm).

還原模組260依據步驟S280接收第一原始區塊OB1至第九原始區塊OB9的原始區塊資訊OBI(如[-5,5,5,5,0]、[0,5,5,5,0]、[5,5,5,5,0]、[-5,0,5,5,0]、[0,0,5,5,0]、[5,0,5,5,0]、[-5,-5,5,5,0]、[0,-5,5,5,0]與[5,-5,5,5,0])以及加密 檔案ED,並基於第一原始區塊OB1至第九原始區塊OB9的原始區塊資訊OBI以及加密檔案ED,將加密檔案ED還原成如第7圖的還原階段RSS所示之還原檔案RD。 The restoration module 260 receives the original block information OBI of the first original block OB1 to the ninth original block OB9 (such as [-5,5,5,5,0], [0,5,5,5] according to step S280. , 0], [5,5,5,5,0], [-5,0,5,5,0], [0,0,5,5,0], [5,0,5,5, 0], [-5, -5,5,5,0], [0, -5,5,5,0] and [5, -5,5,5,0]) and the encrypted file ED, based on The original block information OBI of the first original block OB1 to the ninth original block OB9 and the encrypted file ED restore the encrypted file ED to a restored file RD as shown in the restoration stage RSS in FIG. 7.

詳言之,還原模組260在接收到第一原始區塊OB1至第九原始區塊OB9的原始區塊資訊OBI以及加密檔案ED後,根據原始區塊資訊OBI中的尺寸資訊SI,如原始區塊的寬度W2以及高度H2皆為5(cm),而將加密檔案ED進行切割成3X3的區塊。接著,再利用原始區塊資訊OBI中的位置資訊PI,如第一原始區塊OB1至第九原始區塊OB9的中心點座標分別為(-5,5)、(0,5)、(5,5)、(-5,0)、(0,0)、(5,0)、(-5,-5)、(0,-5)以及(5,-5),而將經隨機排列的第一原始區塊OB1至第九原始區塊OB9之位置重新排列成尚未經隨機排列的第一原始區塊OB1至第九原始區塊OB9之位置,並略過或刪除添加的第一添加區塊AB1至第三添加區塊AB3。最後,再將經旋轉的第二原始區塊OB2以及第七原始區塊OB7依據旋轉資訊RI,將經順時針旋轉90度的第二原始區塊OB2的旋轉角度還原為0度,並將經順時針旋轉180度的第七原始區塊OB7的旋轉角度還原為0度,以形成如第7圖的還原階段RSS所示之還原檔案RD,其中還原檔案RD的圖案內容會對應(於一實施例中完全相同於)原始的待加密檔案OD。 In detail, after receiving the original block information OBI and the encrypted file ED of the first original block OB1 to the ninth original block OB9, the restoration module 260, according to the size information SI in the original block information OBI, such as the original The width W2 and height H2 of the block are both 5 (cm), and the encrypted file ED is cut into 3 × 3 blocks. Then, the position information PI in the original block information OBI is used. For example, the coordinates of the center points of the first original block OB1 to the ninth original block OB9 are (-5, 5), (0, 5), and (5). , 5), (-5,0), (0,0), (5,0), (-5, -5), (0, -5), and (5, -5), and will be randomly arranged Rearrange the positions of the first original block OB1 to the ninth original block OB9 to the positions of the first original block OB1 to the ninth original block OB9 that have not been randomly arranged, and skip or delete the added first addition Block AB1 to third add block AB3. Finally, according to the rotation information RI, the rotated second original block OB2 and the seventh original block OB7 are restored to a rotation angle of the second original block OB2 rotated 90 degrees clockwise to 0 degrees, and The rotation angle of the seventh original block OB7, which is rotated 180 degrees clockwise, is reduced to 0 degrees to form a restored file RD as shown in the restore stage RSS in FIG. 7, where the pattern content of the restored file RD will correspond (in an implementation The example is exactly the same as) the original OD file to be encrypted.

簡言之,若取得第一原始區塊OB1至第九原始區塊OB9的原始區塊資訊OBI,則可將加密檔案ED解密,並還原成對應待加密檔案OD的還原檔案RD。然而,若未取得第一原始區塊OB1至第九原始區塊OB9的原始區塊資訊OBI,則無法將加密檔案ED解密,故僅能輸出如第7圖的未還原階段URSS所示之加密 檔案ED。再者,由於加密檔案ED的圖案內容(笑臉的圖案)與原始的待加密檔案OD的圖案內容(無法辨識的圖案)差異太大,因此未經授權之人難以從加密檔案ED而得到原始的待加密檔案OD,進而達到保護待加密檔案OD之目的。 In short, if the original block information OBI of the first original block OB1 to the ninth original block OB9 is obtained, the encrypted file ED can be decrypted and restored to a restored file RD corresponding to the file OD to be encrypted. However, if the original block information OBI of the first original block OB1 to the ninth original block OB9 is not obtained, the encrypted file ED cannot be decrypted, so only the encryption shown in the unrecovered stage URSS in FIG. 7 can be output Archive ed. Furthermore, because the content of the pattern of the encrypted file ED (the pattern of the smiling face) is too different from the original pattern of the file OD to be encrypted (the unrecognizable pattern), it is difficult for unauthorized persons to obtain the original The OD of the file to be encrypted, thereby achieving the purpose of protecting the OD of the file to be encrypted.

於另一實施例中,若待加密檔案OD的原始來源OS為非圖片檔時,則在步驟S280之後會更包含將屬於圖片格式的還原檔案RD還原成原本格式的步驟,例如待加密檔案OD的原始來源OS為文字檔時,則在步驟S280之後,屬於圖片格式的還原檔案RD將會被還原成文字檔。 In another embodiment, if the original source OS of the file to be encrypted OD is a non-picture file, after step S280, the method further includes a step of restoring the restored file RD belonging to the picture format to the original format, such as the file to be encrypted OD When the original source OS is a text file, after step S280, the restored file RD belonging to the picture format will be restored to a text file.

請同時參照第8圖、第9圖以及第10圖。第8圖為根據本揭示文件又一實施例所示之加解密系統300的功能方塊圖,第9圖為根據本揭示文件一實施例所示之加解密方法M300的流程示意圖,第10圖為利用第8圖所示之加解密系統300進行檔案加解密的流程示意圖。 Please refer to Figures 8, 9 and 10 at the same time. FIG. 8 is a functional block diagram of the encryption and decryption system 300 according to another embodiment of the present disclosure, and FIG. 9 is a schematic flowchart of the encryption and decryption method M300 according to an embodiment of the present disclosure. FIG. 10 is A schematic flowchart of file encryption and decryption using the encryption and decryption system 300 shown in FIG. 8.

於本實施例中,加解密系統300可應用加解密方法M300來對檔案進行加解密。進一步地,加解密方法M300的步驟流程可藉由一種非暫態可讀取記錄媒體記錄至少一程式指令,此至少一程式指令在載入加解密系統300後,執行加解密方法M300,加解密方法包含步驟S320、步驟S330、步驟S340、步驟S360以及步驟S380。 In this embodiment, the encryption and decryption system 300 can apply the encryption and decryption method M300 to encrypt and decrypt the files. Further, the step flow of the encryption and decryption method M300 can record at least one program instruction through a non-transitory readable recording medium. After the at least one program instruction is loaded into the encryption and decryption system 300, the encryption and decryption method M300 is executed to perform encryption and decryption. The method includes steps S320, S330, S340, S360, and S380.

加解密系統300包含切割模組320、添加模組330、排列模組340以及還原模組360。排列模組340包含彼此連接的組合單元342以及打散單元344,排列模組340的組合單元342係與添加模組330以及還原模組360連接。排列模組340的打散單元344 係與切割模組320連接。還原模組360係與切割模組320連接。於另一實施例中,加解密系統300更可進一步包含轉換模組310,轉換模組310係與切割模組320連接。此外,由於轉換模組310係與加解密系統100的轉換模組110的架構、功能以及適用時機大致相同,故不另贅述。 The encryption and decryption system 300 includes a cutting module 320, an adding module 330, an arranging module 340, and a reduction module 360. The arrangement module 340 includes a combination unit 342 and a shattering unit 344 connected to each other. The combination unit 342 of the arrangement module 340 is connected to the addition module 330 and the reduction module 360. The breaking unit 344 of the arrangement module 340 is connected to the cutting module 320. The reduction module 360 is connected to the cutting module 320. In another embodiment, the encryption and decryption system 300 may further include a conversion module 310, and the conversion module 310 is connected to the cutting module 320. In addition, since the conversion module 310 is substantially the same in structure, function, and application timing as the conversion module 110 of the encryption / decryption system 100, it will not be repeated here.

切割模組320依據步驟S320接收待加密檔案OD,並將待加密檔案OD切割成各自具有原始區塊資訊OBI的九個原始區塊。關於切割模組320的進一步說明,其係與加解密系統100的切割模組120大致相同(如第10圖的接收階段RCS以及切割階段DVS所示),故不另贅述。 The cutting module 320 receives the file OD to be encrypted according to step S320, and cuts the file OD to be encrypted into nine original blocks each having original block information OBI. The further description of the cutting module 320 is substantially the same as the cutting module 120 of the encryption and decryption system 100 (as shown in the receiving stage RCS and the cutting stage DVS in FIG. 10), so it will not be described further.

添加模組330依據步驟S330添加第一添加區塊AB1、第二添加區塊AB2以及第三添加區塊AB3,其中第一添加區塊AB1、第二添加區塊AB2以及第三添加區塊AB3的形狀為方形,且第一添加區塊AB1、第二添加區塊AB2以及第三添加區塊AB3的尺寸與第一原始區塊OB1至第九原始區塊OB9的尺寸皆為5(cm)x5(cm)。 The adding module 330 adds a first added block AB1, a second added block AB2, and a third added block AB3 according to step S330, wherein the first added block AB1, the second added block AB2, and the third added block AB3 The shape is square, and the sizes of the first added block AB1, the second added block AB2, and the third added block AB3 and the sizes of the first original block OB1 to the ninth original block OB9 are 5 (cm). x5 (cm).

應注意的是,本實施例所述之添加區塊的數量、形狀以及尺寸僅為示例,並不以此為限。 It should be noted that the number, shape, and size of the added blocks described in this embodiment are merely examples, and are not limited thereto.

首先,排列模組340的打散單元344隨機排列第一原始區塊OB1至第九原始區塊OB9(如第10圖的排列階段ARS所示),由於第10的排列階段ARS與第3圖的排列階段ARS大致相同,故第一原始區塊OB1至第九原始區塊OB9的隨機排列方式不另贅述。 First, the shattering unit 344 of the arrangement module 340 randomly arranges the first original block OB1 to the ninth original block OB9 (as shown in the arrangement stage ARS in FIG. 10), because the ARS in the tenth arrangement stage and FIG. 3 The arrangement phase of ARS is roughly the same, so the random arrangement of the first original block OB1 to the ninth original block OB9 is not repeated.

排列模組340的組合單元342依據步驟S340將第一 添加區塊AB1至第三添加區塊AB3(與第7圖中的添加階段ADS所示之第一添加區塊AB1至第三添加區塊AB3相同)與經隨機排列的第一原始區塊OB1至第九原始區塊OB9組合在一起,也就是第一添加區塊AB1係緊鄰第三原始區塊OB3的右邊,第二添加區塊AB2係先緊鄰第五原始區塊OB5的右邊後再以其中心順時針旋轉270度(或者,第二添加區塊AB2先以其中心順時針旋轉270度,再緊鄰第五原始區塊OB5的右邊),第三添加區塊AB3係先緊鄰第七原始區塊OB7的右邊後再以其中心順時針旋轉90度(或者,第三添加區塊AB3先以其中心順時針旋轉90度,再緊鄰第五原始區塊OB5的右邊)(如第10圖的添加階段ADS所示)。 The combining unit 342 of the arranging module 340 performs the first adding block AB1 to the third adding block AB3 according to step S340 (the first adding block AB1 to the third adding block shown in the adding stage ADS in FIG. 7). The same as AB3) is combined with the randomly arranged first original block OB1 to the ninth original block OB9, that is, the first added block AB1 is immediately to the right of the third original block OB3, and the second added block AB2 It is immediately adjacent to the right side of the fifth original block OB5, and then rotated 270 degrees clockwise at its center (or, the second added block AB2 is first rotated 270 degrees clockwise at its center, and then immediately to the right of the fifth original block OB5. ), The third added block AB3 is immediately next to the right side of the seventh original block OB7, and then rotated 90 degrees clockwise at its center (or, the third added block AB3 is first rotated 90 degrees clockwise at its center, and then immediately adjacent The fifth original block OB5 is to the right) (as shown in the add stage ADS of Figure 10).

應注意的是,本實施例所述之添加區塊的位置、被旋轉的添加區塊以及其旋轉角度僅為示例,並不以此為限。 It should be noted that the position of the added block, the rotated added block, and its rotation angle described in this embodiment are merely examples, and are not limited thereto.

第一添加區塊AB1至第三添加區塊AB3以及經隨機排列的第一原始區塊OB1至第九原始區塊OB9依據步驟S360形成如第10圖所示之加密檔案ED,且加密檔案ED的尺寸為15(cm)x20(cm)。 The first added block AB1 to the third added block AB3 and the randomly arranged first original block OB1 to the ninth original block OB9 form the encrypted file ED as shown in FIG. 10 according to step S360, and the encrypted file ED The dimensions are 15 (cm) x20 (cm).

還原模組360依據步驟S380接收第一原始區塊OB1至第九原始區塊OB9的原始區塊資訊OBI(如[-5,5,5,5,0]、[0,5,5,5,0]、[5,5,5,5,0]、[-5,0,5,5,0]、[0,0,5,5,0]、[5,0,5,5,0]、[-5,-5,5,5,0]、[0,-5,5,5,0]與[5,-5,5,5,0])以及加密檔案ED,並基於第一原始區塊OB1至第九原始區塊OB9的原始區塊資訊OBI以及加密檔案ED,將加密檔案ED還原成如第10圖的還原階段RSS所示之還原檔案RD。 The restoration module 360 receives the original block information OBI of the first original block OB1 to the ninth original block OB9 according to step S380 (such as [-5,5,5,5,0], [0,5,5,5 , 0], [5,5,5,5,0], [-5,0,5,5,0], [0,0,5,5,0], [5,0,5,5, 0], [-5, -5,5,5,0], [0, -5,5,5,0] and [5, -5,5,5,0]) and the encrypted file ED, based on The original block information OBI of the first original block OB1 to the ninth original block OB9 and the encrypted file ED restore the encrypted file ED to a restored file RD as shown in the restoration stage RSS in FIG. 10.

詳言之,還原模組360在接收到第一原始區塊 OB1至第九原始區塊OB9的原始區塊資訊OBI以及加密檔案ED後,根據原始區塊資訊OBI中的尺寸資訊SI,如原始區塊的寬度W2以及高度H2皆為5(cm),而將加密檔案ED進行切割成3X3的區塊。接著,再利用原始區塊資訊OBI中的位置資訊PI,如第一原始區塊OB1至第九原始區塊OB9的中心點座標分別為(-5,5)、(0,5)、(5,5)、(-5,0)、(0,0)、(5,0)、(-5,-5)、(0,-5)以及(5,-5),而將經隨機排列的第一原始區塊OB1至第九原始區塊OB9之位置重新排列成尚未經隨機排列的第一原始區塊OB1至第九原始區塊OB9之位置,並略過或刪除添加的第一添加區塊AB1至第三添加區塊AB3。最後,再將經旋轉的第二原始區塊OB2以及第七原始區塊OB7依據旋轉資訊RI,將經順時針旋轉90度的第二原始區塊OB2的旋轉角度還原為0度,並將經順時針旋轉180度的第七原始區塊OB7的旋轉角度還原為0度,以形成如第10圖的還原階段RSS所示之還原檔案RD,其中還原檔案RD的圖案內容會對應(於一實施例中完全相同於)原始的待加密檔案OD。 In detail, after the restoration module 360 receives the original block information OBI and the encrypted file ED of the first original block OB1 to the ninth original block OB9, according to the size information SI in the original block information OBI, such as the original The width W2 and height H2 of the block are both 5 (cm), and the encrypted file ED is cut into 3 × 3 blocks. Then, the position information PI in the original block information OBI is used. For example, the coordinates of the center points of the first original block OB1 to the ninth original block OB9 are (-5, 5), (0, 5), and (5). , 5), (-5,0), (0,0), (5,0), (-5, -5), (0, -5), and (5, -5), and will be randomly arranged Rearrange the positions of the first original block OB1 to the ninth original block OB9 to the positions of the first original block OB1 to the ninth original block OB9 that have not been randomly arranged, and skip or delete the added first addition Block AB1 to third add block AB3. Finally, according to the rotation information RI, the rotated second original block OB2 and the seventh original block OB7 are restored to a rotation angle of the second original block OB2 rotated 90 degrees clockwise to 0 degrees, and The rotation angle of the seventh original block OB7, which is rotated 180 degrees clockwise, is reduced to 0 degrees to form a restored file RD as shown in the restore stage RSS of FIG. 10, where the pattern content of the restored file RD will correspond (in an implementation The example is exactly the same as) the original OD file to be encrypted.

簡言之,若取得第一原始區塊OB1至第九原始區塊OB9的原始區塊資訊OBI,則可將加密檔案ED解密,並還原成對應待加密檔案OD的還原檔案RD。然而,若未取得第一原始區塊OB1至第九原始區塊OB9的原始區塊資訊OBI,則無法將加密檔案ED解密,故僅能輸出如第10圖的未還原階段URSS所示之加密檔案ED。再者,由於加密檔案ED的圖案內容(笑臉的圖案)與原始的待加密檔案OD的圖案內容(無法辨識的圖案)差異太大,因此未經授權之人難以從加密檔案ED而得到原始的待加密檔案OD,進而達到保護待加密檔案OD之目的。 In short, if the original block information OBI of the first original block OB1 to the ninth original block OB9 is obtained, the encrypted file ED can be decrypted and restored to a restored file RD corresponding to the file OD to be encrypted. However, if the original block information OBI of the first original block OB1 to the ninth original block OB9 is not obtained, the encrypted file ED cannot be decrypted, so only the encryption shown in the unrecovered stage URSS in FIG. 10 can be output Archive ed. Furthermore, because the content of the pattern of the encrypted file ED (the pattern of the smiling face) is too different from the original pattern of the file OD to be encrypted (the unrecognizable pattern), it is difficult for unauthorized persons to obtain the original The OD of the file to be encrypted, thereby achieving the purpose of protecting the OD of the file to be encrypted.

於另一實施例中,若待加密檔案OD的原始來源OS為非圖片檔時,則在步驟S380之後會更包含將屬於圖片格式的還原檔案RD還原成原本格式的步驟,例如待加密檔案OD的原始來源OS為文字檔時,則在步驟S380之後,屬於圖片格式的還原檔案RD將會被還原成文字檔。 In another embodiment, if the original source OS of the file to be encrypted OD is a non-picture file, after step S380, the method further includes a step of restoring the restored file RD belonging to the picture format to the original format, such as the file to be encrypted OD When the original source OS is a text file, after step S380, the restored file RD belonging to the picture format will be restored to a text file.

上述的加解密系統100~300以及加解密方法M100~M300係採用簡單且高防護性的切割以及重組之加解密機制進行檔案的加解密;此外,加解密系統100~300以及加解密方法M100~M300亦可應用於任何需要加解密檔案的領域,例如網頁領域。當應用於網頁領域中時,切割以及重組的技術可利用層疊樣式表(cascading style sheets,CSS)排版技術來完成,然並不以此為限。 The above-mentioned encryption and decryption systems 100 to 300 and the encryption and decryption methods M100 to M300 use a simple and highly protective cutting and reorganization encryption and decryption mechanism for file encryption and decryption; in addition, the encryption and decryption systems 100 to 300 and the encryption and decryption methods M100 to The M300 can also be used in any field that requires encryption and decryption of files, such as web pages. When applied to the field of webpages, cutting and recombining techniques can be accomplished using Cascading Style Sheets (CSS) layout technology, but not limited to this.

綜上所述,本揭示文件的加解密系統、加解密方法以及非暫態電腦可讀取記錄媒體可藉由切割模組將待加密檔案切割成複數個原始區塊以及排列模組將複數個原始區塊隨機排列,而可將待加密檔案加密成加密檔案,並藉由還原模組將經隨機排列的原始區塊之位置還原成原始位置,因此而將加密檔案還原成對應待加密檔案的還原檔案,藉以避免未經授權者不當使用待加密檔案,例如下載或列印,因此提高對待加密檔案的保護。 In summary, the encryption / decryption system, encryption / decryption method, and non-transitory computer-readable recording medium of the present disclosure can cut a file to be encrypted into a plurality of original blocks by a cutting module, and arrange a plurality of blocks by the arranging module. The original blocks are randomly arranged, and the file to be encrypted can be encrypted into an encrypted file, and the position of the randomly arranged original block can be restored to the original position by the restoration module. Therefore, the encrypted file is restored to correspond to the file to be encrypted. Restore files to prevent unauthorized use of files to be encrypted, such as downloading or printing, thereby increasing the protection of encrypted files.

雖然本案已以實施例揭露如上,然其並非用以限定本案,任何所屬技術領域中具有通常知識者,在不脫離本案之精神和範圍內,當可作些許之更動與潤飾,故本案之保護範圍當視後附之申請專利範圍所界定者為準。 Although this case has been disclosed as above with examples, it is not intended to limit this case. Any person with ordinary knowledge in the technical field can make some modifications and retouching without departing from the spirit and scope of this case. Therefore, the protection of this case The scope shall be determined by the scope of the attached patent application.

Claims (10)

一種加解密系統,包含:一切割模組,用以將一待加密檔案切割成各自具有一原始區塊資訊的複數個原始區塊;一排列模組,係與該切割模組連接,用以隨機排列該等原始區塊以形成一加密檔案;以及一還原模組,係與該切割模組以及該排列模組連接,用以接收該等原始區塊的該等原始區塊資訊以及該加密檔案,並基於該等原始區塊的該等原始區塊資訊將該加密檔案還原成對應該待加密檔案的一還原檔案。     An encryption and decryption system includes: a cutting module for cutting a file to be encrypted into a plurality of original blocks each having an original block information; an array module connected to the cutting module for Randomly arranging the original blocks to form an encrypted file; and a restoration module connected to the cutting module and the arranging module to receive the original block information of the original blocks and the encryption File, and restore the encrypted file to a restored file corresponding to the file to be encrypted based on the original block information of the original blocks.     如請求項1所述之加解密系統,其中該原始區塊資訊包含位置資訊、尺寸資訊以及旋轉資訊。     The encryption and decryption system according to claim 1, wherein the original block information includes position information, size information, and rotation information.     如請求項1所述之加解密系統,更包含一添加模組,係與該排列模組連接,用以添加複數個添加區塊以與該等原始區塊組合,該排列模組用以隨機排列該等添加區塊與該等原始區塊以形成該加密檔案,該還原模組用以接收該等原始區塊的該等原始區塊資訊以及該加密檔案,並基於該等原始區塊的該等原始區塊資訊將該加密檔案還原成該還原檔案。     The encryption / decryption system according to claim 1, further comprising an adding module, which is connected to the arranging module to add a plurality of adding blocks to combine with the original blocks. The arranging module is used to randomly The added blocks and the original blocks are arranged to form the encrypted file, and the restoration module is used to receive the original block information of the original blocks and the encrypted file, and based on the original block's The original block information restores the encrypted file into the restored file.     如請求項1所述之加解密系統,更包含一添加模組,係與該排列模組連接,用以添加複數個添加區塊以 與經隨機排列的該等原始區塊組合以形成該加密檔案,該還原模組用以接收該等原始區塊的該等原始區塊資訊以及該加密檔案,並基於該等原始區塊的該等原始區塊資訊將該加密檔案還原成該還原檔案。     The encryption / decryption system according to claim 1, further comprising an adding module connected to the arrangement module for adding a plurality of added blocks to combine with the randomly arranged original blocks to form the encryption. File, the restoration module is used to receive the original block information of the original blocks and the encrypted file, and restore the encrypted file to the restored file based on the original block information of the original blocks.     一種加解密方法,包含以下步驟:接收一待加密檔案;將該待加密檔案切割成各自具有一原始區塊資訊的複數個原始區塊;隨機排列該等原始區塊、隨機排列該等原始區塊與複數添加區塊的組合,或組合該等添加區塊與經隨機排列的該等原始區塊;形成一加密檔案;以及接收該等原始區塊的該等原始區塊資訊以及該加密檔案,並基於該等原始區塊的該等原始區塊資訊將該加密檔案還原成對應該待加密檔案的一還原檔案。     An encryption and decryption method includes the following steps: receiving a file to be encrypted; cutting the file to be encrypted into a plurality of original blocks each having an original block information; randomly arranging the original blocks and randomly arranging the original regions A combination of a block and a plurality of added blocks, or a combination of the added blocks and the randomly arranged original blocks; forming an encrypted file; and receiving the original block information of the original blocks and the encrypted file And based on the original block information of the original blocks, restore the encrypted file to a restored file corresponding to the file to be encrypted.     如請求項5所述之加解密方法,在將該待加密檔案切割成各自具有該原始區塊資訊的複數個原始區塊的步驟與隨機排列該等原始區塊與複數添加區塊的組合的步驟之間更包含添加複數個添加區塊的步驟。     According to the encryption and decryption method described in claim 5, in the step of cutting the file to be encrypted into a plurality of original blocks each having the original block information, and a combination of randomly arranging the original blocks and a plurality of added blocks The steps further include a step of adding a plurality of added blocks.     如請求項5所述之加解密方法,在將該待加密檔案切割成各自具有一原始區塊資訊的複數個原始區塊的步驟與組合該等添加區塊與經隨機排列的該等原始區塊的步 驟之間更包含添加複數個添加區塊的步驟。     The encryption and decryption method described in claim 5, in the step of cutting the file to be encrypted into a plurality of original blocks each having an original block information, and combining the added blocks and the randomly arranged original regions The steps of the block further include a step of adding a plurality of added blocks.     一種非暫態電腦可讀取記錄媒體,該非暫態電腦可讀取記錄媒體記錄至少一程式指令,該至少一程式指令在載入一加解密系統後,執行下列步驟:接收一待加密檔案;將該待加密檔案切割成各自具有該原始區塊資訊的複數個原始區塊;隨機排列該等原始區塊、隨機排列該等原始區塊與複數添加區塊的組合,或組合該等添加區塊與經隨機排列的該等原始區塊;形成一加密檔案;以及接收該等原始區塊的該等原始區塊資訊以及該加密檔案,並基於該等原始區塊的該等原始區塊資訊將該加密檔案還原成對應該待加密檔案的一還原檔案。     A non-transitory computer can read a recording medium. The non-transitory computer can read a recording medium and record at least one program instruction. After the at least one program instruction is loaded into an encryption and decryption system, the following steps are performed: receiving a file to be encrypted; Cutting the file to be encrypted into a plurality of original blocks each having the original block information; randomly arranging the original blocks, randomly arranging the original blocks and a plurality of added blocks, or combining the added regions Block and the randomly arranged original blocks; forming an encrypted file; and receiving the original block information of the original blocks and the encrypted file, and based on the original block information of the original blocks The encrypted file is restored into a restored file corresponding to the file to be encrypted.     如請求項8所述之非暫態電腦可讀取記錄媒體,在將該待加密檔案切割成各自具有該原始區塊資訊的該等原始區塊的步驟與隨機排列該等原始區塊與該等添加區塊的組合的步驟之間更包含添加該等添加區塊的步驟。     The non-transitory computer-readable recording medium as described in claim 8, in the step of cutting the file to be encrypted into the original blocks each having the original block information and randomly arranging the original blocks and the Steps such as the combination of adding blocks further include steps of adding such adding blocks.     如請求項8所述之非暫態電腦可讀取記錄媒體,在將該待加密檔案切割成各自具有原始區塊資訊的該等原始區塊的步驟與組合該等添加區塊與經隨機排列的該等原始區塊的步驟之間更包含添加該等添加區塊的步驟。     The non-transitory computer-readable recording medium as described in claim 8, in the steps and combinations of cutting the to-be-encrypted file into the original blocks each having original block information, the added blocks are randomly arranged The steps of the original blocks further include the steps of adding the added blocks.    
TW106127364A 2017-08-11 2017-08-11 Encryption and decryption system, encryption and decryption method, and non-transitory computer readable recording medium TW201911105A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
TW106127364A TW201911105A (en) 2017-08-11 2017-08-11 Encryption and decryption system, encryption and decryption method, and non-transitory computer readable recording medium
CN201810609735.2A CN109388964A (en) 2017-08-11 2018-06-13 Encryption/decryption system and method, and non-transitory computer-readable recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW106127364A TW201911105A (en) 2017-08-11 2017-08-11 Encryption and decryption system, encryption and decryption method, and non-transitory computer readable recording medium

Publications (1)

Publication Number Publication Date
TW201911105A true TW201911105A (en) 2019-03-16

Family

ID=65416597

Family Applications (1)

Application Number Title Priority Date Filing Date
TW106127364A TW201911105A (en) 2017-08-11 2017-08-11 Encryption and decryption system, encryption and decryption method, and non-transitory computer readable recording medium

Country Status (2)

Country Link
CN (1) CN109388964A (en)
TW (1) TW201911105A (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110363016B (en) * 2019-07-15 2021-05-07 宜春宜联打印设备有限公司 Printing encryption method and device, printing method and printing equipment

Also Published As

Publication number Publication date
CN109388964A (en) 2019-02-26

Similar Documents

Publication Publication Date Title
Lach et al. Signature hiding techniques for FPGA intellectual property protection
US9268918B2 (en) Encryption and decryption of a dataset in at least two dimensions
JP6697307B2 (en) ENCRYPTION DEVICE, PROGRAM, AND ENCRYPTION METHOD
WO2017000726A1 (en) Key transformation method, apparatus, and terminal
CN111832031B (en) Family file processing method and device, computer equipment and storage medium
KR20130111715A (en) Method of generating random permutations, random permutation generating device, and encryption/decryption device having the same
JP6445796B2 (en) Image obfuscation apparatus, image obfuscation method, program, and recording medium
TW201911105A (en) Encryption and decryption system, encryption and decryption method, and non-transitory computer readable recording medium
CN106127669B (en) Based on the New chaotic image encryption method for protecting area B aker mapping
CN103093127B (en) Method and system of dynamic copyright protection based on sudoku and multiple digital watermarks
CN110473214B (en) Image scrambling and recovering method based on Ramanujan matrix
Ansarmohammadi et al. Fast and area efficient implementation for chaotic image encryption algorithms
JP5530025B2 (en) Data division apparatus and data division program
CN110543777B (en) Image processing method, device, equipment and storage medium
JP2004199229A (en) Method for disabling decryption of data stored in storage device and computer program
JP7310516B2 (en) Image processing device, information processing device, and computer program
CN109800590A (en) A kind of rectangular digital image three dimensional symmetry encryption method
JP5149061B2 (en) Program obfuscation apparatus, program obfuscation method, and program
Chang et al. A visual secret sharing scheme for progressively restoring secrets
US11664976B2 (en) Method and devices for creating redundancy and encryption using Mojette Transform
CN113722746B (en) Chaos encryption method and system for cable construction drawing
JP6214416B2 (en) Data storage device, method and program
JP2023063948A (en) Image processing apparatus, control method, and program
Chen et al. Image Cryptosystem for Different Kinds of Image by Using Improved Arnold Map
CN112069512A (en) Data processing method, data processing device, computer equipment and storage medium