Few days ago at work, I was tweaking the enterprise library tool to encrypt the config files. This is a fairly easy task and can be acheived using "Encryption settings" on the configuration application block.

However, once concern our client raised was specification of the algorithm key file location using full physical path. Instead, they were looking to reference it using a relative path something like "~/encrypt.key". Configuration block by default does not support relative path. However, making it read relative path is achieveable by tinkering the configuration block. 'FileKeyAlgorithmPairStorageProviderData' in the enterprise library configuration project contains attribute for path, this path is directly passed as parameter. Instead, the path parameter can be resolved on need basis to either reference from physical location or relative location. I don't have a coded dll yet but I'll come up with one soon.
<
<
keyAlgorithmStorageProvider xsi:type="FileKeyAlgorithmPairStorageProviderData" name="File Key Algorithm Storage Provider" path="C:\projects\encrypt.key">dpapiSettings xsi:nil="true" />