Windows servers that support PeerDist protocol (via HTTP or SMB2)
sign the Segment Hash of Data (HoD) field using a
Server Secret to produce the Segment
Secret for a segment of data. The Server Secret is the
SHA-256 hash of the Server Passphrase.
Did that make sense? No, of course not.
Don't worry, it's all documented with greater clarity in [MS-PCCRC],
except that we introduce the term “Server Passphrase” to
name what [MS-PCCRC] obliquely describes as “an arbitrary length
binary string stored on the server”.
Windows servers allow you to export both the Server
Passphrase and the Server Secret (which is simply the
SHA-256 hash of the Server Passphrase) using the Netsh
exportkey command for BranchCache™, as follows:
> netsh branchcache exportkey [ outputfile= ] FilePath
[ passphrase= ] PassPhrase
The outputfile that is created will contain both the Server
Secret and the Server Passphrase, but the file will be AES encrypted
using the user-supplied PassPhrase. The decryption
process has not yet been documented by Microsoft, but it's all
available here.
The testing programs provided below will decrypt the
outputfile. The comments and code explain in detail how the
decryption is done.