Abstract:
A method for managing a file in a remote folder in a shared storage in a network system is disclosed. The method comprises generating a symmetric cryptographic key for the file; generating a ciphertext according to a symmetric encrypting function of the file operating with the symmetric cryptographic key for the file; generating a metadata according to the symmetric encrypting function of the symmetric cryptographic key for the file operating with a symmetric cryptographic key for the remote folder; and uploading the ciphertext and the metadata to the remote folder.

Description:
CROSS REFERENCE TO RELATED APPLICATIONS 
       [0001]    This application claims the benefit of U.S. Provisional Application No. 61/728,237, filed on Nov. 20, 2012, entitled “Secure and Efficient Systems for Operations against Encrypted Files”, the contents of which are incorporated herein in their entirety. 
     
    
     BACKGROUND OF THE INVENTION 
       [0002]    1. Field of the Invention 
         [0003]    The present invention relates to a method and apparatus utilized in a network system, and more particularly, to a method and apparatus of managing an encrypted file in a shared storage in a network system. 
         [0004]    2. Description of the Prior Art 
         [0005]    Nowadays, users often collaborate on computer files in a shared storage provided by an internal corporate information technology department or an external service provider, such as Box, Dropbox or Google Drive. For example, if a file is stored in Google Drive, a collaborator who works on a local copy of the file in a personal computer using certain computer software can update the remote version in Google Drive with his local version. And other collaborators can further access the new version of the file. 
         [0006]    For privacy and confidentiality reasons, encrypting the file is desirable before uploading the file to the shared storage. Accordingly, it is necessary to make sure the collaborators have correct access rights to maintain the encrypted file while the secret cryptographic keys are only known to the collaborators. 
         [0007]    With respect to encryption, an asymmetric encrypting algorithm uses both public and secret cryptographic keys, such as an RSA algorithm, while a symmetric encrypting algorithm uses secret cryptographic keys only, such as an AES algorithm. In practice, one should take special care of the issue of initialization vector (IV). An IV is a block of bits that is used to randomize the encryption and hence to produce distinct ciphertexts even if the same plaintext is encrypted multiple times, without the need for a slower re-keying process. Most symmetric cryptographic algorithms require anew random IV every time they are used for encryption. And such IVs have to he stored alone with ciphertexts so that decryption is possible. 
         [0008]    Therefore, due to the intrinsic complexity of such a system, how to securely share and efficiently manage the secret cryptographic keys becomes an important issue. 
       SUMMARY OF THE INVENTION 
       [0009]    The present invention therefore provides a method and apparatus for managing a file in a shared storage in a network system, to keep the file secure and confidential. Without loss of generality we assume each such file resides in a remote (file) folder which is associated with a symmetric cryptographic key only known to collaborators. Such a symmetric cryptographic key for the remote folder can be maintained in any way. 
         [0010]    A method for managing a file in a remote folder in a shared storage in a network system is disclosed. The method comprises generating a symmetric cryptographic key for the file; generating a ciphertext according to asymmetric encrypting function of the file operating with the symmetric cryptographic key for the file; generating a metadata according to the symmetric encrypting function of the symmetric cryptographic key for the file operating with a symmetric cryptographic key for the remote folder; and uploading the ciphertext and the metadata to the remote folder. 
         [0011]    A computer readable medium comprising multiple instructions stored in a computer readable device is disclosed. Upon executing these instructions, a computer performs the following steps: generating a symmetric cryptographic key for a file; generating a ciphertext according to a symmetric encrypting function of the file operating with the symmetric cryptographic key for the file; generating a metadata according to the symmetric encrypting function of the symmetric cryptographic key for the file operating with a symmetric cryptographic key for the remote folder; and uploading the ciphertext and the metadata to the remote folder. 
         [0012]    A computer apparatus for a network system is disclosed. The computer apparatus comprises a processing means; a storage unit; and a program code, stored in the storage unit, wherein the program code instructs the processing means to execute the following steps: generating a symmetric cryptographic key for a file; generating a ciphertext according to a symmetric encrypting function of the file operating with the symmetric cryptographic key for the file; generating a metadata according to the symmetric encrypting function of the symmetric cryptographic key for the file operating with a symmetric cryptographic key for the remote folder; and uploading the ciphertext and the metadata to the remote folder. 
         [0013]    These and other objectives of the present invention will no doubt become obvious to those of ordinary skill in the art after reading the following detailed description of the preferred embodiment that is illustrated in the various figures and drawings. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0014]      FIG. 1  is a schematic diagram of a network system according to an example of the present invention. 
           [0015]      FIG. 2  is a schematic diagram of a computer apparatus according to an example of the present invention. 
           [0016]      FIGS. 3-6  are flowcharts of processes according to examples of the present invention. 
       
    
    
     DETAILED DESCRIPTION 
       [0017]    Please refer to  FIG. 1 , which is a schematic diagram of a network system  10  according to an example of the present invention. The network system  10  is briefly composed of a server and a plurality of computer devices. In  FIG. 1 , the server and the computer devices are simply utilized for illustrating the structure of the network system  10 . Practically, the server can be an internal corporate information technology or an external service provider, such as Box, Dropbox or Google Drive, providing a shared storage. Besides, users can manage the shared storage by remote access in the computer devices. 
         [0018]    Please refer to  FIG. 2 , which is a schematic diagram of a computer apparatus  20  according to an example of the present invention. The computer apparatus  20  can be one of the computer devices shown in  FIG. 1 , but is not limited thereto. The computer apparatus  20  may include a processing means  200  such as a microprocessor or Application Specific Integrated Circuit (ASIC), a storage unit  202  and a communication interfacing unit  204 . The storage unit  202  may be any data storage device that can store a program code  206 , accessed and executed by the processing means  200 . Examples of the storage unit  202  include but are not limited to read-only memory (ROM), flash memory, random-access memory (RAM), CD-ROM/DVD-ROM, magnetic tape, hard disk and optical data storage device. The communication interfacing unit  204  is preferably a transceiver and is used to transmit and receive signals (e.g., messages or packets) according to processing results of the processing means  200 . 
         [0019]    Please refer to  FIG. 3 , which is a flowchart of a process  30  according to an example of the present invention. The process  30  is utilized in the network system  10  shown in  FIG. 1 , for managing a file in a remote folder in the shared storage by one of the computer devices, to securely access the file by collaborators having the access right. The process  30  can be implemented in the computer apparatus  20  and may be compiled into the program code  206 . The process  30  includes the following steps: 
         [0020]    Step  300 : Start. 
         [0021]    Step  302 : Generate a symmetric cryptographic key for the file. 
         [0022]    Step  304 : Generate a ciphertext according to a symmetric encrypting function of the file operating with the symmetric cryptographic key for the file. 
         [0023]    Step  306 : Generate a metadata according to the symmetric encrypting function of the symmetric cryptographic key for the file operating with a symmetric cryptographic key for the remote folder. 
         [0024]    Step  308 : Upload the ciphertext and the metadata to the remote folder. 
         [0025]    Step  310 : Delete the ciphertext and the metadata in the remote folder. 
         [0026]    Step  312 : End. 
         [0027]    According to the process  30 , the computer device generates the ciphertext and the metadata according to the file, the symmetric cryptographic key for the file and the symmetric cryptographic key for the remote folder. Moreover, a period from the creation to the deletion of the file in the remote folder is regarded as a lifecycle of the file. Therefore, the collaborators can access the encrypted file in the remote folder and keep the file securely and confidentially in the lifecycle of the file. 
         [0028]    However, the collaborators who have access to the symmetric cryptographic key for the remote folder may also execute other operations, such as an updating operation, a downloading operation and a moving operation. In detail, for updating operation, the uploader generates an updated ciphertext according to the symmetric encrypting function of an updated file operating with the symmetric cryptographic key for the file and further uploads the updated ciphertext to the remote folder as a new version. 
         [0029]    Besides, for the downloading operation, a downloader is allowed to download the file when the downloader has access to the symmetric cryptographic key for the remote folder. The downloader can download the file from the remoter folder by downloading the ciphertext and the metadata from the remote folder and obtaining the file according to a symmetric decrypting function of the ciphertext operating with the symmetric cryptographic key for the file, which is obtained according to a symmetric decrypting function of the metadata operating with the symmetric cryptographic key for the remote folder. 
         [0030]    Moreover, for the moving operation, the collaborators may move the ciphertext and the metadata from the remote folder to the target folder and replace the metadata by a new metadata according to the symmetric encrypting function of the symmetric cryptographic key for the file operating with a symmetric cryptographic key for the target folder. 
         [0031]    As seen from the above, the updating, downloading and moving operations can be summarized to processes  40 ,  50  and  60 , as shown in  FIGS. 4-6 . The processes  40 ,  50  and  60  can be implemented in the computer apparatus  20  and may be compiled into the program code  206 . The process  40  includes the following steps: 
         [0032]    Step  400 : Start. 
         [0033]    Step  402 : Download the metadata from the remote folder. 
         [0034]    Step  404 : Obtain the symmetric cryptographic key for the file according to the symmetric decrypting function of the metadata operating with the symmetric cryptographic key for the remote folder. 
         [0035]    Step  406 : Generate the updated ciphertext according to the symmetric encrypting function of the updated file operating with the symmetric cryptographic key for the file. 
         [0036]    Step  408 : Generate the updated metadata according to the symmetric encrypting function of the symmetric cryptographic key for the file operating with the symmetric cryptographic key for the remote folder. 
         [0037]    Step  410 : Upload the updated ciphertext and the updated metadata to the remote folder as the new version. 
         [0038]    Step  412 : End. 
         [0039]    The process  50  includes the following steps: 
         [0040]    Step  500 : Start. 
         [0041]    Step  502 : Download the ciphertext and the metadata from the remote folder. 
         [0042]    Step  504 : Obtain the symmetric cryptographic key for the file according to the symmetric decrypting function of the metadata operating with the symmetric cryptographic key for the remote folder. 
         [0043]    Step  506 : Obtain the file according to the symmetric decrypting function of the ciphertext operating with the symmetric cryptographic key for the file. 
         [0044]    Step  508 : End. 
         [0045]    The process  60  includes the following steps: 
         [0046]    Step  600 : Start. 
         [0047]    Step  602 : Download the metadata from the remote folder. 
         [0048]    Step  604 : Obtain the symmetric cryptographic key for the file according to the symmetric decrypting function of the metadata operating with the symmetric cryptographic key for the remote folder. 
         [0049]    Step  606 : Generate the new metadata according to the symmetric encrypting function of the symmetric cryptographic key for the file operating with the symmetric cryptographic key for the target folder. 
         [0050]    Step  608 : Upload the new metadata to the target folder. 
         [0051]    Step  610 : Move the ciphertext from the remote folder to the target folder, and delete the metadata in the remote folder. 
         [0052]    Step  612 : End. 
         [0053]    Note that, the processes  30 ,  40 ,  50  and  60  are examples of the present invention, and those skilled in the art should readily make combinations, modifications and/or alterations on the abovementioned description and examples. For example, the symmetric encrypting and decrypting functions may be AES algorithms. Besides, without loss of generality, we assume the file resides in the remote (file) folder which is associated with the symmetric cryptographic key only known to the collaborators. The symmetric cryptographic key for the remote folder can be maintained in any way, such as a known key or a secret key, as long as the collaborators who have to access the file can know or obtain the symmetric cryptographic key for the remote folder. 
         [0054]    In another aspect, when some encrypting algorithms requiring initialization vectors (IV) are employed, one has to update and record the corresponding file key IV (which is used along with the file key to encrypt the file content) whenever encryption is executed. This is because the same file key is used to encrypt all the revisions of a file. In other words, each file version needs a unique file key IV, which is suggested to be stored in the metadata of a file. 
         [0055]    In the present invention, the computer device generates the ciphertext and the metadata according to the file, the symmetric cryptographic key for the file and the symmetric cryptographic key for the remote folder. Therefore, the file can be accessed and shared only for the members who have access rights to manage the file and keep secure and confidential. 
         [0056]    To sum up, the present invention provides a method and apparatus for managing the file in the shared storage in the network system, to keep the file secure and confidential. 
         [0057]    Those skilled in the art will readily observe that numerous modifications and alterations of the device and method may be made while retaining the teachings of the invention. Accordingly, the above disclosure should be construed as limited only by the metes and bounds of the appended claims.