我如何将文件划分为数据块,以及如何对这些文件的哈希值进行加法运算 [英] how can i divide a file into data blocks and how can i gat hash values of those

查看:269
本文介绍了我如何将文件划分为数据块,以及如何对这些文件的哈希值进行加法运算的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的朋友我想将文件F(可以是音频,文本,视频或任何文件)划分为2 ^ n(最好取一个固定值n = 4)相等大小的数据块,并且还想创建一个每个数据块的哈希值(sha-1或MD5),并且应该为我的数据块的这些哈希值创建一个merkle哈希树,以便获取元数据(这只是merkle哈希树的根)...而我需要签名(使用私钥加密)...,然后将签名的元数据和文件一起发送到云服务器以进行存储.....因为客户端没有空间来存储他的数据,客户端使用云计算将数据存储在云服务器中的概念,客户端在其本地计算机上删除实际数据和元数据...请帮助我在Java中....


实际上,我正在做M.Tech,我的项目是在云计算上的,标题为为云计算的存储安全性启用公开审核和数据动态"

这是一种我们应该只在本地计算机上创建云服务器来模拟它的项目.
我们必须证明我们正在将数据存储在远程云服务器中并检查远程数据的完整性.....

解决方案

Java代码不是这里的问题;问题是定义每个块应该有多长时间,将使用哪种哈希算法,元数据将在哪里存储等.在定义(设计)解决方案的这一部分之前,不必担心代码. /blockquote>

hi friend I want to divide a file F(may audio,text,video or any file) into 2^n(it is better to take a fixed value n=4) equal size data blocks and also want to create an hashes(sha-1 or MD5) for each data block and should create a merkle hash tree of these hashes of my data blocks in order to get metadata(which is nothing but the root of merkle hash tree)...and I need to sign (Encrypt with Private Key) it......and and send signed meta data along with file to cloud server to store it.....as client don''t have space to store his data client uses cloud computing concept to store the data in cloud server and client deletes actual data and meta data at his local machine ...plz can you help me that in java....


actually I am doing M.Tech and my project is on cloud computing...titled"Enabling Publicly auditability and data dynamics for storage security in cloud computing"

it is the kind of project that we should simulate it by creating a cloud server in our local machine only.
we have to show as that we are storing the data in remote cloud server and checking the integrity of remote data.....

解决方案

The Java code is not the problem here; the problem is defining how long each block should be, what hash algorithm you will use, where you will store the metadata, etc. Until you have defined (and designed) that part of your solution there is no point in worrying about code.


这篇关于我如何将文件划分为数据块,以及如何对这些文件的哈希值进行加法运算的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆