现在的位置: 首页 > 综合 > 正文

The mobile virtual disk driver

2012年04月03日 ⁄ 综合 ⁄ 共 4444字 ⁄ 字号 评论关闭

I did not write the blog for a long time. These days, i use the google doc and note to record. I love them very much:) But there is a disadvantage in google doc, it does not support syntax highlight, so i think i have to write here. Fortunately, CSDN has support search in blog.



I have finished the virtual disk driver on the mobile recently. It can encrypt the data in devices automatically without user intervention, providing a user-transparent yet fully-enforceable security policy. I use the fat FS to implement the virtual disk, Before write every sector, encrypt data with aes, and decrypt before read. I

user password's MD5 to make aes key.

That code like this:






In anthentication, i use user password's SHA1 in register. like this:


The most important is XXX_IOControl, we have to

implement our IOCTL_DISK_GETINFO, DISK_IOCTL_GETINFO, IOCTL_DISK_DEVICE_INFO,IOCTL_DISK_READ, DISK_IOCTL_READ, IOCTL_DISK_WRITE, DISK_IOCTL_WRITE, the sample like this:


Becareful

IOCTL_DISK_GETINFO and DISK_IOCTL_GETINFO are defferent!!

 

Next, i want implement my owner file system, So it can be more safely and efficiently! FAT or EXT2? i do'nt know.

 



抱歉!评论已关闭.