Download EaseFilter Encryption Filter Driver SDK Setup File Download EaseFilter Encryption Filter Driver SDK Zip File
EsaeFilter Encryption Filter Driver (EEFD)為軟件開發人員提供全面的安全解決方案來開發透明的訪問文件級加密產品。透明地加密新創建的文件。在客戶端定義的策略控制下授權或阻止訪問加密/解密。
EEFD是文件過濾器驅動程序,實現透明訪問文件級加密。它攔截針對文件系統的 I/O 請求。通過在請求到達其預期的目標文件系統之前攔截請求,過濾器驅動程序可以加密或解密請求的原始目標提供的數據緩衝區。儘管市場上有很多加密軟件庫,但開發一個可靠的透明訪問文件加密產品仍然非常複雜。 EEFD是一個成熟的商業產品。它為開發人員提供了完整的模塊化框架,即使沒有驅動程序開發經驗也可以在一天內構建訪問文件加密軟件。
EEFD 使用帶有 AES 算法的 Microsoft CNG 加密庫。 AES加密算法(又稱Rijndael算法)是美國國家標準技術研究院(NIST)於2001年制定的一種電子數據加密規範。AES是一種符合美國FIPS 140-2標準的對稱分組密碼算法.它具有 128 位的固定塊大小和 128、192 或 256 位的密鑰大小。
EEFD 支持訪問文件加密的每個進程訪問限制。您可以為加密文件設置進程的白名單或黑名單。白名單進程可以讀取加密文件得到明文。黑名單進程只能得到加密後的原始數據。 EEFD 利用 Isolation Mini Filter Driver 技術為進程實現加密文件的兩個視圖。未經授權的進程將看到帶有原始密文的加密數據視圖。授權進程將看到帶有明文的解密數據視圖。
EEFD 支持將自定義數字版權管理 (DRM) 數據嵌入到加密文件中的文件頭。使用自定義 DRM 數據,您可以定義自定義加密訪問策略,它允許您動態地完全控制加密文件訪問。您可以隨時授予、撤銷或終止加密文件訪問權限,即使在加密文件已發送出您的組織之後也是如此。您可以用EEFD開發安全文件共享解決方案的應用程序。
CNG 加密庫支持 AES-NI(或英特爾高級加密標準新指令;AES-NI)。在硬件輔助支持下,它利用硬件增強的加密技術,可以實現比其他方式更快的速度和/或更高的安全性。 EEFD 使用 AES 塊密碼算法,它允許您在任何塊(16 字節)處加密或解密加密文件。您可以讀取加密文件的隨機塊,而無需對整個文件進行解密。 EEFD 將加密操作集成在同一個讀取或寫入 IO 中,無需額外的 IO,顯著提高了加密或解密性能。
下面是一個c#訪問文件加密示例來演示如何使用EEFD SDK。首先需要在A電腦上設置一個加密文件夾,可以配置可以讀取加密文件的授權進程和用戶。然後你可以在電腦B中設置解密文件夾,如果你想將加密文件分發到電腦B。為了訪問電腦B中的加密文件,你需要設置授權進程,只有授權進程才能訪問加密文件文件。
using System;
using EaseFilter.FilterControl;
namespace AutoFileEncryption
{
class Program
{
static FilterControl filterControl = new FilterControl();
static void Main(string[] args)
{
string lastError = string.Empty;
string licenseKey = "Email us to request a trial key: info@easefilter.com";
FilterAPI.FilterType filterType = FilterAPI.FilterType.CONTROL_FILTER
| FilterAPI.FilterType.ENCRYPTION_FILTER | FilterAPI.FilterType.PROCESS_FILTER;
int serviceThreads = 5;
int connectionTimeOut = 10; //seconds
try
{
//copy the right Dlls to the current folder.
Utils.CopyOSPlatformDependentFiles(ref lastError);
if (!filterControl.StartFilter(filterType, serviceThreads, connectionTimeOut, licenseKey, ref lastError))
{
Console.WriteLine("Start Filter Service failed with error:" + lastError);
return;
}
//setup a file filter rule for folder encryptFolder
string encryptFolder = "c:\\encryptFolder\\*";
FileFilter fileFilter = new FileFilter(encryptFolder);
//enable the encryption for the filter rule.
fileFilter.EnableEncryption = true;
//get the 256bits encryption key with the passphrase
string passPhrase = "mypassword";
fileFilter.EncryptionKey = Utils.GetKeyByPassPhrase(passPhrase, 32);
//disable the decyrption right, read the raw encrypted data for all except the authorized processes or users.
fileFilter.EnableReadEncryptedData = false;
//setup the authorized processes to decrypt the encrypted files.
string authorizedProcessesForEncryptFolder = "notepad.exe;wordpad.exe";
string[] processNames = authorizedProcessesForEncryptFolder.Split(new char[] { ';' });
if (processNames.Length > 0)
{
foreach (string processName in processNames)
{
if (processName.Trim().Length > 0)
{
//authorized the process with the read encrypted data right.
fileFilter.ProcessNameAccessRightList.Add(processName, FilterAPI.ALLOW_MAX_RIGHT_ACCESS);
}
}
}
//setup the authorized users to decrypt the encrypted files.
string authorizedUsersForEncryptFolder = "domainName\\user1";
if (!string.IsNullOrEmpty(authorizedUsersForEncryptFolder) && !authorizedUsersForEncryptFolder.Equals("*"))
{
string[] userNames = authorizedUsersForEncryptFolder.Split(new char[] { ';' });
if (userNames.Length > 0)
{
foreach (string userName in userNames)
{
if (userName.Trim().Length > 0)
{
//authorized the user with the read encrypted data right.
fileFilter.userAccessRightList.Add(userName, FilterAPI.ALLOW_MAX_RIGHT_ACCESS);
}
}
}
if (fileFilter.userAccessRightList.Count > 0)
{
//set black list for all other users except the white list users.
uint accessFlag = FilterAPI.ALLOW_MAX_RIGHT_ACCESS & ~(uint)FilterAPI.AccessFlag.ALLOW_READ_ENCRYPTED_FILES;
//disable the decryption right, read the raw encrypted data for all except the authorized users.
fileFilter.userAccessRightList.Add("*", accessFlag);
}
}
//add the encryption file filter rule to the filter control
filterControl.AddFilter(fileFilter);
//setup a file filter rule for folder decryptFolder
string decryptFolder = "c:\\decryptFolder\\*";
FileFilter decryptFileFilter = new FileFilter(decryptFolder);
//enable the encryption for the filter rule.
decryptFileFilter.EnableEncryption = true;
//get the 256bits encryption key with the passphrase
decryptFileFilter.EncryptionKey = Utils.GetKeyByPassPhrase(passPhrase, 32);
//don't encrypt the new created file in the folder.
decryptFileFilter.EnableEncryptNewFile = false;
//disable the decyrption right, read the raw encrypted data for all except the authorized processes or users.
decryptFileFilter.EnableReadEncryptedData = false;
//setup authorized processes to decrypt the encrypted files.
string authorizedProcessesForDecryptFolder = "notepad.exe;wordpad.exe";
processNames = authorizedProcessesForDecryptFolder.Split(new char[] { ';' });
if (processNames.Length > 0)
{
foreach (string processName in processNames)
{
if (processName.Trim().Length > 0)
{
//authorized the process with the read encrypted data right.
decryptFileFilter.ProcessNameAccessRightList.Add(processName, FilterAPI.ALLOW_MAX_RIGHT_ACCESS);
}
}
}
filterControl.AddFilter(decryptFileFilter);
if (!filterControl.SendConfigSettingsToFilter(ref lastError))
{
Console.WriteLine("SendConfigSettingsToFilter failed." + lastError);
return;
}
Console.WriteLine("Start filter service succeeded.");
// Wait for the user to quit the program.
Console.WriteLine("Press 'q' to quit the sample.");
while (Console.Read() != 'q') ;
filterControl.StopFilter();
}
catch (Exception ex)
{
Console.WriteLine("Start filter service failed with error:" + ex.Message);
}
}
}
}