CN105790928B - 一种基于数字摘要的文件分割方法 - Google Patents

一种基于数字摘要的文件分割方法 Download PDF

Info

Publication number
CN105790928B
CN105790928B CN201610244263.6A CN201610244263A CN105790928B CN 105790928 B CN105790928 B CN 105790928B CN 201610244263 A CN201610244263 A CN 201610244263A CN 105790928 B CN105790928 B CN 105790928B
Authority
CN
China
Prior art keywords
file
files
digital digest
blocks
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201610244263.6A
Other languages
English (en)
Other versions
CN105790928A (zh
Inventor
陈伟
王燚
刘鑫忠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
University of Electronic Science and Technology of China
Original Assignee
University of Electronic Science and Technology of China
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 University of Electronic Science and Technology of China filed Critical University of Electronic Science and Technology of China
Priority to CN201610244263.6A priority Critical patent/CN105790928B/zh
Publication of CN105790928A publication Critical patent/CN105790928A/zh
Application granted granted Critical
Publication of CN105790928B publication Critical patent/CN105790928B/zh
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/002Countermeasures against attacks on cryptographic mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0442Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply asymmetric encryption, i.e. different keys for encryption and decryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0618Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation
    • H04L9/0625Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation with splitting of the data block into left and right halves, e.g. Feistel based algorithms, DES, FEAL, IDEA or KASUMI
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • H04L9/3239Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Power Engineering (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Storage Device Security (AREA)

Abstract

本发明公开了一种基于数字摘要的文件分割提取方法,该算法主要包括数字摘要模块、文件分割模块和文件重组模块三个模块,分别完成提取并转换文件的数字摘要、将文件顺序地变换成大小相同的若干文件块以及将不同的文件块重组为两个文件,其中数字摘要作为文件提取的依据。本方法可以高效地保证数据机密性并能实现数据完整性验证,适用于文件外包存储的应用场景。

Description

一种基于数字摘要的文件分割方法
技术领域
本发明涉及数据安全领域,具体涉及一种提取文件的方法。
背景技术
随着大数据时代的来临,以及移动互联网的兴起和移动智能终端的广泛使用,企业和个人用户的存储需求不断扩张,逐渐超出了企业和个人用户的存储能力。基于云计算的外包存储服务为用户的存储需求缺口提供了理想的解决方案。然而外包存储的数据或文件脱离了用户的直接控制,从而使其安全性和隐私受到了严峻的威胁。为了保护用户外包存储数据的安全和隐私,通常需要对外包存储的数据或文件实施加密保护,并进行严格的访问控制。为了便于数据或文件的分享,目前外包存储数据或文件的访问控制通常基于公钥或属性基密码体制来构造。然而,公钥和属性基等密码体制一般是基于数学困难问题的,往往具有较大的计算开销,尤其是在涉及的数据或文件比较大的情况下,从而使得基于它们构造的访问控制性能低下。
文献《基于属性加密的组合文档安全自毁方案》发表于《电子学报》2014年2月第二期(366-375),在该文献中,作者采用了拉格朗日插值多项式来提取文件,并设计了一个门限,利用DHT自动丢弃节点的功能来实现文档分量的删除,从而实现文档的安全自毁。该方案中采用的拉格朗日插值多项式,是门限秘密共享的基础,但对于较大文件的提取,效率上存在一定的不足。
专利2015108308693中,给出了一种基于随机矩阵的密文提取方法。在该方案中,需要设定一个随机矩阵,在数据共享的应用场景下,需要一个可信的第三方来保存该矩阵。此外,该方案不能实现数据完整性验证。
在云计算外包存储的应用场景下,数据的机密性和完整性必须得到保证。基于数据机密性的考虑,将密钥或者小部分密文实施对称加密;为了实现数字签名、访问控制等复杂功能,引入公钥体制的加密算法,但外包存储的文件相对较大,因此算法性能难以得到保证;基于完整性考虑,引入哈希算法来实现完整性验证。
为了高效地保证数据机密性并能实现数据完整性验证,设计一种基于数字摘要的文件分割方法。
发明内容
本发明的目的是要提供一种具有验证功能的文件分割算法。本发明针对文件包存储场景中,基于非对称加密体质访问控制的效率问题,通过将文件不规则地分为大小两个分量,再小分量上实施访问控制以提高效率。针对较大数据量的非对称加密中存在的效率问题,在充分保护数据的机密性的前提下,实现数据完整性分割重组验证:通过对本发明的实施,可以将一个将要被外包存储的文件,通过乱序的方式分割成为大小两个部分,充分保证数据的机密性;计算文件的数字摘要值,作为重组的依据,并会被一并外包存储,用作数据完整性验证;此外,数字摘要会记录文件提取的位置,可以保证原始文件会被正确地恢复。
为了实现上述目的,本发明设计数字摘要模块、文件分割模块和文件重组模块三个模块,分别完成提取并转换文件的数字摘要、将文件顺序地变换成大小相同的若干文件块以及将不同的块按照数字摘要的内容重组为两个文件。
本发明的主要工作步骤如下:
步骤1:生成文件的数字摘要值,并将其转化为二进制串;
步骤2:设定分割粒度(0.5KB),按照分割粒度大小将密文分割成若干个文件块;
步骤3:为步骤2中输出的文件按顺序标号;
步骤:4:将已标号的文件块进行分组,分成128组;
步骤5:128位的二进制数字摘要值分别对应步骤4中的128个组,若二进制位为1,则取出该组的第一个文件块,若为0,则比较下一位,依次进行,输出两组文件块;
步骤6:分别合并步骤5中输出的两个文件块,形成提取文件和封装文件。
本发明首先计算要保护文件的哈希值,然后基于该哈希值对该文件进行提取,从而将原文件分割为一个很小的分量文件和较大的余量文件。将该算法应用于外包存储时,首先对外包存储数据或文件经对称加密后的密文进行提取,生成密文分量文件和密文余量文件,然后仅将密文余量文件进行外包存储,而少量的密文分量文件则可以由用户自行存储或进行二次加密以实施访问控制。这样,在对数据或文件实施机密性保护的同时,还通过破坏外包存储的数据或文件的完整性对其增加了一层保护,即使攻击者能够解密外包存储的密文余量文件,由于该文件是不完整,所以攻击者也不能获取外包存储数据或文件的完整信息。如果通过二次加密实施访问控制时,由于仅对少量的密文分量文件实施加解密,因此所带来的计算和时间开销将大大降低,从而提高访问控制的效率。
本发明将数据或文件的哈希值作为文件分割提取的依据,在合法用户获取文件进行重组后,再次计算数据或文件的哈希值,通过将分割提取前数据或文件的哈希值与重组后的哈希值进行比对,可以验证外包存储文件的完整性。
本发明的有益效果是能高效地保证数据机密性,并能实现数据完整性验证:通过文件的数字摘要实现数据完整性验证,并且数字摘要用作文件提取的依据,保证数据可以被正确的恢复;通过置换改变文件的组织顺序,使得提取的两部分文件不可读或者读到其内容也无法解释其意义,保证了数据的机密性;为了对原始文件实施如访问控制的保护措施,需要对文件进行非对称加密,加密可以实施于较小的提取文件,从而保证非对称加密算法的效率。
附图说明
图1基于数字摘要的文件分割方法的工作流程
图2文件的加密存储过程
图3文件的解密验证过程
图中1.原始文件,2.原始文件哈希值,3.提取文件,4.封装文件,5.云服务器,6.保护对象,7.取回文件的哈希值。
具体实施方式
以下提供本发明一种基于数字摘要的文件分割方法的具体实施方式,共提供1个实施例,但本发明不限于所提供的实施例。
实施例1
步骤1:选取MD5哈希算法对文件实施一次哈希,得到128位的文件二进制哈希值;
步骤2:将文件分成大小相同的若干块,文件块的大小固定为0.5KB,文件块的数目由待发送文件的大小确定:假设文件大小为N,文件数目为m,则m=2N;然后对分解出的小文件块以命名的方式进行标号;
步骤3:将已标号的文件块分成128组,则每组个数为g=m/128,根据哈希内容对小文件块进行提取:若该位为1,则取出该组的第一个元素;若该位为0,则不取出。经过上述过程,将会形成两个分别放有不同文件块的集合;分别合并这两个集合,将会得到较大的封装文件和较小的提取文件。
步骤4:封装文件可以直接存储在云服务器中,因为分割提取已经破坏了其原有的结构,攻击者不能识别其内容。提取文件在非对称加密后,与原始文件的Hash值封装在一起,形成提取对象上传至云服务器,既保证了加密效率,又可以保护外包到云服务器中的数据的安全性,提取文件在云服务器中将会受到保护,只有获得了解密私钥的用户才可以解密该文件,进而恢复原始文件。因此,原始文件在云服务器中的存储就得到了保护。上述过程如图2所示;
步骤5:分别从云服务器中取回封装文件和保护对象,利用从授权中心得到的用户私钥,对保护对象进行解密,得到提取文件,剥离保护对象中存放的哈希值,得到原始文件的哈希值;由于过程3中所述的提取过程是可逆的,根据所得到的哈希值,可以将提取文件和封装件合成成取回文件;将得到的取回文件再做一次数字摘要,得到的哈希值与从服务器中取回的原始文件哈希值进行比对:若相同,则说明文件在云服务器中没有被篡改或植入木马病毒;若不同,则说明文件已被篡改。上述过程如图3所示。

Claims (1)

1.一种基于数字摘要的文件分割方法,其特征在于,包括以下步骤:
步骤1:生成文件的数字摘要;
步骤2:将十六进制数字摘要值变换成二进制串;
步骤3:按照固定大小将文件分解成大小相同的若干个文件块,并顺序地为所有文件块标号;
步骤4:以二进制数字摘要为依据,选取步骤3中形成的文件块中的一部分文件块,形成两个文件块组;
步骤:5:合并两个文件块组,形成两个新的文件。
CN201610244263.6A 2016-04-18 2016-04-18 一种基于数字摘要的文件分割方法 Expired - Fee Related CN105790928B (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610244263.6A CN105790928B (zh) 2016-04-18 2016-04-18 一种基于数字摘要的文件分割方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610244263.6A CN105790928B (zh) 2016-04-18 2016-04-18 一种基于数字摘要的文件分割方法

Publications (2)

Publication Number Publication Date
CN105790928A CN105790928A (zh) 2016-07-20
CN105790928B true CN105790928B (zh) 2018-12-18

Family

ID=56397017

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610244263.6A Expired - Fee Related CN105790928B (zh) 2016-04-18 2016-04-18 一种基于数字摘要的文件分割方法

Country Status (1)

Country Link
CN (1) CN105790928B (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106897587A (zh) * 2017-02-27 2017-06-27 百度在线网络技术(北京)有限公司 加固应用、加载加固应用的方法和装置
CN109104431B (zh) * 2018-09-26 2021-03-30 杭州联汇科技股份有限公司 一种播出安全网单向向外网安全传输的方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102299960A (zh) * 2011-08-22 2011-12-28 盛乐信息技术(上海)有限公司 基于p2p技术的网络文件系统及方法
CN102664928A (zh) * 2012-04-01 2012-09-12 南京邮电大学 一种用于云存储的数据安全存取方法及用户端系统
CN102915325A (zh) * 2012-08-11 2013-02-06 深圳市极限网络科技有限公司 基于md5哈希列表的文件分解与组合技术
CN103458049A (zh) * 2013-09-16 2013-12-18 南京拓界信息技术有限公司 一种数据云分离存储系统及其存储方法
CN105376054A (zh) * 2015-11-25 2016-03-02 电子科技大学 一种基于随机矩阵的密文提取的方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102299960A (zh) * 2011-08-22 2011-12-28 盛乐信息技术(上海)有限公司 基于p2p技术的网络文件系统及方法
CN102664928A (zh) * 2012-04-01 2012-09-12 南京邮电大学 一种用于云存储的数据安全存取方法及用户端系统
CN102915325A (zh) * 2012-08-11 2013-02-06 深圳市极限网络科技有限公司 基于md5哈希列表的文件分解与组合技术
CN103458049A (zh) * 2013-09-16 2013-12-18 南京拓界信息技术有限公司 一种数据云分离存储系统及其存储方法
CN105376054A (zh) * 2015-11-25 2016-03-02 电子科技大学 一种基于随机矩阵的密文提取的方法

Also Published As

Publication number Publication date
CN105790928A (zh) 2016-07-20

Similar Documents

Publication Publication Date Title
CN110213354B (zh) 云存储数据机密性保护方法
US10097342B2 (en) Encoding values by pseudo-random mask
CN107800688A (zh) 一种基于收敛加密的云端数据去重和完整性审计方法
US9455833B2 (en) Behavioral fingerprint in a white-box implementation
CN105306194B (zh) 供加密档案和/或通讯协定的多重加密方法与系统
EP3169017B1 (en) Split-and-merge approach to protect against dfa attacks
CN104967693B (zh) 面向云存储的基于全同态密码技术的文档相似度计算方法
CN105117635A (zh) 一种本地数据的安全保护系统和方法
CN104396182A (zh) 加密数据的方法
Xiong et al. A secure document self-destruction scheme: an ABE approach
EP3068067B1 (en) Implementing padding in a white-box implementation
Gayathri et al. Hybrid cryptography for random-key generation based on ECC algorithm
CN105790928B (zh) 一种基于数字摘要的文件分割方法
CN108718232A (zh) 基于aes和混沌的图像加密方法
Hu Study of file encryption and decryption system using security key
EP2940917B1 (en) Behavioral fingerprint in a white-box implementation
CN105376054A (zh) 一种基于随机矩阵的密文提取的方法
Chen et al. SecureDropbox: a file encryption system suitable for cloud storage services
Tang et al. Fragile watermarking based proofs of retrievability for archival cloud data
Keerthana et al. Slicing, Tokenization, and Encryption Based Combinational Approach to Protect Data-at-Rest in Cloud Using TF-Sec Model
Joseph et al. Design a hybrid optimization and homomorphic encryption for securing data in a cloud environment
CN110162989A (zh) 基于cbc模式的多类型文件加密共享与访问控制方法
TWI554073B (zh) 供加密檔案和/或通訊協定之多重加密方法與系統
CN114553557B (zh) 密钥调用方法、装置、计算机设备和存储介质
Arjona et al. Using physical unclonable functions for internet-of-thing security cameras

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20181218

Termination date: 20210418

CF01 Termination of patent right due to non-payment of annual fee