Data protection - Encryption on-the-fly theory
Posted: Wed Jan 30, 2008 7:48 pm
Data protection theory
The only safe way to protect your data is to keep them away from others.
In case that your data is in public place or must be transfered over the internet, you have to encrypt them.
There are a lot of encryption methods that successfully protects your data.
One common method is something like safe box.
You have an application that creates a virtual drive (or folder, or file) and you put all your sensitive data in there.
The application uses a password to open the safe box, and its good to be keep this password only in your mind.
If the application saves the password somewhere in your pc, then its easy to be decrypted.
Good safe boxes keeps only the CRC32/MD5 of decrypted data, just to compare is decryption was success without comparing the given password with correct password.
An other method, that is the best for me, is the encryption/decryption on-the-fly.
How it works:
You create a password protected ring-0 application that hooks disk IO actions (create, open, read, write, seek, close).
Every time system is trying on of the above actions, your code will be called.
All your encrypted data will contain a signature, just to know if you have to decrypted or not.
In case that signature is missing, ignore it and return to original IO function.
In case that signature exists, depends on the function is called, you do:
Create / Open: Just keep the file handle for later usage
Seek: Just keep the file pointer
Close: Release/Clear/Delete file handle
Read: Read file. Decrypt the data direct into given memory buffer.
Write: Encrypt the data from given memory buffer. Write file.
So, your application is between the system and the applications.
All the time the data that is on the disk is encrypted.
Decrypted data are only in memory.
If someone tries to copy a protected file to floppy/CD/whatever, the written file will be encrypted.
There is only one way to make a decrypted copy of this kind of protected file, in case this is a document.
You must have physical access to this computer and the decryptor must be enabled. Then just open the document and print it to paper.
The above encryption method is also applicable to video/audio files
The only safe way to protect your data is to keep them away from others.
In case that your data is in public place or must be transfered over the internet, you have to encrypt them.
There are a lot of encryption methods that successfully protects your data.
One common method is something like safe box.
You have an application that creates a virtual drive (or folder, or file) and you put all your sensitive data in there.
The application uses a password to open the safe box, and its good to be keep this password only in your mind.
If the application saves the password somewhere in your pc, then its easy to be decrypted.
Good safe boxes keeps only the CRC32/MD5 of decrypted data, just to compare is decryption was success without comparing the given password with correct password.
An other method, that is the best for me, is the encryption/decryption on-the-fly.
How it works:
You create a password protected ring-0 application that hooks disk IO actions (create, open, read, write, seek, close).
Every time system is trying on of the above actions, your code will be called.
All your encrypted data will contain a signature, just to know if you have to decrypted or not.
In case that signature is missing, ignore it and return to original IO function.
In case that signature exists, depends on the function is called, you do:
Create / Open: Just keep the file handle for later usage
Seek: Just keep the file pointer
Close: Release/Clear/Delete file handle
Read: Read file. Decrypt the data direct into given memory buffer.
Write: Encrypt the data from given memory buffer. Write file.
So, your application is between the system and the applications.
All the time the data that is on the disk is encrypted.
Decrypted data are only in memory.
If someone tries to copy a protected file to floppy/CD/whatever, the written file will be encrypted.
There is only one way to make a decrypted copy of this kind of protected file, in case this is a document.
You must have physical access to this computer and the decryptor must be enabled. Then just open the document and print it to paper.
The above encryption method is also applicable to video/audio files