KR101780445B1 - Method and appratus of comperssing and unpackaging unit file for encryption of epub file - Google Patents
Method and appratus of comperssing and unpackaging unit file for encryption of epub file Download PDFInfo
- Publication number
- KR101780445B1 KR101780445B1 KR1020150187855A KR20150187855A KR101780445B1 KR 101780445 B1 KR101780445 B1 KR 101780445B1 KR 1020150187855 A KR1020150187855 A KR 1020150187855A KR 20150187855 A KR20150187855 A KR 20150187855A KR 101780445 B1 KR101780445 B1 KR 101780445B1
- Authority
- KR
- South Korea
- Prior art keywords
- file
- unit
- encryption
- epub
- encrypted
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03M—CODING; DECODING; CODE CONVERSION IN GENERAL
- H03M7/00—Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
- H03M7/30—Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/62—Protecting access to data via a platform, e.g. using keys or access control rules
- G06F21/6209—Protecting access to data via a platform, e.g. using keys or access control rules to a single file or object, e.g. in a secure envelope, encrypted and accessed using a key, or with access control rules appended to the object itself
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0861—Generation of secret information including derivation or calculation of cryptographic keys or passwords
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Software Systems (AREA)
- Computer Hardware Design (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Bioethics (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Storage Device Security (AREA)
Abstract
A method and apparatus for compressing and restoring a unit file at the time of encrypting an EPUB file are disclosed. A compression method for a unit file for encrypting an EPUB (electronic publication) file includes the steps of: determining an encryption target unit file among a plurality of unit files constituting an EPUB file; Performing compression on the encryption target unit file; Performing encryption on the compressed unit file to be encrypted; And compressing the general unit file other than the file to be encrypted out of the plurality of unit files. Therefore, by compressing the encryption target unit file first, it is possible to effectively reduce the size of a single packaged EPUB file.
Description
The present invention relates to EPUB file encryption, and more particularly, to a method and apparatus for compressing and restoring a unit file when encrypting an EPUB file.
EPUB (Electronic Publication) is an open, free electronic book standard adopted as an official standard by the International Digital Publishing Forum (IPDF) to replace the pre-September 2007 open eBook standard. The EPUB is designed to be automatically reflowable and can be automatically provided to the user with optimized format and size of the display device.
The specification of EPUB consists of definitions such as OPS (Open Publication Structure), OPF (Open Packaging Format) and OCF (OEBPS Container Format). OPS is the top level definition of the EPUB publication format, which consists of definitions for the modularized configuration specification of EPUB content and definitions for the style sheet and limited use of XHTML or XML.
OPF conforms to the OCF standard and defines mechanisms for metadata, read order, and information search behavior in OCF, and OCF specifies a general definition of the container description of EPUB content.
In terms of the physical structure of an EPUB file, EPUB is a single file with an .epub extension, and compresses several components (directories and files) into a single file by a compression mechanism.
However, in the case where encryption is required for all or a part of a plurality of unit files constituting an EPUB file, if the unit file is encrypted, even if compressed into a single file through a compression mechanism, the file size is not reduced, Is lowered.
In order to solve the above problems, an object of the present invention is to provide a method of compressing and restoring a unit file when encrypting an EPUB file.
Another object of the present invention is to provide an apparatus for compressing and restoring a unit file when encrypting an EPUB file.
According to an aspect of the present invention, there is provided a method of compressing a unit file for EPUB file encryption, the method comprising: determining an encryption target unit file among a plurality of unit files constituting an EPUB file; ; Performing compression on the encryption target unit file; Performing encryption on the compressed unit file to be encrypted; And compressing the general unit file other than the encryption target unit file among the plurality of unit files.
Here, the method may further include a step of performing compression on a general unit file, followed by packaging, and compressing the unit file into a single file.
Here, the step of performing the encryption on the compressed unit file to be encrypted may perform the encryption using the different encryption keys for each compressed unit file to be encrypted.
The step of performing the encryption on the compressed unit file to be encrypted may generate and store mapping data in which the respective encryption keys and the identification information of the compressed unit file to be encrypted are mapped.
Here, in the step of compressing into a single file, the original data size of the unit file to be encrypted may be recorded in correspondence with the EPUB standard standard.
Here, in the step of compressing into a single file, the original data size of the unit file to be encrypted may be specified in encryption.xml.
According to another aspect of the present invention, there is provided a method of restoring a plurality of unit files constituting an EPUB file, comprising: unpackaging a single packaged EPUB file; Decrypting an encrypted unit file among a plurality of unit files constituting an unpackaged EPUB file; And extracting the original data size of the decoded unit file and restoring the decoded unit file.
Here, the step of decrypting the encrypted unit file among the plurality of unit files may decrypt the encrypted unit file using each of the decryption keys different for each encrypted unit file.
Here, the step of restoring the decoded unit file may extract the decoded unit file from the path according to the EPUB standard standard, and restore the decoded unit file.
Here, the step of restoring the decrypted unit file may be performed by reading the original data size of the decrypted unit file from the encryption.xml, and recovering the decrypted unit file.
According to another aspect of the present invention, there is provided a computer-readable recording medium having recorded thereon a program for causing a computer to execute a compression method for a unit file for encrypting an EPUB (Electronic Publication) file.
A method and apparatus for compressing and decompressing a unit file at the time of encrypting an EPUB file according to an embodiment of the present invention can reduce the size of a single packaged EPUB file by first compressing the unit file to be encrypted .
In addition, by specifying the original data size of the encryption target unit file in encryption.xml, a single packaged EPUB file can be more effectively restored.
1 is a diagram showing a directory structure of an EPUB file.
FIG. 2 is an exemplary diagram for explaining a compression mechanism when encryption is applied to an EPUB file. FIG.
3 is an exemplary diagram for explaining a compression mechanism when encryption is applied to an EPUB file according to an embodiment of the present invention.
4 is a flowchart for explaining a compression mechanism when encryption is applied to an EPUB file according to an embodiment of the present invention.
5 is a flowchart illustrating a restoration mechanism when encryption is applied to an EPUB file according to an embodiment of the present invention.
FIG. 6 is a block diagram illustrating an apparatus for performing a compression mechanism when encryption is applied to an EPUB file according to an embodiment of the present invention. Referring to FIG.
7 is an exemplary diagram showing the specification of encryption.xml according to an embodiment of the present invention.
8 is an exemplary view illustrating a user interface of an apparatus for performing a compression mechanism when encryption is applied to an EPUB file according to an embodiment of the present invention.
While the invention is susceptible to various modifications and alternative forms, specific embodiments thereof are shown by way of example in the drawings and will herein be described in detail. It should be understood, however, that the invention is not intended to be limited to the particular embodiments, but includes all modifications, equivalents, and alternatives falling within the spirit and scope of the invention. Like reference numerals are used for like elements in describing each drawing.
The terms first, second, A, B, etc. may be used to describe various elements, but the elements should not be limited by the terms. The terms are used only for the purpose of distinguishing one component from another. For example, without departing from the scope of the present invention, the first component may be referred to as a second component, and similarly, the second component may also be referred to as a first component. And / or < / RTI > includes any combination of a plurality of related listed items or any of a plurality of related listed items.
It is to be understood that when an element is referred to as being "connected" or "connected" to another element, it may be directly connected or connected to the other element, . On the other hand, when an element is referred to as being "directly connected" or "directly connected" to another element, it should be understood that there are no other elements in between.
The terminology used in this application is used only to describe a specific embodiment and is not intended to limit the invention. The singular expressions include plural expressions unless the context clearly dictates otherwise. In the present application, the terms "comprises" or "having" and the like are used to specify that there is a feature, a number, a step, an operation, an element, a component or a combination thereof described in the specification, But do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, or combinations thereof.
Unless defined otherwise, all terms used herein, including technical or scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. Terms such as those defined in commonly used dictionaries are to be interpreted as having a meaning consistent with the contextual meaning of the related art and are to be interpreted as either ideal or overly formal in the sense of the present application Do not.
Hereinafter, preferred embodiments according to the present invention will be described in detail with reference to the accompanying drawings.
1 is a diagram showing a directory structure of an EPUB file.
In terms of the physical structure of an EPUB file, EPUB is a single file with an .epub extension, and compresses several components (directories and files) into a single file by a compression mechanism.
Referring to FIG. 1, the 'mimetype' file, the META-INF directory, and the OEBPS directory are included in the root of the EPUB file.
The EPUB file structure has a file called mimetype in its parent folder, which is used as an identifier to distinguish between a general compressed file and an EPUB standard compressed file.
The META-INF directory is a meta information directory for structure information, copyright information, encryption information, etc. for e-books. The folder must contain a container.xml file. The META-INF directory includes files (manifest.xml, metadata.xml, signatures.xml, encryption.xml, rights.xml) containing document structure information, additional information, digital signature information, .
Specifically, the container.xml file is the first file referred to by the e-book reader, and contains the location information of the contents.opf which contains the structure of the actual contents (OPF) of the e-book. Here, the contents.opf file provides a list of all the files in the epub container, and stores the file sequence definition metadata information.
The encryption.xml is at the top level (META-INF /) of the container file system and contains all the encryption information for the contents of the EPUB container.
signatures.xml is also located at the top level of the container file system (META-INF /), containing the electronic signature information for the container and its contents.
The format for rights.xml is to display information about DRM license contents.
Also, the toc.ncx file is related to the table of contents of the book, and ncx supports multi-level navigation function.
FIG. 2 is an exemplary view for explaining a compression mechanism when encryption is applied to an EPUB file, and FIG. 3 is an exemplary view for explaining a compression mechanism when encryption is applied to an EPUB file according to an embodiment of the present invention .
Referring to FIG. 2, the EPUB file may be composed of a plurality of unit files, and the plurality of unit files may be divided into an encryption target unit file and a general unit file. Here, the encryption target unit file means a unit file designated as an object of encryption, and the general unit file can mean a unit file not designated as an object of encryption. For example, a plurality of unit files may have various data formats such as a text file, an image file, a moving picture file, and the like, and a unit file requiring encryption may be selected or determined.
When a part of a plurality of unit files constituting an EPUB file is designated as an encryption target, it is general that a compression mechanism is performed after encryption is performed first.
More specifically, encryption of a file to be encrypted may be performed among a plurality of unit files constituting the EPUB file (S210). After the encryption of the encryption target file is completed, the general unit file is compressed and packaged to generate a single file in an archive format (S220).
However, according to FIG. 2, when the compression mechanism is performed after the encryption of the encryption target unit file is performed, the encryption efficiency of the encryption target unit file is lowered and the file size is not effectively reduced.
Referring to FIG. 3, when a part of a plurality of unit files constituting an EPUB file is designated as an encryption target, the encryption unit can be performed after compressing the unit file to be encrypted first.
More specifically, compression of the encryption target file can be performed among a plurality of unit files constituting the EPUB file (S310). After the compression of the encryption target unit file is completed, the encryption target unit file can be encrypted (S320). After compression and encryption of the encryption target unit file is completed, compression and packaging of the general unit file are performed to generate a single file in an archive form (S330).
Accordingly, when the EPUB file is packaged through the mechanism according to FIG. 3, the compression of the unit file to be encrypted can be performed, thereby effectively reducing the size of a single packaged file.
4 is a flowchart for explaining a compression mechanism when encryption is applied to an EPUB file according to an embodiment of the present invention.
Referring to FIG. 4, a compression method for a unit file for EPUB file encryption can be performed by a packager operated by an online service provider, but the present invention is not limited to this embodiment no.
An encryption target unit file can be determined from a plurality of unit files constituting the EPUB file (S410). For example, among the plurality of unit files constituting the EPUB file, the unit file to be encrypted may be determined automatically by the packer according to a preset reference, or may be determined by the operator who operates the packager.
The encryption target unit file can be compressed (S420), and the compressed unit target file can be encrypted (S430).
In detail, encryption of the compressed unit file to be encrypted may be performed using each of the different encryption keys for each compressed unit file to be encrypted. Further, mapping data obtained by mapping the respective encryption keys and the identification information of the compressed unit file to be encrypted can be generated, stored, and managed.
Compression may be performed on a general unit file other than the encryption target unit file among the plurality of unit files (S440). After compressing the general unit file, packaging may be performed to compress the unit file into a single file (S450).
Further, in compression into a single file, the original data size of the encryption target unit file can be recorded in correspondence with the EPUB standard standard. That is, it is necessary to specify the original data size of the encryption target unit file because decompression (restoration) can be performed only by knowing the original data size of the encryption target unit file. For example, you can specify the original data size of the encryption target unit file in encryption.xml.
5 is a flowchart illustrating a restoration mechanism when encryption is applied to an EPUB file according to an embodiment of the present invention.
Referring to FIG. 5, a single EPUB file packaged according to the method described in FIG. 4 may be delivered to a user terminal through an online service provider or the like. The user terminal can restore a single packaged EPUB file using an EPUB viewer capable of displaying a single packaged EPUB file. A method of restoring the EPUB file performed by the EPUB viewer will be described below.
First, a single unpackaged EPUB file may be unpackaged (S510). That is, a single EPUB file can be divided into a plurality of unit files through unpackaging.
The encrypted unit file can be decoded among the plurality of unit files constituting the unpackaged EPUB file (S520). For example, decryption may be performed using a decryption key for each encrypted unit file based on the above-described mapping data. That is, the encrypted unit file can be decrypted using different decryption keys for each encrypted unit file.
The original data size of the decoded unit file can be extracted (S530), and the decoded unit file can be recovered based on the extracted original data size (S540). In detail, the decoded unit file can be extracted by extracting the original data size of the decoded unit file from the path according to the EPUB standard standard. For example, the decrypted unit file can be restored by reading the original data size of the decrypted unit file from encryption.xml.
FIG. 6 is a block diagram illustrating an apparatus for performing a compression mechanism when encryption is applied to an EPUB file according to an embodiment of the present invention, and FIG. 7 is a block diagram illustrating an encryption.xml format according to an embodiment of the present invention. FIG. 8 is an exemplary view illustrating a user interface of an apparatus for performing a compression mechanism when encryption is applied to an EPUB file according to an embodiment of the present invention. Referring to FIG.
Referring to FIG. 6, in the case where encryption is applied to an EPUB file, the
The
The user
In particular, FIG. 8 shows an example of a user interface provided by the user
The
The
The
Also, when compressing into a single file, the
For example, referring to FIG. 7, the original data size of the encryption target unit file can be specified in encryption.xml. Specifically, encryption.xml is at the top level (META-INF /) of the container file system and contains all the encryption information for the contents of the EPUB container. Therefore, the original data size of the encryption target unit file can be specified in encryption.xml as shown in FIG.
Although the configuration of the
In addition, when the encryption is applied to the EPUB file according to the embodiment of the present invention, the operation of the
The method and apparatus for compressing and restoring a unit file at the time of encrypting an EPUB file according to an embodiment of the present invention can reduce the size of a single packaged EPUB file by first compressing the unit file to be encrypted have.
In addition, by specifying the original data size of the encryption target unit file in encryption.xml, it is possible to more effectively restore a single packaged EPUB file.
It will be apparent to those skilled in the art that various modifications and variations can be made in the present invention without departing from the spirit or scope of the present invention as defined by the following claims It can be understood that
100: Device performing compression mechanism
110: User interface provisioning
120:
130:
140:
Claims (11)
Determining an encryption target unit file from a plurality of unit files constituting the EPUB file;
Performing compression on the encryption target unit file;
Performing encryption on the compressed unit file to be encrypted;
Performing compression on a unit file other than the encryption target unit file among the plurality of unit files; And
And compressing the compressed unit file and the compressed unit file into a single file,
Wherein the step of compressing the unit file into the single file includes the step of recording the original data size of the unit file to be encrypted in encryption.xml, which is a file containing encryption information corresponding to the EPUB standard standard,
The compression method for the unit file.
Wherein the step of encrypting the compressed unit file to be encrypted comprises:
Wherein the encryption unit encrypts the plurality of encryption keys using different encryption keys for each compressed unit file to be encrypted,
The compression method for the unit file.
Wherein the step of encrypting the compressed unit file to be encrypted comprises:
And generating and storing mapping data in which the respective encryption keys and the identification information of the compressed unit file to be encrypted are mapped,
The compression method for the unit file.
Unpackaging a single packaged EPUB file;
Decrypting an encrypted unit file among a plurality of unit files constituting the unpackaged EPUB file; And
Checking the original data size of the decrypted unit file recorded in encryption.xml, which is a file containing encryption information for the encrypted unit file among unpackaged EPUB files, and restoring the decrypted unit file ,
How to restore the unit file.
The step of decrypting the encrypted unit file among the plurality of unit files includes:
And decrypting the encrypted unit file using each of the different decryption keys for each of the encrypted unit files.
How to restore the unit file.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020150187855A KR101780445B1 (en) | 2015-12-28 | 2015-12-28 | Method and appratus of comperssing and unpackaging unit file for encryption of epub file |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020150187855A KR101780445B1 (en) | 2015-12-28 | 2015-12-28 | Method and appratus of comperssing and unpackaging unit file for encryption of epub file |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20170077686A KR20170077686A (en) | 2017-07-06 |
KR101780445B1 true KR101780445B1 (en) | 2017-09-21 |
Family
ID=59354501
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020150187855A KR101780445B1 (en) | 2015-12-28 | 2015-12-28 | Method and appratus of comperssing and unpackaging unit file for encryption of epub file |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR101780445B1 (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101287518B1 (en) * | 2012-02-08 | 2013-08-23 | 주식회사 파수닷컴 | Apparatus and method for digital rights management for epub-based contents, and apparatus and method for providing epub-based contents according to user authority |
KR101435891B1 (en) * | 2013-03-12 | 2014-09-01 | 주식회사 파수닷컴 | Apparatus and method for generating EPUB file applying digital rights |
-
2015
- 2015-12-28 KR KR1020150187855A patent/KR101780445B1/en active IP Right Grant
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101287518B1 (en) * | 2012-02-08 | 2013-08-23 | 주식회사 파수닷컴 | Apparatus and method for digital rights management for epub-based contents, and apparatus and method for providing epub-based contents according to user authority |
KR101435891B1 (en) * | 2013-03-12 | 2014-09-01 | 주식회사 파수닷컴 | Apparatus and method for generating EPUB file applying digital rights |
Also Published As
Publication number | Publication date |
---|---|
KR20170077686A (en) | 2017-07-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9536058B2 (en) | Apparatus and method for managing digital copyright on EPUB-based content, and apparatus and method for providing EPUB-based content according to user's right | |
EP3232364B1 (en) | Image encryption method, image viewing method, terminals and computer storage media | |
WO2015107935A1 (en) | Font distribution system and font distribution method | |
CN101167297A (en) | Method and apparatus for adding signature information to electronic documents | |
CN106559427B (en) | Data storage and data transmission system | |
JP2005339391A (en) | Information terminal device and content backup method | |
JP2015135638A5 (en) | ||
CN102004762B (en) | Generate the method and apparatus of e-book and download the method and apparatus of e-book | |
CN103036860A (en) | Verification method, verification system, server side, client side and terminal of electronic reading materials | |
CN106780280B (en) | Digital watermarking encryption method and device | |
KR101435891B1 (en) | Apparatus and method for generating EPUB file applying digital rights | |
KR101780445B1 (en) | Method and appratus of comperssing and unpackaging unit file for encryption of epub file | |
JP2011234178A (en) | Information recording medium, document data editing device, document data editing method | |
JP6703116B2 (en) | EPUB file encryption unit file compression and decompression method | |
CN101625702B (en) | Encryption method of data file with file allocation table format | |
CN109710899B (en) | Method and device for decrypting and obtaining evidence of file in storage medium | |
JPH10187572A (en) | Method for accessing information | |
US20090328146A1 (en) | Method of generating authentication code in digital device | |
JP7182022B2 (en) | computer equipment and word processing program | |
US9646015B1 (en) | Digital work compression | |
JP4213754B2 (en) | Information terminal equipment | |
CN105447343A (en) | Universal SD data card manufacturing method | |
KR101737729B1 (en) | Method for PDF conversion and System using the same | |
KR20160118546A (en) | Method for an electronic document security | |
CN113407970A (en) | Document processing method, device, medium and equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A201 | Request for examination | ||
E902 | Notification of reason for refusal | ||
AMND | Amendment | ||
E601 | Decision to refuse application | ||
AMND | Amendment | ||
X701 | Decision to grant (after re-examination) |