Implementation
The rpmsg file is created by writing body, attachments and images to a compound file and then compressing and encrypting it to create aRights control
When a rights managed mail is created the author specifies what rights they wish to grant to the recipient and these rights are specified in the form of an XrML certificate called a 'Publishing License'. This certificate is included within the encrypted rpmsg file. When the rpmsg attachment is decrypted the enclosed 'Publishing License' is sent to the information protection service pointed to by its header in order to obtain a Use License. The service, after analyzing the policy in the certificate and matching it to the identity of the requestor, will build the Use License, another XrML encoded document, which will then be delivered to the client and used by Outlook to determine what the recipient can and cannot do with the message (rights to forward, copy etc.).File format
An rpmsg file consists of a magic number followed by one or more data chunks. The magic number is the eight-byte sequence76 e8 04 60 c4 11 e3 86
.
Each data chunk consists of a 12-byte header followed by a variable amount of data bytes. The chunk header consists of 3 DWORDS in little-endian byte order:
* Magic number a0 0f 00 00
* Uncompressed chunk length YY YY YY YY
* Compressed chunk length XX XX XX XX
.
The chunk body consists of ''X'' bytes of compressed data.
The concatenated data chunks form a single data stream compressed using the DEFLATE algorithm. The format of the uncompressed data is a Compound File Binary document. More specifically, the uncompressed data conforms to the Office Document Cryptography Structure format.
References
{{refs, refs= {{ cite web , url = https://docs.microsoft.com/en-us/openspecs/exchange_server_protocols/ms-oxormms/d530fdeb-c933-4388-b09e-24f9d30b135d , title = S-OXORMMS Format of the message.rpmsg Attachment , work = Open Specifications , publisher = Microsoft {{ cite web , url = https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/aa767786(v=vs.85) , title = Rights Management for E-Mail Messages (Windows) , work = Internet Explorer for Developers , publisher = Microsoft {{ cite web , url = https://searchwindowsserver.techtarget.com/news/964022/Using-IRM-to-protect-messages , archiveurl = https://web.archive.org/web/20190131201402/https://searchwindowsserver.techtarget.com/news/964022/Using-IRM-to-protect-messages , title = Using IRM to protect messages , work = TechTarget , last = Robichaux , first = Paul , date = 12 May 2004 , archivedate = 31 January 2019 , publisher = Microsoft {{ cite web , url = https://docs.microsoft.com/en-us/information-protection/rms-client/client-view-use-files#messagerpmsg-as-an-email-attachment , title = View and use protected documents with the AIP client , work = Azure Product Documentation , publisher = Microsoft , language = en-us , access-date = 2017-10-06 {{ cite web , url = https://docs.microsoft.com/en-us/openspecs/exchange_server_protocols/ms-oxormms/a121dda4-48f3-41f8-b12f-170f533038bb , title = S-OXORMMS Rights-Managed Email Object Protocol , work = Open Specifications , publisher = Microsoft {{ citation , title = Azure-Information-Protection-Samples: Azure Information Protection Samples , date = 2017-08-26 , url = https://github.com/Azure-Samples/Azure-Information-Protection-Samples , publisher = Azure Samples , accessdate = 2017-10-06 {{ cite web , url = https://msdn.microsoft.com/en-us/library/ff631362(v=exchg.80).aspx , title = S-ASRM Exchange ActiveSync: Rights Management Protocol , website = msdn.microsoft.com , language = en , access-date = 2017-10-06 {{ cite web , url = https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-rmpr/137bd55a-5e80-40b2-900a-bf46171824e6 , title = S-RMPR Glossary , work = Open Specifications , publisher = Microsoft {{ cite web , url = https://docs.microsoft.com/en-us/openspecs/office_file_formats/ms-offcrypto/3c34d72a-1a61-4b52-a893-196f9157f083 , title = S-OFFCRYPTO Office Document Cryptography Structure , work = Open Specifications , publisher = MicrosoftExternal links