fix: add missing efsr to codegen (#117)

This commit is contained in:
oiweiwei
2026-05-06 23:46:34 +02:00
committed by GitHub
parent 52d70a2249
commit 44cdc0b10a
51 changed files with 3510 additions and 27 deletions
+2 -1
View File
@@ -103,6 +103,7 @@ all:
dssp.go \
dtyp.go \
eerr.go \
efsr.go \
epm.go \
even.go \
even6.go \
@@ -117,8 +118,8 @@ all:
lrec.go \
lsad.go \
lsat.go \
mimicom.go \
mgmt.go \
mimicom.go \
mqds.go \
mqmp.go \
mqmq.go \
+1 -1
View File
@@ -296,7 +296,7 @@ Based on the [hirochachacha/go-smb2 fork](https://github.com/oiweiwei/go-smb2.fo
| Spec | Description | Package |
|------|-------------|---------|
| [MIMICOM](https://gist.github.com/gentilkiwi/e3d9c92b93ed4bb48f7956492c1d335a) | Mimikatz COM Interface | [msrpc/mimicom](./msrpc/mimicom) |
| [MIMICOM](https://gist.github.com/gentilkiwi/e3d9c92b93ed4bb48f7956492c1d335a) | Mimikatz Command Interface | [msrpc/mimicom](./msrpc/mimicom) |
### Documentation
@@ -0,0 +1,66 @@
<div class="content" name="FEK" uuid="00933615-c9cf-4d51-9d9a-bb3fb33a3560"><p> The <b>Encrypted FEK</b> field in the <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_1c30c0a6-5251-40d5-9641-748df0618e7c" data-linktype="relative-path">DDF</a> and <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_60e31963-34c7-4df0-a133-2ccd656bf425" data-linktype="relative-path">DRF</a> <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_718bfd46-3cd2-45e8-befa-55f5c9f3be7b" data-linktype="relative-path">key</a> list entries MUST consist
of the following structure, encrypted as specified in the description of the <b>Flags</b>
field for the key list entry. </p><table>
<tbody><tr>
<th><p><br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>1<br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>2<br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>3<br/>0</p></th>
<th><p><br/>1</p></th>
</tr>
<tr>
<td colspan="32">Key Length</td>
</tr>
<tr>
<td colspan="32">Entropy</td>
</tr>
<tr>
<td colspan="32">Algorithm</td>
</tr>
<tr>
<td colspan="32">Reserved</td>
</tr>
<tr>
<td colspan="32">Key (variable)</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
</tbody></table><p><b>Key Length (4 bytes): </b>The length, in bytes, of
the <b>Key</b> field. It MUST be a 32-bit unsigned integer in little-endian
format. Possible values depend on the algorithm ID (<a href="4cc8e6ae-99aa-483e-99c1-ab4c0ee46294" data-linktype="relative-path">ALG_ID</a>) as specified in
section 2.2.13.<a id="Appendix_A_Target_11"></a><a aria-label="Product behavior note 11" href="cecd911d-7105-45cc-a7c8-348335d6f03f#Appendix_A_11" data-linktype="relative-path">&lt;11&gt;</a></p><p><b>Entropy (4 bytes): </b>The number of bits of true
randomness in the key contained in this structure. It MUST be a 32-bit unsigned
integer in little-endian format. Possible values depend on the <b>Algorithm</b>
as specified in section 2.2.13.</p><p><b>Algorithm (4 bytes): </b>The symmetric
cryptographic algorithm associated with this key. It MUST be a 32-bit unsigned
integer in little-endian format. Possible values are specified in section
2.2.13. The possible values for this field are constrained by the value of the <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_3bd30c20-9517-4030-a48c-380362e209a1" data-linktype="relative-path">EFS</a> version field in the <a href="625335e5-a423-4d1c-be51-c696c32aa2eb" data-linktype="relative-path">EFSRPC Metadata</a>.</p><p><b>Reserved (4 bytes): </b>MUST be set to zero and
ignored.</p><p><b>Key (variable): </b>The <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_3a58e275-3d9f-4b66-8c8d-9808cd0cd8ff" data-linktype="relative-path">FEK</a> for the <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_a04c146a-de3b-4e4b-829f-a9e772f3fe25" data-linktype="relative-path">file</a>.</p></div>
@@ -0,0 +1,36 @@
<div class="content" name="EfsRpcDecryptFileSrv" uuid="043715de-caee-402a-a61b-921743337e78"><p>The EfsRpcDecryptFileSrv method is used to convert an
existing encrypted object to the unencrypted state in the server&#39;s data store.</p><dl>
<dd>
<div><pre> long EfsRpcDecryptFileSrv(
  [in] handle_t binding_h,
  [in, string] wchar_t* FileName,
  [in] unsigned long OpenFlag
 );
</pre></div>
</dd></dl><p><b>binding_h: </b>This is an <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_8a7f6700-8311-45bc-af10-82e10accd331" data-linktype="relative-path">RPC</a> <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_1cf35308-abab-4123-9cbd-99c42dc9a6ff" data-linktype="relative-path">binding</a> handle parameter,
as specified in <a href="https://go.microsoft.com/fwlink/?LinkId=89824" data-linktype="external">[C706]</a>
and <a href="../ms-rpce/290c38b1-92fe-4229-91e6-4fc376610c15" data-linktype="relative-path">[MS-RPCE]</a>
section <a href="../ms-rpce/a01f5886-c485-4bcf-bb23-e0d755510ab7" data-linktype="relative-path">2</a>.</p><p><b>FileName: </b>An EFSRPC identifier as specified in
section <a href="9db7433f-be13-4605-993f-3695a2d2916e" data-linktype="relative-path">2.2.1</a>.</p><p><b>OpenFlag: </b>This parameter is unused and MUST be
ignored by the server. It MUST be set to zero by the client.</p><p><b>Return Values: </b>The server MUST return zero if
it successfully processes the message received from the client. The server MUST
return a nonzero value if processing fails.</p><p>If no object exists on the server with the specified name,
the server MUST return a nonzero value. If the object exists and is not
encrypted, the server MUST return success.</p><p>Otherwise, the server performs the following actions to
convert the object in its data store to an unencrypted state:</p><ul><li><p><span><span>
</span></span>If the data object referred to by <i>FileName</i> is a container
for other objects, the server MUST clear the attribute on the container that
instructs the data store to encrypt any new objects created in that container.
The server MAY decrypt encrypted objects that were already in the container
before this message was received.</p>
</li><li><p><span><span>
</span></span>Otherwise, the server SHOULD:</p>
<ul><li><p><span><span> </span></span>Check
that the calling user has access to a private key that will decrypt the file;
if the user does not have access, return a nonzero value.</p>
</li><li><p><span><span> </span></span>Decrypt
the object and discard its <a href="3166cf4a-e085-47be-94c6-b69bddf274ff" data-linktype="relative-path">EFSRPC
Metadata</a>.</p>
</li></ul></li><li><p><span><span>
</span></span>Return 0 to indicate success.</p>
</li></ul></div>
@@ -0,0 +1,131 @@
<div class="content" name="MARSHALED_STREAM" uuid="053f87fb-4896-4307-8ece-f23dc8e9762d"><p> A Marshaled Stream (including the EFSRPC Metadata stream)
MUST be formatted as follows.</p><table>
<tbody><tr>
<th><p><br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>1<br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>2<br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>3<br/>0</p></th>
<th><p><br/>1</p></th>
</tr>
<tr>
<td colspan="32">Length</td>
</tr>
<tr>
<td colspan="8">0x4e</td>
<td colspan="8">0x00</td>
<td colspan="8">0x54</td>
<td colspan="8">0x00</td>
</tr>
<tr>
<td colspan="8">0x46</td>
<td colspan="8">0x00</td>
<td colspan="8">0x53</td>
<td colspan="8">0x00</td>
</tr>
<tr>
<td colspan="32">Flag</td>
</tr>
<tr>
<td colspan="32">Reserved</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
<tr>
<td colspan="32">Name Length</td>
</tr>
<tr>
<td colspan="32">Stream Name (variable)</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
<tr>
<td colspan="32">Stream Data Segment 1 (variable)</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
<tr>
<td colspan="32">Stream Data Segment n (variable)</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
</tbody></table><p><b>Length (4 bytes): </b>The length, in bytes, of
this <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_f3529cd8-50da-4f36-aa0b-66af455edbb6" data-linktype="relative-path">stream</a> header from
the start of this field to the end of the <b>Stream Name</b> field. It MUST be
a 32-bit unsigned integer in little-endian format.</p><p><b>Flag (4 bytes): </b> This MUST be a 32-bit
unsigned integer in little-endian format. It MUST be set to 0x00000000 if the
stream data is encrypted with the <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_3a58e275-3d9f-4b66-8c8d-9808cd0cd8ff" data-linktype="relative-path">FEK</a>. Otherwise, it MUST be
set to 0x00000001. It MUST always be set to zero in the case of the <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_334ff89b-b2a6-4e9c-beba-92f03e24d95b" data-linktype="relative-path">EFSRPC Metadata</a> stream, and
ignored by the server in that case.</p><dl>
<dd>
<table><thead>
<tr>
<th>
<p>Value</p>
</th>
<th>
<p>Meaning</p>
</th>
</tr>
</thead><tbody><tr>
<td>0x00000000</td>
<td>FEK encryption present</td>
</tr><tr>
<td>0x00000001</td>
<td>FEK encryption not present</td>
</tr></tbody></table>
</dd></dl><p><b>Reserved (8 bytes): </b>This field MUST be set to
zero and ignored.</p><p><b>Name Length (4 bytes): </b> The length, in bytes,
of the <b>Stream Name</b> field. It MUST be a 32-bit unsigned integer in
little-endian format. This field MUST be set to 0x00000002 for the <a href="3166cf4a-e085-47be-94c6-b69bddf274ff" data-linktype="relative-path">EFSRPC Metadata</a> stream.</p><p><b>Stream Name (variable): </b> The name of the
stream. This is set to either a null-terminated <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_c305d0ab-8b94-461a-bd76-13b40cb8c4d8" data-linktype="relative-path">Unicode</a> string in UTF-16
encoding, or an integer value stored in binary form. For the EFSRPC Metadata
stream, this is always set to 0x1910. </p><dl>
<dd>
<table><thead>
<tr>
<th>
<p>Value</p>
</th>
<th>
<p>Meaning</p>
</th>
</tr>
</thead><tbody><tr>
<td>0x1910</td>
<td>EFSRPC Metadata stream</td>
</tr></tbody></table>
</dd></dl><p><b>Stream Data Segment 1 ... n: </b>These <a href="5464320a-f822-4cf8-9fa2-a8bd11bcc4e1" data-linktype="relative-path">segments</a> MUST contain the
contents of the stream as well as some metadata for reassembling the segments.
For encrypted streams, these segments MUST also contain some metadata to aid in
decryption. They MUST be formatted as specified in section 2.2.3.2.</p></div>
@@ -0,0 +1,167 @@
<div class="content" name="CERTIFICATE_DATA" uuid="066d0c3d-182c-4730-a005-dbf8990c9fbb"><p> The Certificate Data structure MUST be formatted as follows.</p><table>
<tbody><tr>
<th><p><br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>1<br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>2<br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>3<br/>0</p></th>
<th><p><br/>1</p></th>
</tr>
<tr>
<td colspan="32">Offset to Certificate Thumbprint</td>
</tr>
<tr>
<td colspan="32">Length of Certificate Thumbprint</td>
</tr>
<tr>
<td colspan="32">Offset of Container Name</td>
</tr>
<tr>
<td colspan="32">Offset of Provider Name</td>
</tr>
<tr>
<td colspan="32">Offset of Display Name</td>
</tr>
<tr>
<td colspan="32">Data Fields (variable)</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
</tbody></table><p><b>Offset to Certificate Thumbprint (4 bytes): </b>Offset
of the <b>Certificate Thumbprint</b> field from the start of this structure. It
MUST be a 32-bit unsigned integer in little-endian format.</p><p><b>Length of Certificate Thumbprint (4 bytes): </b>The
length of the <b>Certificate Thumbprint</b> field. It MUST be a 32-bit unsigned
integer in little-endian format.</p><p><b>Offset of Container Name (4 bytes): </b>Offset of
the <b>Container Name</b> field (in bytes) from the start of this structure. It
MUST be a 32-bit unsigned integer in little-endian format. If this field is set
to zero, then the <b>Container Name</b> field MUST be absent.</p><p><b>Offset of Provider Name (4 bytes): </b>Offset of
the <b>Provider Name</b> field (in bytes) from the start of this structure. It
MUST be a 32-bit unsigned integer in little-endian format. If this field is set
to zero, the <b>Provider Name</b> field MUST be absent. If a <b>Provider Name</b>
field is present, a <b>Container Name</b> field MUST also be present.</p><p><b>Offset of Display Name (4 bytes): </b>Offset of
the <b>Display Name</b> field, (in bytes) from the start of this structure. It
MUST be a 32-bit unsigned integer in little-endian format. If this field is set
to zero, then the <b>Display Name</b> field MUST be absent.</p><p><b>Data Fields (variable): </b>This field MUST
contain the following items, in any order, and at the locations indicated by
the respective <b>Offset</b> fields previously listed. These items MUST be
completely contained inside this field and MUST NOT overlap each other. There
MUST NOT be any unused areas within this field that span more than 8 contiguous
bytes.</p><dl>
<dd>
<table>
<tbody><tr>
<th><p><br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>1<br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>2<br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>3<br/>0</p></th>
<th><p><br/>1</p></th>
</tr>
<tr>
<td colspan="32">Certificate Thumbprint (variable)</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
<tr>
<td colspan="32">Container Name (variable)</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
<tr>
<td colspan="32">Provider Name (variable)</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
<tr>
<td colspan="32">Display Name (variable)</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
</tbody></table>
</dd>
<dd>
<p><b>Certificate Thumbprint
(variable): </b>The SHA-1 hash of the DER-encoded form of the certificate. For
more information on SHA-1, see <a href="https://go.microsoft.com/fwlink/?LinkId=298918" data-linktype="external">[FIPS180-4]</a>. For more
information on DER encoding, see <a href="https://go.microsoft.com/fwlink/?LinkId=90593" data-linktype="external">[X690]</a>.</p>
</dd>
<dd>
<p><b>Container Name
(variable): </b>A null-terminated Unicode string in UTF-16 encoding that
provides a hint as to the public key container in which the key is stored. This
field MUST always be present if the <b>Provider Name</b> is present. When the <b>Container
Name</b> field is present, the <b>Offset of Container Name</b> field MUST be
nonzero; otherwise, this field is ignored by the server and does not affect
protocol behavior.</p>
</dd>
<dd>
<p><b>Provider Name (variable):
</b>A null-terminated Unicode string in UTF-16 encoding. This field MUST always
be present if the <b>Container Name</b> is present. It MUST be omitted if the <b>Offset
of Provider Name</b> field is 0; otherwise, this field is ignored by the server
and does not affect protocol behavior.</p>
</dd>
<dd>
<p><b>Display Name (variable): </b>A
null-terminated Unicode string in UTF-16 encoding that provides a hint as to
the friendly name that can be used to identify this certificate for display
purposes. This field MUST be omitted if the <b>Offset of Display Name</b> field
is 0.</p>
</dd></dl></div>
@@ -0,0 +1,11 @@
<div class="content" name="EFS_COMPATIBILITY_INFO" uuid="08ad49d7-29e4-4c50-b2c1-8c21df94f947"><p> </p><p>The EFS_COMPATIBILITY_INFO type is used to represent
information about the compatibility restrictions of an encrypted file.</p><dl>
<dd>
<div><pre> typedef struct {
   DWORD EfsVersion;
 } EFS_COMPATIBILITY_INFO;
</pre></div>
</dd></dl><p><b>EfsVersion:</b> The <b>EfsVersion</b>
associated with the EFSRPC Metadata. Valid values for the <b>EfsVersion</b>
field are described in sections <a href="625335e5-a423-4d1c-be51-c696c32aa2eb" data-linktype="relative-path">2.2.2.1</a><span>,</span> <a href="5f08e2b7-5894-46ab-a3cc-d273bdeed658" data-linktype="relative-path">2.2.2.2</a>,
and <a href="2e024178-db73-4647-9110-3c03db18743e" data-linktype="relative-path">2.2.2.3</a>.<a id="Appendix_A_Target_29"></a><a aria-label="Product behavior note 29" href="cecd911d-7105-45cc-a7c8-348335d6f03f#Appendix_A_29" data-linktype="relative-path">&lt;29&gt;</a></p></div>
@@ -0,0 +1,12 @@
<div class="content" name="EFS_RPC_BLOB" uuid="0b9b7b7e-9491-47eb-b057-c94bd0193a13"><p>The EFS_RPC_BLOB type is used to represent a generic <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_ad861812-8cb0-497a-80bb-13c95aa4e425" data-linktype="relative-path">binary large object (BLOB)</a>
(that is, an opaque data type).</p><dl>
<dd>
<div><pre> typedef struct _EFS_RPC_BLOB {
   [range(0,266240)] DWORD cbData;
   [size_is(cbData)] unsigned char* bData;
 } EFS_RPC_BLOB,
  *PEFS_RPC_BLOB;
</pre></div>
</dd></dl><p><b>cbData:</b> The length, in bytes, of
the data object in the bData field.</p><p><b>bData:</b> The contents of the data
object.<a id="Appendix_A_Target_25"></a><a aria-label="Product behavior note 25" href="cecd911d-7105-45cc-a7c8-348335d6f03f#Appendix_A_25" data-linktype="relative-path">&lt;25&gt;</a></p></div>
@@ -0,0 +1,57 @@
<div class="content" name="KEY_LIST" uuid="0e9d5482-59c7-4cd3-a439-603f9d154963"><p>The <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_1c30c0a6-5251-40d5-9641-748df0618e7c" data-linktype="relative-path">DDF</a>
and Key List structure in the <a href="625335e5-a423-4d1c-be51-c696c32aa2eb" data-linktype="relative-path">EFSRPC Metadata</a> MUST be
formatted as follows.</p><table>
<tbody><tr>
<th><p><br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>1<br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>2<br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>3<br/>0</p></th>
<th><p><br/>1</p></th>
</tr>
<tr>
<td colspan="32">Length</td>
</tr>
<tr>
<td colspan="32">Key_List_1 (variable)</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
<tr>
<td colspan="32">Key_List_n (variable)</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
</tbody></table><p><b>Length (4 bytes): </b>The number of entries in
this <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_718bfd46-3cd2-45e8-befa-55f5c9f3be7b" data-linktype="relative-path">key</a> list. It MUST
be a 32-bit unsigned integer in little-endian format.</p><p><b>Key List entries 1 ... n: </b>A number of entries
equal to the value in the <b>length of key list</b> field. The individual
entries MUST be formatted as specified in section <a href="f8c3837c-8617-4346-b188-989933705a40" data-linktype="relative-path">2.2.2.1.2</a>.</p></div>
@@ -0,0 +1,156 @@
<div class="content" name="EFSX_Datum" uuid="1d2fa232-d557-43fe-95e3-2d4ced7f7934"><p>The EFSX Datum represents the base type for every datum
within the Version 4 and Version 5 EFSRPC Metadata and MUST be formatted as
follows.</p><table>
<tbody><tr>
<th><p><br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>1<br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>2<br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>3<br/>0</p></th>
<th><p><br/>1</p></th>
</tr>
<tr>
<td colspan="16">StructureSize</td>
<td colspan="16">Role</td>
</tr>
<tr>
<td colspan="16">Type</td>
<td colspan="16">Flags</td>
</tr>
</tbody></table><p><b>StructureSize (2 bytes): </b>The size in bytes of
the EFSX Datum. It MUST be a 16-bit unsigned integer in little-endian format.</p><p><b>Role (2 bytes): </b>Specifies the EFSX Datum role.
It MUST be a 16-bit unsigned integer in little-endian format.</p><dl>
<dd>
<table><thead>
<tr>
<th>
<p>Value</p>
</th>
<th>
<p>Meaning</p>
</th>
</tr>
</thead><tbody><tr>
<td>0x0000</td>
<td>The EFSX Datum has no defined role.</td>
</tr><tr>
<td>0x0001</td>
<td>The EFSX Datum contains a reference to a user&#39;s certificate store. This reference could be, for example, a certificate hash or the public key from a certificate.</td>
</tr><tr>
<td>0x0002</td>
<td>The EFSX Datum contains data specific to a protector type. See section 2.2.2.2.5 for valid protector types and their associated protector data format.</td>
</tr><tr>
<td>0x0003</td>
<td>The EFSX Datum contains information that is suitable for user display. For example, this could be the user name associated with a protector.</td>
</tr><tr>
<td>0x0004</td>
<td>The EFSX Datum contains information that identifies a private key container.</td>
</tr><tr>
<td>0x0005</td>
<td>The EFSX Datum contains information that identifies the provider name of a CSP or KSP.</td>
</tr><tr>
<td>0x0006</td>
<td>The EFSX Datum contains a user SID.</td>
</tr><tr>
<td>0x0007</td>
<td>The EFSX Datum contains the encrypted File Master Key (FMK).</td>
</tr><tr>
<td>0x0008</td>
<td>The EFSX Datum contains a user&#39;s public key.</td>
</tr><tr>
<td>0x0009</td>
<td>The EFSX Datum contains an ephemeral public key.</td>
</tr><tr>
<td>0x000a</td>
<td>The EFSX Datum contains the encrypted File Encryption Key (FEK).</td>
</tr><tr>
<td>0x000b</td>
<td>The EFSX Datum contains the file Initialization Vector (IV).</td>
</tr><tr>
<td>0x000c</td>
<td>The EFSX Datum contains a protector descriptor string.&lt;15&gt; This datum role MUST only be used when EFS_VERSION is 5.</td>
</tr></tbody></table>
</dd></dl><p><b>Type (2 bytes): </b>Specifies the EFSX Datum type.
It MUST be a 16-bit unsigned integer in little-endian format.</p><dl>
<dd>
<table><thead>
<tr>
<th>
<p>Value</p>
</th>
<th>
<p>Meaning</p>
</th>
</tr>
</thead><tbody><tr>
<td>Reserved 0x0000</td>
<td>Reserved. Local use only.</td>
</tr><tr>
<td>EFSX_TYPE_BLOB 0x0001</td>
<td>The EFSX Datum MUST be formatted as specified in section 2.2.2.2.3.</td>
</tr><tr>
<td>EFSX_TYPE_DESCRIPTOR 0x0002</td>
<td>The EFSX Datum MUST be formatted as specified in section 2.2.2.2.4.</td>
</tr><tr>
<td>EFSX_TYPE_KEY_PROTECTOR 0x0003</td>
<td>The EFSX Datum MUST be formatted as specified in section 2.2.2.2.5.</td>
</tr><tr>
<td>EFSX_TYPE_PROTECTOR_INFO 0x0004</td>
<td>The EFSX Datum MUST be formatted as specified in section 2.2.2.2.6.</td>
</tr><tr>
<td>EFSX_TYPE_KEY_AGMT_DATA 0x0005</td>
<td>The EFSX Datum MUST be formatted as specified in section 2.2.2.2.7.</td>
</tr><tr>
<td>EFSX_TYPE_FEK_INFO 0x0006</td>
<td>The EFSX Datum MUST be formatted as specified in section 2.2.2.2.8.</td>
</tr><tr>
<td>EFSX_TYPE_DPAPI_NG_DATA 0x0007</td>
<td>The EFSX Datum MUST be formatted as specified in section 2.2.2.2.9. This type MUST only be used when EFS_VERSION is 5.&lt;16&gt;</td>
</tr></tbody></table>
</dd></dl><p><b>Flags (2 bytes): </b>Specifies datum flags. It
MUST be a 16-bit unsigned integer in little-endian format. The value of this
field MUST be zero (0x0000) or a union of one or more of the following values.</p><dl>
<dd>
<table><thead>
<tr>
<th>
<p>Value</p>
</th>
<th>
<p>Meaning</p>
</th>
</tr>
</thead><tbody><tr>
<td>0x0001</td>
<td>The EFSX Datum is nested inside a parent structure.</td>
</tr><tr>
<td>0x0002</td>
<td>The EFSX Datum is a complex datum containing nested datum structures.</td>
</tr></tbody></table>
</dd></dl><p> </p></div>
@@ -0,0 +1,10 @@
<div class="content" name="EFS_HASH_BLOB" uuid="242d857f-ac8e-4cc8-b5e4-9314a942f45e"><p>The EFS_HASH_BLOB type is used to represent an <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_2069b65d-b546-4198-abfd-768badc2258e" data-linktype="relative-path">X.509</a> <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_7a0f4b71-23ba-434f-b781-28053ed64879" data-linktype="relative-path">certificate</a> hash.</p><dl>
<dd>
<div><pre> typedef struct _EFS_HASH_BLOB {
   [range(0, 100)] DWORD cbData;
   [size_is(cbData)] unsigned char* bData;
 } EFS_HASH_BLOB;
</pre></div>
</dd></dl><p><b>cbData:</b> The number of bytes in the
bData buffer.</p><p><b>bData:</b> The SHA-1 hash of an X.509
certificate. For more information on SHA-1, see <a href="https://go.microsoft.com/fwlink/?LinkId=298918" data-linktype="external">[FIPS180-4]</a>.<a id="Appendix_A_Target_22"></a><a aria-label="Product behavior note 22" href="cecd911d-7105-45cc-a7c8-348335d6f03f#Appendix_A_22" data-linktype="relative-path">&lt;22&gt;</a></p></div>
@@ -0,0 +1,56 @@
<div class="content" name="Descriptor_Datum" uuid="2527501c-7230-4d4c-a0b3-2a1841634a86"><p> The Descriptor Datum encapsulates a Unicode string in
UTF-16 encoding. It MUST be formatted as below.</p><table>
<tbody><tr>
<th><p><br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>1<br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>2<br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>3<br/>0</p></th>
<th><p><br/>1</p></th>
</tr>
<tr>
<td colspan="32">EFSX_Datum</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
<tr>
<td colspan="32">Descriptor_Text (variable)</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
</tbody></table><p><b>EFSX_Datum (8 bytes): </b> MUST be formatted as
specified in section <a href="1d2fa232-d557-43fe-95e3-2d4ced7f7934" data-linktype="relative-path">2.2.2.2.2</a>.
The datum <b>Type</b> MUST be EFSX_TYPE_DESCRIPTOR (0x0002). The datum <b>Flags</b>
MUST NOT include 0x0002.</p><p><b>Descriptor_Text (variable): </b>Contains a
null-terminated, variable-sized Unicode string in UTF-16 encoding. The <b>Descriptor_Text</b>
MUST be entirely contained within the <b>Descriptor</b> Datum. The length of
the <b>Descriptor_Text</b> MUST be at least 2 bytes to include the null
terminator (0x0000).</p></div>
@@ -0,0 +1,13 @@
<div class="content" name="ENCRYPTION_CERTIFICATE_HASH_LIST" uuid="2718804c-6ab9-45fd-98cf-541bc3b6bc75"><p>The ENCRYPTION_CERTIFICATE_HASH_LIST type is used to
represent a set of <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_7a0f4b71-23ba-434f-b781-28053ed64879" data-linktype="relative-path">certificate</a>
hashes.</p><dl>
<dd>
<div><pre> typedef struct _ENCRYPTION_CERTIFICATE_HASH_LIST {
   [range(0,500)] DWORD nCert_Hash;
   [size_is(nCert_Hash,)] ENCRYPTION_CERTIFICATE_HASH** Users;
 } ENCRYPTION_CERTIFICATE_HASH_LIST;
</pre></div>
</dd></dl><p><b>nCert_Hash:</b> The number of
certificate hashes in the list.</p><p><b>Users:</b> A pointer to an array of
pointers to <a href="3a7e7151-edcb-4b32-a119-35cdce1584c0" data-linktype="relative-path">ENCRYPTION_CERTIFICATE_HASH</a>
(2.2.10) structures. This array is of size nCert_Hash.<a id="Appendix_A_Target_24"></a><a aria-label="Product behavior note 24" href="cecd911d-7105-45cc-a7c8-348335d6f03f#Appendix_A_24" data-linktype="relative-path">&lt;24&gt;</a></p></div>
@@ -0,0 +1,33 @@
<div class="content" name="EfsRpcRemoveUsersFromFile" uuid="28609dad-5fa5-4af9-9382-18d40e3e9dec"><p>The EfsRpcRemoveUsersFromFile method is used to revoke a user&#39;s
access to an encrypted object. This method revokes the ability of the <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_6fca10f4-e829-42ab-ad40-1566585060ca" data-linktype="relative-path">private key</a> corresponding
to a given <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_2069b65d-b546-4198-abfd-768badc2258e" data-linktype="relative-path">X.509</a> <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_7a0f4b71-23ba-434f-b781-28053ed64879" data-linktype="relative-path">certificate</a> to decrypt the
object.</p><dl>
<dd>
<div><pre> DWORD EfsRpcRemoveUsersFromFile(
  [in] handle_t binding_h,
  [in, string] wchar_t* FileName,
  [in] ENCRYPTION_CERTIFICATE_HASH_LIST* Users
 );
</pre></div>
</dd></dl><p><b>binding_h: </b>This is an <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_8a7f6700-8311-45bc-af10-82e10accd331" data-linktype="relative-path">RPC</a> <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_1cf35308-abab-4123-9cbd-99c42dc9a6ff" data-linktype="relative-path">binding</a> handle parameter,
as specified in <a href="https://go.microsoft.com/fwlink/?LinkId=89824" data-linktype="external">[C706]</a>
and <a href="../ms-rpce/290c38b1-92fe-4229-91e6-4fc376610c15" data-linktype="relative-path">[MS-RPCE]</a>
section <a href="../ms-rpce/a01f5886-c485-4bcf-bb23-e0d755510ab7" data-linktype="relative-path">2</a>.</p><p><b>FileName: </b>An EFSRPC identifier as specified in
section <a href="9db7433f-be13-4605-993f-3695a2d2916e" data-linktype="relative-path">2.2.1</a>.</p><p><b>Users: </b>A list of certificate hashes,
represented by an <a href="2718804c-6ab9-45fd-98cf-541bc3b6bc75" data-linktype="relative-path">ENCRYPTION_CERTIFICATE_HASH_LIST</a>
structure, whose access is to be removed.</p><p><b>Return Values: </b>The server MUST return 0 if it
successfully processes the message received from the client. The server MUST
return a nonzero value if processing fails.</p><dl>
<dd>
<p>If no object exists on the server with the specified
name, or if the object exists and is not encrypted, the server MUST return a
nonzero value. The server SHOULD verify that the calling user is authorized to
access the object, SHOULD verify that the calling user possesses a private <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_718bfd46-3cd2-45e8-befa-55f5c9f3be7b" data-linktype="relative-path">key</a> corresponding to a user
certificate present in the <a href="3166cf4a-e085-47be-94c6-b69bddf274ff" data-linktype="relative-path">EFSRPC
Metadata</a> for the object, and MUST return a nonzero value if this
verification fails. If the calling user is authorized to access the object and
the set of user certificates on the object contains only one entry, the server
MUST return a nonzero value.</p>
</dd></dl><p>If none of the preceding errors occur, the server MUST
remove the parts of the object&#39;s EFSRPC Metadata that refer to the user
certificates listed in the Users structure.</p></div>
@@ -0,0 +1,23 @@
<div class="content" name="EfsRpcSetEncryptedFileMetadata" uuid="38a5a7d3-4d47-4075-b830-b657805f2e94"><p>On receiving the EfsRpcSetEncryptedFileMetadata method call,
an EFSRPC server SHOULD ignore the input parameters and return a nonzero value.
The server MAY choose to act on this method in an implementation-specific
manner.<a id="Appendix_A_Target_58"></a><a aria-label="Product behavior note 58" href="cecd911d-7105-45cc-a7c8-348335d6f03f#Appendix_A_58" data-linktype="relative-path">&lt;58&gt;</a></p><dl>
<dd>
<div><pre> DWORD EfsRpcSetEncryptedFileMetadata(
  [in] handle_t binding_h,
  [in, string, ref] wchar_t* FileName,
  [in, unique] EFS_RPC_BLOB* OldEfsStreamBlob,
  [in, ref] EFS_RPC_BLOB* NewEfsStreamBlob,
  [in, unique] ENCRYPTED_FILE_METADATA_SIGNATURE* NewEfsSignature
 );
</pre></div>
</dd></dl><p><b>binding_h: </b>This is an <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_8a7f6700-8311-45bc-af10-82e10accd331" data-linktype="relative-path">RPC</a> <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_1cf35308-abab-4123-9cbd-99c42dc9a6ff" data-linktype="relative-path">binding</a> handle parameter,
as specified in <a href="https://go.microsoft.com/fwlink/?LinkId=89824" data-linktype="external">[C706]</a>
and <a href="../ms-rpce/290c38b1-92fe-4229-91e6-4fc376610c15" data-linktype="relative-path">[MS-RPCE]</a>
section <a href="../ms-rpce/a01f5886-c485-4bcf-bb23-e0d755510ab7" data-linktype="relative-path">2</a>.</p><p><b>FileName: </b>An EFSRPC identifier as specified in
section <a href="9db7433f-be13-4605-993f-3695a2d2916e" data-linktype="relative-path">2.2.1</a>.</p><p><b>OldEfsStreamBlob: </b>This parameter SHOULD be set
to NULL by the client and ignored by the server.<a id="Appendix_A_Target_59"></a><a aria-label="Product behavior note 59" href="cecd911d-7105-45cc-a7c8-348335d6f03f#Appendix_A_59" data-linktype="relative-path">&lt;59&gt;</a></p><p><b>NewEfsStreamBlob: </b>This parameter SHOULD be set
to a zero-length <a href="0b9b7b7e-9491-47eb-b057-c94bd0193a13" data-linktype="relative-path">EFS_RPC_BLOB</a>
by the client and ignored by the server.<a id="Appendix_A_Target_60"></a><a aria-label="Product behavior note 60" href="cecd911d-7105-45cc-a7c8-348335d6f03f#Appendix_A_60" data-linktype="relative-path">&lt;60&gt;</a></p><p><b>NewEfsSignature: </b> This parameter SHOULD be set
to NULL by the client and ignored by the server.<a id="Appendix_A_Target_61"></a><a aria-label="Product behavior note 61" href="cecd911d-7105-45cc-a7c8-348335d6f03f#Appendix_A_61" data-linktype="relative-path">&lt;61&gt;</a></p><p><b>Return Values: </b>The server SHOULD return a
nonzero value.<a id="Appendix_A_Target_62"></a><a aria-label="Product behavior note 62" href="cecd911d-7105-45cc-a7c8-348335d6f03f#Appendix_A_62" data-linktype="relative-path">&lt;62&gt;</a></p></div>
@@ -0,0 +1,21 @@
<div class="content" name="ENCRYPTION_CERTIFICATE_HASH" uuid="3a7e7151-edcb-4b32-a119-35cdce1584c0"><p>The ENCRYPTION_CERTIFICATE_HASH type is used to represent a
single <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_7a0f4b71-23ba-434f-b781-28053ed64879" data-linktype="relative-path">certificate</a> hash.
For more information on certificates, see <a href="https://go.microsoft.com/fwlink/?LinkId=90590" data-linktype="external">[X509]</a>.</p><dl>
<dd>
<div><pre> typedef struct _ENCRYPTION_CERTIFICATE_HASH {
   DWORD cbTotalLength;
   RPC_SID* UserSid;
   EFS_HASH_BLOB* Hash;
   [string] wchar_t* lpDisplayInformation;
 } ENCRYPTION_CERTIFICATE_HASH;
</pre></div>
</dd></dl><p><b>cbTotalLength:</b> The length, in
bytes, of the structure. </p><p><b>UserSid:</b> The <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_83f2020d-0804-4840-a5ac-e06439d50f8d" data-linktype="relative-path">SID</a> of the user who owns
the certificate. This is intended only as a hint. It MAY be set to zero if no
such hint is available. The structure of an RPC SID is specified in <a href="../ms-dtyp/cca27429-5689-4a16-b2b4-9325d93e4ba2" data-linktype="relative-path">[MS-DTYP]</a>,
section <a href="../ms-dtyp/5cb97814-a1c2-4215-b7dc-76d1f4bfad01" data-linktype="relative-path">2.4.2.3</a>.</p><p><b>Hash:</b> A pointer to an <a href="242d857f-ac8e-4cc8-b5e4-9314a942f45e" data-linktype="relative-path">EFS_HASH_BLOB</a> (2.2.7)
structure. </p><p><b>lpDisplayInformation:</b> A string that
contains the subject or principal name of the account the certification is
assigned to. The subject name and the principal name can be the same. This is
only intended as a hint for display purposes, and is implementation-dependent.
This field MAY be set to NULL if no such information is available.</p></div>
@@ -0,0 +1,28 @@
<div class="content" name="EfsRpcNotSupported" uuid="473813b6-8290-430c-8124-3ee31c7c9ec5"><p>On receiving the EfsRpcNotSupported method call, an EFSRPC
server SHOULD implement the EfsRpcNotSupported method as specified in this
section and return a nonzero value. However, a server MAY<a id="Appendix_A_Target_44"></a><a aria-label="Product behavior note 44" href="cecd911d-7105-45cc-a7c8-348335d6f03f#Appendix_A_44" data-linktype="relative-path">&lt;44&gt;</a> choose to interpret and respond
to the arguments as specified in section <a href="b39ec3e2-d3f0-4934-925e-74032365f9d2" data-linktype="relative-path">3.1.4.2.13</a>.</p><dl>
<dd>
<div><pre> DWORD EfsRpcNotSupported(
  [in] handle_t binding_h,
  [in, string] wchar_t* Reserved1,
  [in, string] wchar_t* Reserved2,
  [in] DWORD dwReserved1,
  [in] DWORD dwReserved2,
  [in, unique] EFS_RPC_BLOB* Reserved,
  [in] BOOL bReserved
 );
</pre></div>
</dd></dl><p><b>binding_h: </b>This is an <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_8a7f6700-8311-45bc-af10-82e10accd331" data-linktype="relative-path">RPC</a> <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_1cf35308-abab-4123-9cbd-99c42dc9a6ff" data-linktype="relative-path">binding</a> handle parameter,
as specified, in <a href="https://go.microsoft.com/fwlink/?LinkId=89824" data-linktype="external">[C706]</a>
and in <a href="../ms-rpce/290c38b1-92fe-4229-91e6-4fc376610c15" data-linktype="relative-path">[MS-RPCE]</a>
section <a href="../ms-rpce/a01f5886-c485-4bcf-bb23-e0d755510ab7" data-linktype="relative-path">2</a>.
</p><p><b>Reserved1: </b>This parameter is not used. It MUST
be set to an empty string by the client and ignored by the server.</p><p><b>Reserved2: </b>This parameter is not used. It MUST
be set to an empty string by the client and ignored by the server.</p><p><b>dwReserved1: </b>This parameter is not used. It
MUST be set to zero by the client and ignored by the server.</p><p><b>dwReserved2: </b>This parameter is not used. It
MUST be set to zero by the client and ignored by the server.</p><p><b>Reserved: </b>This parameter is not used. It MUST
be set to NULL by the client and ignored by the server.</p><p><b>bReserved: </b>This parameter is not used. It MUST
be set to FALSE by the client and ignored by the server.</p><p><b>Return Values: </b>The EFSRPC server SHOULD return
a nonzero value. However, the server MAY<a id="Appendix_A_Target_45"></a><a aria-label="Product behavior note 45" href="cecd911d-7105-45cc-a7c8-348335d6f03f#Appendix_A_45" data-linktype="relative-path">&lt;45&gt;</a> process
this as described in section 3.1.4.2.13.</p></div>
@@ -0,0 +1,106 @@
<div class="content" name="Overview (synopsis)" uuid="4892c610-4595-4fba-a67f-a2d26b9b6dcd"><p>The Encrypting File System Remote Protocol (hereafter
referred to as EFSRPC) is a <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_8a7f6700-8311-45bc-af10-82e10accd331" data-linktype="relative-path">Remote
Procedure Call (RPC)</a> interface that is used to manage data objects stored
in an encrypted form. The objective of encrypting data in this fashion is to
enforce access control policies and to provide confidentiality from
unauthorized users.</p><p>EFSRPC is implemented in Windows to provide remote
management for <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_a04c146a-de3b-4e4b-829f-a9e772f3fe25" data-linktype="relative-path">files</a>
encrypted by the <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_3bd30c20-9517-4030-a48c-380362e209a1" data-linktype="relative-path">Encrypting
File System (EFS)</a>. EFS is the ability of the <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_402152c6-0a56-4c6c-be8a-a74cd413318d" data-linktype="relative-path">New Technology File System
(NTFS)</a> file system to encrypt files on disk in a manner that is transparent
to the user. For more information on EFS, see <a href="https://go.microsoft.com/fwlink/?LinkId=90185" data-linktype="external">[MSFT-EFS]</a>. For more
information about <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_86f79a17-c0be-4937-8660-0cf6ce5ddc1a" data-linktype="relative-path">NTFS</a>,
see <a href="https://go.microsoft.com/fwlink/?LinkId=90200" data-linktype="external">[MSFT-NTFS]</a>.</p><p>EFSRPC does not address how data is encrypted, how the
encrypted data is stored, or how it is accessed for routine operations such as
reading, writing, creating, and deleting. All these actions are specific to the
server implementation. On Windows, NTFS provides the storage mechanism (the
file is the unit of storage) and the Server Message Block (SMB) Protocol
provides remote access to such files. For more information about <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_09dbec39-5e75-4d9a-babf-1c9f1d499625" data-linktype="relative-path">SMB</a>, see <a href="../ms-smb/f210069c-7086-4dc2-885e-861d837df688" data-linktype="relative-path">[MS-SMB]</a>
and <a href="../ms-smb2/5606ad47-5ee0-437a-817e-70c366052962" data-linktype="relative-path">[MS-SMB2]</a>.</p><p>EFSRPC models the underlying data encryption architecture
using two basic constructs:</p><ul><li><p><span><span>
</span></span>A set of data objects, each of which is encrypted independently and
can be managed independently.</p>
</li><li><p><span><span>
</span></span>A set of access control subjects, each of which is represented by
a key pair generated by a <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_4cf96ca0-e3a9-4165-8d1a-a21b1397007a" data-linktype="relative-path">public
key</a> cryptographic algorithm. The public key of this key pair is embedded in
a <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_7a0f4b71-23ba-434f-b781-28053ed64879" data-linktype="relative-path">certificate</a> and can be
widely distributed in that form. The corresponding <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_6fca10f4-e829-42ab-ad40-1566585060ca" data-linktype="relative-path">private key</a> is held solely
by the user or users who represent that subject. Thus, a given access control
subject can correspond to one or more users, and a given user can possess the
private keys for zero or more access control subjects. Access control subjects
are further divided into two types:</p>
<ul><li><p><span><span> </span></span>Unprivileged
user subjects, which are used for routine data access by ordinary users of the
system. For convenience, this specification refers to such subjects as user
certificate.</p>
</li><li><p><span><span> </span></span><a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_c2d1bb54-31a8-4918-a163-39a7851c347a" data-linktype="relative-path">Data Recovery Agents (DRAs)</a>,
which are controlled by system administrators. The storage system ensures that
all active DRAs for the system are automatically authorized to access all
encrypted objects on the system. If an unprivileged user loses the private key,
an administrator can use a DRA&#39;s private key to recover the contents of
encrypted objects.</p>
</li></ul></li></ul><p>EFSRPC also assumes that each encrypted object is associated
with some security-related metadata, which contains information required for
authorized users and DRAs to access the <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_787ee6a8-5f01-4526-828a-d1b3de39c21a" data-linktype="relative-path">plaintext</a> of the object.
This specification refers to this security-related metadata as the <a href="3166cf4a-e085-47be-94c6-b69bddf274ff" data-linktype="relative-path">EFSRPC Metadata</a>.</p><p>EFSRPC does not specify how data is encrypted, stored, or
accessed. It is possible to build a compliant EFSRPC implementation that uses a
mechanism, such as <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_9f92aa05-dd0a-45f2-88d6-89f1fb654395" data-linktype="relative-path">access
control lists (ACLs)</a>, instead of encryption to control access to data
objects. For the purposes of this specification, the term encrypted is used to
indicate that a data object and its metadata can be successfully manipulated
through the EFSRPC methods, with the exception of the <a href="0d599976-758c-4dbd-ac8c-c9db2a922d76" data-linktype="relative-path">EfsRpcEncryptFileSrv</a>
method, which converts data objects from an unencrypted state to an encrypted
state.</p><p>Within the preceding model, EFSRPC provides various
categories of management routines. The syntax of the individual methods and
rules for how these methods are processed on the server are specified in
section <a href="403c7ae0-1a3a-4e96-8efc-54e79a2cc451" data-linktype="relative-path">3.1.4.2</a>. The
categories of management routines that EFSRPC provides are as follows:</p><ul><li><p><span><span>
</span></span>Requesting the server to convert objects from encrypted state to
unencrypted state and vice versa.</p>
<ul><li><p><span><span> </span></span>EfsRpcEncryptFileSrv (section 3.1.4.2.5)</p>
</li><li><p><span><span> </span></span><a href="043715de-caee-402a-a61b-921743337e78" data-linktype="relative-path">EfsRpcDecryptFileSrv (section 3.1.4.2.6)</a></p>
</li></ul></li><li><p><span><span>
</span></span>Creating, querying, and manipulating the EFSRPC Metadata. Clients
use the following methods to query and change which user certificates can be
used to decrypt an encrypted object. The set of user certificates with access
to an object needs to be changed when the set of users with access to the
object changes or when a user with access to the object changes the user
certificate. The following methods can also be used to copy the access rights
from one object to another; the <a href="b39ec3e2-d3f0-4934-925e-74032365f9d2" data-linktype="relative-path">EfsRpcDuplicateEncryptionInfoFile</a>
method is particularly well-suited for this purpose. Methods:</p>
<ul><li><p><span><span> </span></span><a href="a058dc6c-bb7e-491c-9143-a5cb1f7e7cea" data-linktype="relative-path">EfsRpcQueryUsersOnFile (section 3.1.4.2.7)</a></p>
</li><li><p><span><span> </span></span><a href="cf759c00-1b90-4c33-9ace-f51c20149cea" data-linktype="relative-path">EfsRpcQueryRecoveryAgents (section 3.1.4.2.8)</a></p>
</li><li><p><span><span> </span></span><a href="28609dad-5fa5-4af9-9382-18d40e3e9dec" data-linktype="relative-path">EfsRpcRemoveUsersFromFile (section 3.1.4.2.9)</a></p>
</li><li><p><span><span> </span></span><a href="afd56d24-3732-4477-b5cf-44cc33848d85" data-linktype="relative-path">EfsRpcAddUsersToFile (section 3.1.4.2.10)</a></p>
</li><li><p><span><span> </span></span><a href="6813bfa8-1538-4c5f-982a-ad58caff3c1c" data-linktype="relative-path">EfsRpcFileKeyInfo (section 3.1.4.2.12)</a></p>
</li><li><p><span><span> </span></span>EfsRpcDuplicateEncryptionInfoFile (section 3.1.4.2.13)</p>
</li><li><p><span><span> </span></span><a href="d36df703-edc9-4482-87b7-d05c7783d65e" data-linktype="relative-path">EfsRpcAddUsersToFileEx (section 3.1.4.2.14)</a></p>
</li><li><p><span><span> </span></span><a href="d0da10ab-3139-4d67-a66c-ea6eb497118d" data-linktype="relative-path">EfsRpcFileKeyInfoEx (section 3.1.4.2.15)</a></p>
</li><li><p><span><span> </span></span><a href="5cb4e26d-5632-4048-8b2d-f661f8e8ee6b" data-linktype="relative-path">EfsRpcGetEncryptedFileMetadata (section 3.1.4.2.16)</a></p>
</li><li><p><span><span> </span></span><a href="38a5a7d3-4d47-4075-b830-b657805f2e94" data-linktype="relative-path">EfsRpcSetEncryptedFileMetadata (section 3.1.4.2.17)</a></p>
</li></ul></li><li><p><span><span>
</span></span>Performing backup of encrypted objects in ciphertext form along
with their EFSRPC Metadata, and restoring encrypted objects from such backups. Depending
on the implementation of these methods, the backups that are created can expose
the implementation-specific EFSRPC Metadata format to the client. The Windows
implementation of these methods exposes the Windows EFSRPC Metadata format;
however, Windows applications do not manipulate this information. The following
methods are suitable for secure content archival or transferring encrypted data
securely between servers of the same implementation because they do not require
decrypting the data. Methods:</p>
<ul><li><p><span><span> </span></span><a href="ccc4fb75-1c86-41d7-bbc4-b278ec13bfb8" data-linktype="relative-path">EfsRpcOpenFileRaw (section 3.1.4.2.1)</a></p>
</li><li><p><span><span> </span></span><a href="a3a6d95f-ebd5-4a08-9d19-6b6c1b7d41f6" data-linktype="relative-path">EfsRpcReadFileRaw (section 3.1.4.2.2)</a></p>
</li><li><p><span><span> </span></span><a href="b4fa10e8-31bb-4dd4-87af-1c4a3dedf417" data-linktype="relative-path">EfsRpcWriteFileRaw (section 3.1.4.2.3)</a></p>
</li><li><p><span><span> </span></span><a href="c5da8aa7-fe38-4940-8d40-2cebbd887cba" data-linktype="relative-path">EfsRpcCloseRaw (section 3.1.4.2.4)</a></p>
</li></ul></li><li><p><span><span>
</span></span>Controlling the server&#39;s encryption subsystem. Methods:</p>
<ul><li><p><span><span> </span></span><a href="a7e37233-b684-4c3f-905b-81c2e04482f1" data-linktype="relative-path">EfsRpcFlushEfsCache (section 3.1.4.2.18)</a></p>
</li></ul></li></ul><p>Most of the EFSRPC routines are stateless and can be called
in any order. When one of these routines is called, the message exchange is as
follows.</p><p><img id="MS-EFSR_pict5ea2186e-5734-5873-8745-bc58e7c9e00a.png" src="ms-efsr_files/image001.png" alt="Message exchange for stateless routines" title="Message exchange for stateless routines" data-linktype="relative-path"/></p><p><b>Figure 1: Message exchange for stateless routines</b></p><p>There are two routines in EFSRPC that are an exception to
the stateless nature of the protocol. Several methods, collectively known as
the EFSRPC raw methods, are an exception and need to be called in a specific
order. This includes the EfsRpcOpenFileRaw, EfsRpcReadFileRaw,
EfsRpcWriteFileRaw, and EfsRpcCloseRaw methods. The following two sequences are
permissible.</p><p><img id="MS-EFSR_pict6ccfefc2-aa97-e96e-aed7-bd121ca89234.png" src="ms-efsr_files/image002.png" alt="Message sequence for opening a file" title="Message sequence for opening a file" data-linktype="relative-path"/></p><p><b>Figure 2: Message sequence for opening a file</b></p><p><img id="MS-EFSR_pict92d1a417-f9c2-153a-a700-4f790cbc0b23.png" src="ms-efsr_files/image003.png" alt="Message sequence for importing a file" title="Message sequence for importing a file" data-linktype="relative-path"/></p><p><b>Figure 3: Message sequence for importing a file</b></p></div>
@@ -0,0 +1,19 @@
<div class="content" name="EFS_KEY_INFO" uuid="49a8335f-3136-4059-9deb-9574d5ed5c86"><p>The EFS_KEY_INFO type is used to represent information about
a <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_718bfd46-3cd2-45e8-befa-55f5c9f3be7b" data-linktype="relative-path">key</a> of a symmetric
cryptosystem.</p><dl>
<dd>
<div><pre> typedef struct {
   DWORD dwVersion;
   unsigned long Entropy;
   ALG_ID Algorithm;
   unsigned long KeyLength;
 } EFS_KEY_INFO;
</pre></div>
</dd></dl><p><b>dwVersion:</b> The version of this data
structure. It MUST be equal to 0x00000001.</p><p><b>Entropy:</b> The actual number of bits
of entropy or true randomness in the key. This value, divided by 8, MUST be
less than or equal to the value of the <b>KeyLength</b> member.</p><p><b>Algorithm:</b> The cryptographic
algorithm with which the key is intended to be used.</p><p><b>KeyLength:</b> The total length, in
bytes, of the key. This value, multiplied by 8, MUST be greater than or equal
to the value of the <b>Entropy</b> member. Valid combinations of Entropy,
Algorithm, and KeyLength are specified in section <a href="4cc8e6ae-99aa-483e-99c1-ab4c0ee46294" data-linktype="relative-path">2.2.13</a>.</p></div>
@@ -0,0 +1,54 @@
<div class="content" name="Protector_Info_Datum" uuid="4aae68f5-a2c0-4c6f-90fd-a268d52ef5f3"><p> The Protector Info Datum encapsulates information
describing the origin of a protector. It MUST be formatted as below.</p><table>
<tbody><tr>
<th><p><br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>1<br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>2<br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>3<br/>0</p></th>
<th><p><br/>1</p></th>
</tr>
<tr>
<td colspan="32">EFSX_Datum</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
<tr>
<td colspan="32">Data_Fields (variable)</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
</tbody></table><p><b>EFSX_Datum (8 bytes): </b>MUST be formatted as
specified in section <a href="1d2fa232-d557-43fe-95e3-2d4ced7f7934" data-linktype="relative-path">2.2.2.2.2</a>.
The datum <b>Type</b> MUST be EFSX_TYPE_PROTECTOR_INFO (0x0004). The datum <b>Flags</b>
SHOULD include 0x0002 indicating a complex datum.</p><p><b>Data_Fields (variable): </b>This field contains
any number of nested EFSX_Datum structures. The nested datum structures MUST
NOT overlap, and MUST be entirely contained within the protector info datum.</p></div>
@@ -0,0 +1,43 @@
<div class="content" name="ENCRYPTED_FILE_METADATA_SIGNATURE" uuid="4c2748b2-7e16-4e9f-9bac-311902d2c0cb"><p>The ENCRYPTED_FILE_METADATA_SIGNATURE structure is used by
the client to prove to the server that it possesses a <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_6fca10f4-e829-42ab-ad40-1566585060ca" data-linktype="relative-path">private key</a> that is
authorized to decrypt a given object.</p><dl>
<dd>
<div><pre> typedef struct _ENCRYPTED_FILE_METADATA_SIGNATURE {
   DWORD dwEfsAccessType;
   ENCRYPTION_CERTIFICATE_HASH_LIST* CertificatesAdded;
   ENCRYPTION_CERTIFICATE* EncryptionCertificate;
   EFS_RPC_BLOB* EfsStreamSignature;
 } ENCRYPTED_FILE_METADATA_SIGNATURE;
</pre></div>
</dd></dl><p><b>dwEfsAccessType:</b> The operation
being performed. It MUST be set to one of the following values.</p><dl>
<dd>
<table><thead>
<tr>
<th>
<p>Value</p>
</th>
<th>
<p>Meaning</p>
</th>
</tr>
</thead><tbody><tr>
<td>EFS_METADATA_ADD_USER 0x00000001</td>
<td>One or more additional user certificates are being granted access to the object.</td>
</tr><tr>
<td>EFS_METADATA_REMOVE_USER 0x00000002</td>
<td>One or more user certificates are having their access to the object revoked.</td>
</tr><tr>
<td>EFS_METADATA_REPLACE_USER 0x00000004</td>
<td>One or more user certificates with access to the object are being replaced.</td>
</tr><tr>
<td>EFS_METADATA_GENERAL_OP 0x00000008</td>
<td>A change is being made to the metadata that is not fully described by exactly one of the previous options.</td>
</tr></tbody></table>
</dd></dl><p><b>CertificatesAdded:</b> The <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_2069b65d-b546-4198-abfd-768badc2258e" data-linktype="relative-path">X.509</a> certificates whose
corresponding private keys are to be granted or denied the ability to decrypt
the object.</p><p><b>EncryptionCertificate:</b> The X.509
certificates whose corresponding private key the caller claims to possess.</p><p><b>EfsStreamSignature:</b> The signature
obtained by signing the SHA-1 hash of the new <a href="3166cf4a-e085-47be-94c6-b69bddf274ff" data-linktype="relative-path">EFSRPC Metadata</a> with the
private <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_3f85a24a-f32a-4322-9e99-eba6ae802cd6" data-linktype="relative-path">RSA</a> key
corresponding to EncryptionCertificate.</p></div>
@@ -0,0 +1,80 @@
<div class="content" name="STREAM_DATA_SEGMENT" uuid="5464320a-f822-4cf8-9fa2-a8bd11bcc4e1"><p> Each stream data segment MUST be formatted as follows.</p><table>
<tbody><tr>
<th><p><br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>1<br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>2<br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>3<br/>0</p></th>
<th><p><br/>1</p></th>
</tr>
<tr>
<td colspan="32">Length</td>
</tr>
<tr>
<td colspan="8">0x47</td>
<td colspan="8">0x00</td>
<td colspan="8">0x55</td>
<td colspan="8">0x00</td>
</tr>
<tr>
<td colspan="8">0x52</td>
<td colspan="8">0x00</td>
<td colspan="8">0x45</td>
<td colspan="8">0x00</td>
</tr>
<tr>
<td colspan="32">Reserved</td>
</tr>
<tr>
<td colspan="32">Data Segment Encryption Header (variable)</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
<tr>
<td colspan="32">Stream Data (variable)</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
</tbody></table><p><b>Length (4 bytes): </b>The length, in bytes, of
this segment. It MUST be a 32-bit unsigned integer in little-endian format. The
length MUST be measured from the start of this field to the end of the <b>Stream
Data</b> field.</p><p><b>Reserved (4 bytes): </b>This field is set to zero
and is ignored by the server.</p><p><b>Data Segment Encryption Header (variable): </b>This
header MUST be present only if the <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_f3529cd8-50da-4f36-aa0b-66af455edbb6" data-linktype="relative-path">stream</a> is encrypted (that
is, if the <b>Flag</b> field in the stream header is set to zero and this is
not the EFSRPC Metadata stream). It MUST be formatted as specified in section <a href="a38459f2-40e9-418d-866c-d33789886a91" data-linktype="relative-path">2.2.3.3</a>.</p><p><b>Stream Data (variable): </b>This field MUST
contain part or all of the stream data. If the <b>Data Segment Encryption
Header</b> field is present, <b>Stream Data</b> MUST be consistent with it. <b>Stream
Data</b> MUST consist of contiguous bytes taken from the stream except for zero
bytes that are omitted in accordance with the Data Segment Encryption Header.
If the stream is encrypted, its data MUST be encrypted with the <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_3a58e275-3d9f-4b66-8c8d-9808cd0cd8ff" data-linktype="relative-path">FEK</a>, using the algorithm
indicated by the <b>Algorithm</b> field in the <a href="3166cf4a-e085-47be-94c6-b69bddf274ff" data-linktype="relative-path">EFSRPC Metadata</a> (specified
in section 2.2.2) in the Cipher Block Chaining (CBC) mode.</p></div>
@@ -0,0 +1,18 @@
<div class="content" name="EfsRpcGetEncryptedFileMetadata" uuid="5cb4e26d-5632-4048-8b2d-f661f8e8ee6b"><p>On receiving the EfsRpcGetEncryptedFileMetadata method call,
an EFSRPC server SHOULD ignore the input parameters and return a nonzero value.
The server MAY choose to act on this method in an implementation-specific
manner.<a id="Appendix_A_Target_55"></a><a aria-label="Product behavior note 55" href="cecd911d-7105-45cc-a7c8-348335d6f03f#Appendix_A_55" data-linktype="relative-path">&lt;55&gt;</a></p><dl>
<dd>
<div><pre> DWORD EfsRpcGetEncryptedFileMetadata(
  [in] handle_t binding_h,
  [in, string, ref] wchar_t* FileName,
  [out, ref] EFS_RPC_BLOB** EfsStreamBlob
 );
</pre></div>
</dd></dl><p><b>binding_h: </b>This is an <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_8a7f6700-8311-45bc-af10-82e10accd331" data-linktype="relative-path">RPC</a> <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_1cf35308-abab-4123-9cbd-99c42dc9a6ff" data-linktype="relative-path">binding</a> handle parameter,
as specified in <a href="https://go.microsoft.com/fwlink/?LinkId=89824" data-linktype="external">[C706]</a>
and <a href="../ms-rpce/290c38b1-92fe-4229-91e6-4fc376610c15" data-linktype="relative-path">[MS-RPCE]</a>
section <a href="../ms-rpce/a01f5886-c485-4bcf-bb23-e0d755510ab7" data-linktype="relative-path">2</a>.</p><p><b>FileName: </b>An EFSRPC identifier, as specified
in section <a href="9db7433f-be13-4605-993f-3695a2d2916e" data-linktype="relative-path">2.2.1</a>.</p><p><b>EfsStreamBlob: </b>The server SHOULD ignore this
parameter.<a id="Appendix_A_Target_56"></a><a aria-label="Product behavior note 56" href="cecd911d-7105-45cc-a7c8-348335d6f03f#Appendix_A_56" data-linktype="relative-path">&lt;56&gt;</a></p><p><b>Return Values: </b>The server SHOULD return a
nonzero value.<a id="Appendix_A_Target_57"></a><a aria-label="Product behavior note 57" href="cecd911d-7105-45cc-a7c8-348335d6f03f#Appendix_A_57" data-linktype="relative-path">&lt;57&gt;</a></p></div>
@@ -0,0 +1,219 @@
<div class="content" name="EFSRPC_METADATA_V1" uuid="625335e5-a423-4d1c-be51-c696c32aa2eb"><table>
<tbody><tr>
<th><p><br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>1<br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>2<br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>3<br/>0</p></th>
<th><p><br/>1</p></th>
</tr>
<tr>
<td colspan="32">Length</td>
</tr>
<tr>
<td colspan="32">Reserved1</td>
</tr>
<tr>
<td colspan="32">EFS_Version</td>
</tr>
<tr>
<td colspan="32">Reserved2</td>
</tr>
<tr>
<td colspan="32">EFS_ID (16 bytes)</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
<tr>
<td colspan="32">EFS_Hash (16 bytes)</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
<tr>
<td colspan="32">Reserved3 (16 bytes)</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
<tr>
<td colspan="32">DDF_Offset</td>
</tr>
<tr>
<td colspan="32">DRF_Offset</td>
</tr>
<tr>
<td colspan="32">Reserved4</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
<tr>
<td colspan="32">Data_Fields (variable)</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
</tbody></table><p><b>Length (4 bytes): </b>This field MUST contain a 32-bit
unsigned integer equal to the length, in bytes, of the <a href="3166cf4a-e085-47be-94c6-b69bddf274ff" data-linktype="relative-path">EFSRPC Metadata</a>.<a id="Appendix_A_Target_7"></a><a aria-label="Product behavior note 7" href="cecd911d-7105-45cc-a7c8-348335d6f03f#Appendix_A_7" data-linktype="relative-path">&lt;7&gt;</a></p><p><b>Reserved1 (4 bytes): </b>MUST be set to zero and
ignored upon receipt.</p><p><b>EFS_Version (4 bytes): </b>This field represents
the highest <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_3bd30c20-9517-4030-a48c-380362e209a1" data-linktype="relative-path">EFS</a> version
supported by the implementation that created this metadata. It MUST be a 32-bit
unsigned integer in little-endian format. It MUST be set to one of the
following values.</p><dl>
<dd>
<table><thead>
<tr>
<th>
<p>Value</p>
</th>
<th>
<p>Meaning</p>
</th>
</tr>
</thead><tbody><tr>
<td>Version_1 0x00000001</td>
<td>The file encryption key (FEK) will be a DESX key, and encrypted with RSA only. The Flags field in all key list entries will be zero.</td>
</tr><tr>
<td>Version_2 0x00000002</td>
<td>The FEK will use DESX, 3DES, or AES-256. The FEK will be encrypted with RSA only. The Flags field in all key list entries will be zero.</td>
</tr><tr>
<td>Version_3 0x00000003</td>
<td>The FEK will use DESX, 3DES, or AES-256. The FEK will be encrypted with either RSA or AES-256.</td>
</tr></tbody></table>
</dd></dl><p>A server that supports a given version number MUST also
support all lower numbered versions. A server SHOULD support all versions
listed.<a id="Appendix_A_Target_8"></a><a aria-label="Product behavior note 8" href="cecd911d-7105-45cc-a7c8-348335d6f03f#Appendix_A_8" data-linktype="relative-path">&lt;8&gt;</a></p><p><b>Reserved2 (4 bytes): </b>MUST be set to zero and
ignored upon receipt.</p><p><b>EFS_ID (16 bytes): </b>A 16-byte <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_f49694cc-c350-462d-ab8e-816f0103c6c1" data-linktype="relative-path">GUID</a> value that MUST be
unique for the computer that created this metadata.</p><p><b>EFS_Hash (16 bytes): </b>This field SHOULD be set
to zero and ignored by the server.<a id="Appendix_A_Target_9"></a><a aria-label="Product behavior note 9" href="cecd911d-7105-45cc-a7c8-348335d6f03f#Appendix_A_9" data-linktype="relative-path">&lt;9&gt;</a></p><p><b>Reserved3 (16 bytes): </b>MUST be set to zero and
ignored upon receipt.</p><p><b>DDF_Offset (4 bytes): </b> This field MUST contain
the offset, in bytes, of the <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_1c30c0a6-5251-40d5-9641-748df0618e7c" data-linktype="relative-path">data
decryption field (DDF)</a> key list from the start of the EFSRPC Metadata. It
MUST be a 32-bit unsigned integer in little-endian format. The DDF key list
lies completely within the <b>Data Fields</b> and does not overlap the <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_60e31963-34c7-4df0-a133-2ccd656bf425" data-linktype="relative-path">data recovery field (DRF)</a>
key list (if present).</p><p><b>DRF_Offset (4 bytes): </b>This field MUST contain
the offset, in bytes, of the DRF key list from the start of the EFSRPC
Metadata. It MUST be a 32-bit unsigned integer in little-endian format. A zero
value in this field indicates that the DRF key list is absent and no <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_c2d1bb54-31a8-4918-a163-39a7851c347a" data-linktype="relative-path">DRAs</a> have been applied to
the <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_a04c146a-de3b-4e4b-829f-a9e772f3fe25" data-linktype="relative-path">file</a>. If present,
the DRF key list MUST lie completely within <b>Data Fields</b> and MUST NOT
overlap the DDF key list.</p><p><b>Reserved4 (12 bytes): </b>MUST be set to zero and
ignored upon receipt.</p><p><b>Data_Fields (variable): </b> This field MUST
contain the following two items in any order at the locations indicated by the
respective Offset fields previously listed. Both items MUST conform to the key
list format specified in section <a href="0e9d5482-59c7-4cd3-a439-603f9d154963" data-linktype="relative-path">2.2.2.1.1</a>. The DDF key
list MUST NOT overlap with the DRF key list (if present). There MUST NOT be any
unused areas within this field spanning more than 8 contiguous bytes. Any
unused areas within this field MUST be set to zero bytes and ignored by the
server.</p><dl>
<dd>
<table>
<tbody><tr>
<th><p><br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>1<br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>2<br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>3<br/>0</p></th>
<th><p><br/>1</p></th>
</tr>
<tr>
<td colspan="32">DDF_key_list (variable)</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
<tr>
<td colspan="32">DRF_key_list (variable)</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
</tbody></table>
</dd>
<dd>
<p><b>DDF_key_list (variable): </b> This
field MUST contain one or more entries. Each entry consists of the file&#39;s FEK,
encrypted with the <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_4cf96ca0-e3a9-4165-8d1a-a21b1397007a" data-linktype="relative-path">public
key</a> of a user authorized to access the file.</p>
</dd>
<dd>
<p><b>DRF_key_list (variable): </b> This
MUST contain one or more entries. Each entry consists of the files FEK,
encrypted with the public key of a DRA authorized to access the file. This MUST
only be present if the value in the DRF offset field is nonzero.</p>
</dd></dl></div>
@@ -0,0 +1,107 @@
<div class="content" name="EfsRpcFileKeyInfo" uuid="6813bfa8-1538-4c5f-982a-ad58caff3c1c"><p>The EfsRpcFileKeyInfo method is used to query and modify
information about the <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_718bfd46-3cd2-45e8-befa-55f5c9f3be7b" data-linktype="relative-path">keys</a>
used to encrypt a given object.</p><dl>
<dd>
<div><pre> DWORD EfsRpcFileKeyInfo(
  [in] handle_t binding_h,
  [in, string] wchar_t* FileName,
  [in] DWORD InfoClass,
  [out] EFS_RPC_BLOB** KeyInfo
 );
</pre></div>
</dd></dl><p><b>binding_h: </b>This is an <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_8a7f6700-8311-45bc-af10-82e10accd331" data-linktype="relative-path">RPC</a> <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_1cf35308-abab-4123-9cbd-99c42dc9a6ff" data-linktype="relative-path">binding</a> handle parameter,
as specified in <a href="https://go.microsoft.com/fwlink/?LinkId=89824" data-linktype="external">[C706]</a>
and <a href="../ms-rpce/290c38b1-92fe-4229-91e6-4fc376610c15" data-linktype="relative-path">[MS-RPCE]</a>
section <a href="../ms-rpce/a01f5886-c485-4bcf-bb23-e0d755510ab7" data-linktype="relative-path">2</a>.</p><p><b>FileName: </b>An EFSRPC identifier, as specified
in section <a href="9db7433f-be13-4605-993f-3695a2d2916e" data-linktype="relative-path">2.2.1</a>.</p><p><b>InfoClass: </b>One of the values in the following
table. With the exception of UPDATE_KEY_USED (0x00000100), a server SHOULD
support all of these values. A server MAY choose to support UPDATE_KEY_USED.<a id="Appendix_A_Target_46"></a><a aria-label="Product behavior note 46" href="cecd911d-7105-45cc-a7c8-348335d6f03f#Appendix_A_46" data-linktype="relative-path">&lt;46&gt;</a></p><dl>
<dd>
<table><thead>
<tr>
<th>
<p>Value</p>
</th>
<th>
<p>Meaning</p>
</th>
</tr>
</thead><tbody><tr>
<td>BASIC_KEY_INFO 0x00000001</td>
<td>Request information about the keys used to encrypt the object&#39;s contents. On success, the server will return the information in an EFS_KEY_INFO (2.2.14)structure in the KeyInfo parameter.</td>
</tr><tr>
<td>CHECK_COMPATIBILITY_INFO 0x00000002</td>
<td>Requests the EfsVersion for the encrypted file. On success, the server will return the information in an EFS_COMPATIBILITY_INFO structure in the KeyInfo parameter.</td>
</tr><tr>
<td>UPDATE_KEY_USED 0x00000100</td>
<td>Update the user certificates used to give a specific user access to an object. The server will populate the KeyInfo parameter with a zero-terminated, wide character Unicode string that contains a newline-separated list of names of objects successfully updated.</td>
</tr><tr>
<td>CHECK_DECRYPTION_STATUS 0x00000200</td>
<td>Request a hint from the server as to whether the given object could be successfully decrypted without further user intervention or higher-level events. The server will return this information in an EFS_DECRYPTION_STATUS_INFO structure in the KeyInfo parameter.</td>
</tr><tr>
<td>CHECK_ENCRYPTION_STATUS 0x00000400</td>
<td>Request a hint from the server as to whether the given object could be successfully encrypted without further user intervention or higher-level events. The server will return this information in an EFS_ENCRYPTION_STATUS_INFO structure in the KeyInfo parameter.</td>
</tr></tbody></table>
</dd></dl><p><b>KeyInfo: </b>Returned by the server, as previously
specified.</p><p><b>Return Values: </b>The server MUST return 0 if it
successfully processes the message received from the client. The server MUST
return a nonzero value if processing fails.</p><dl>
<dd>
<p>If no object exists on the server with the specified
name the server MUST return a nonzero value.</p>
</dd>
<dd>
<p>If the <i>InfoClass</i> parameter is not equal to
CHECK_ENCRYPTION_STATUS and the object with the specified name is not
encrypted, the server MUST return a nonzero value.</p>
</dd>
<dd>
<p>If the value in the <i>InfoClass</i> parameter is
unsupported by the server, the server MUST return a nonzero value.</p>
</dd>
<dd>
<p>If the value in the <i>InfoClass</i> parameter is
equal to BASIC_KEY_INFO, the server SHOULD read the <a href="3166cf4a-e085-47be-94c6-b69bddf274ff" data-linktype="relative-path">EFSRPC Metadata</a> of the
object referred to by the FileName argument and return information about its <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_3a58e275-3d9f-4b66-8c8d-9808cd0cd8ff" data-linktype="relative-path">FEK</a> in an EFS_KEY_INFO
structure within the KeyInfo argument.</p>
</dd>
<dd>
<p>If the value in the <i>InfoClass</i> parameter is
equal to UPDATE_KEY_USED, the implementation supports this value, and the <i>FileName</i>
parameter does not satisfy the implementation-specific requirements for this
operation<a id="Appendix_A_Target_47"></a><a aria-label="Product behavior note 47" href="cecd911d-7105-45cc-a7c8-348335d6f03f#Appendix_A_47" data-linktype="relative-path">&lt;47&gt;</a>, the server MUST return a
nonzero value.</p>
</dd>
<dd>
<p>If the value in the <i>InfoClass</i> parameter is
equal to UPDATE_KEY_USED, the implementation supports this value, and the <i>FileName</i>
parameter does satisfy all implementation-specific requirements, the server
MUST update the EFSRPC Metadata of all the data objects referred by <i>FileName</i>
in an implementation-specific way<a id="Appendix_A_Target_48"></a><a aria-label="Product behavior note 48" href="cecd911d-7105-45cc-a7c8-348335d6f03f#Appendix_A_48" data-linktype="relative-path">&lt;48&gt;</a>, and
return a newline-separated list of EFSRPC Identifiers thus updated in the <i>KeyInfo</i>
parameter.</p>
</dd>
<dd>
<p>If the value in the <i>InfoClass</i> parameter is
equal to CHECK_ENCRYPTION_STATUS, the server MUST return an
EFS_ENCRYPTION_STATUS_INFO structure in the <i>KeyInfo</i> parameter, which
provides a hint to the client what error code would be returned if encryption
was attempted on this object without any further user interaction or
higher-level events.</p>
</dd>
<dd>
<p>If the value in the <i>InfoClass</i> parameter is
equal to CHECK_DECRYPTION_STATUS, the server SHOULD return
ERROR_REQUIRES_INTERACTIVE_WINDOWSTATION (<a href="../ms-erref/1bc92ddf-b79e-413c-bbaa-99a5281a6c90" data-linktype="relative-path">[MS-ERREF]</a>
section <a href="../ms-erref/18d8fbe8-a967-4f1c-ae50-99ca8e491d2d" data-linktype="relative-path">2.2</a>).
The server MAY, instead, return an EFS_DECRYPTION_STATUS_INFO structure in the <i>KeyInfo</i>
parameter, which provides a hint to the client what error code would be
returned if decryption were attempted on this object without any further user
interaction or higher-level events.</p>
</dd>
<dd>
<p>If the value of the InfoClass parameter is equal to
CHECK_COMPATIBILITY_INFO, the server MUST return an EFS_COMPATIBILITY_INFO
structure in the KeyInfo parameter, which provides the EFSVersion of the EFSRPC
metadata associated with the file.</p>
</dd></dl></div>
@@ -0,0 +1,6 @@
<div class="content" name="Introduction" uuid="82543317-ac9c-4340-b6a6-8cd5e6ad8215"><p>The Encrypting File System Remote (EFSRPC) Protocol is used
for performing maintenance and management operations on encrypted data that is
stored remotely and accessed over a network. It is used in Windows to manage <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_a04c146a-de3b-4e4b-829f-a9e772f3fe25" data-linktype="relative-path">files</a> that reside on remote
file servers and are encrypted using the <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_3bd30c20-9517-4030-a48c-380362e209a1" data-linktype="relative-path">Encrypting File System (EFS)</a>.</p><p>Sections 1.5, 1.8, 1.9, 2, and 3 of this specification are
normative. All other sections and examples in this specification are
informative.</p></div>
@@ -0,0 +1,107 @@
<div class="content" name="Protector_List_Entry" uuid="8593a473-b726-4a19-9291-b8669b535304"><p> </p><p>Each individual Protector List Entry MUST be formatted as
follows. </p><table>
<tbody><tr>
<th><p><br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>1<br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>2<br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>3<br/>0</p></th>
<th><p><br/>1</p></th>
</tr>
<tr>
<td colspan="32">EFSX_Datum</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
<tr>
<td colspan="16">ProtectorType</td>
<td colspan="16">ProtectorFlags</td>
</tr>
<tr>
<td colspan="32">Data_Fields (variable)</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
</tbody></table><p><b>EFSX_Datum (8 bytes): </b>MUST be formatted as
specified in section <a href="1d2fa232-d557-43fe-95e3-2d4ced7f7934" data-linktype="relative-path">2.2.2.2.2</a>.
The datum <b>Type</b> MUST be EFSX_TYPE_KEY_PROTECTOR (0x0003) and SHOULD have
a <b>Role</b> of EFSX_ROLE_IGNORE (0x0000). The datum <b>Flags</b> SHOULD
include 0x0002 indicating a complex datum.</p><p><b>ProtectorType (2 bytes): </b>The type of the
protector. It MUST be a 16-bit unsigned integer in little-endian format.
Possible values are specified below.</p><dl>
<dd>
<table><thead>
<tr>
<th>
<p>Value</p>
</th>
<th>
<p>Meaning</p>
</th>
</tr>
</thead><tbody><tr>
<td>0x0001</td>
<td>The protector was derived from a public/private key pair using a key agreement. The Data Fields SHOULD include an EFSX_Datum of Type EFSX_TYPE_KEY_AGMT_DATA (0x0005) and Role 0x0002.</td>
</tr><tr>
<td>0x0002</td>
<td>The protector was derived from a public/private key pair capable of performing asymmetric encryption. The Data Fields SHOULD include an EFSX_Datum of Type EFSX_TYPE_BLOB (0x0001) and Role 0x0002.</td>
</tr><tr>
<td>0x0003</td>
<td>The protector was derived using a DPAPI-NG encryption provider on the endpoint. The Data Fields SHOULD include an EFSX_Datum of Type EFSX_TYPE_DPAPI_NG_DATA (0x0007) and Role 0x0002.</td>
</tr></tbody></table>
</dd></dl><p><b>ProtectorFlags (2 bytes): </b>The flags for the
protector. It MUST be a 16-bit unsigned integer in little-endian format. The
value MUST be 0x0000 or a union of one or more of the following values.</p><dl>
<dd>
<table><thead>
<tr>
<th>
<p>Value</p>
</th>
<th>
<p>Meaning</p>
</th>
</tr>
</thead><tbody><tr>
<td>0x0001</td>
<td>The protector is a legacy protector, and stores the Encrypted FEK as specified in section 2.2.2.1.5.</td>
</tr><tr>
<td>0x0002</td>
<td>If this is a legacy protector (flag 0x0001 is also set), the Encrypted FEK is encrypted using AES 256, with a key that is obtained by signing the non-terminated Unicode string &#34;MICROSOFTE&#34; (20 bytes long) with the user&#39;s RSA and computing the SHA-256 hash of the result.</td>
</tr><tr>
<td>0x0004</td>
<td>If this bit is set, bit 0x0001 MUST also be set to indicate a legacy protector. This bit indicates that the legacy protector stores the File Master Key (FMK) encrypted in the Encrypted FEK structure instead of the File Encryption Key (FEK).</td>
</tr></tbody></table>
</dd></dl><p><b>Data_Fields (variable): </b>This field contains
any number of nested EFSX_Datum structures. The nested datum structures MUST
NOT overlap and MUST be entirely contained within the protector list entry.
This field SHOULD contain a datum with a <b>Role</b> of 0x0002 (protector data)
and a datum with a <b>Type</b> of EFSX_TYPE_PROTECTOR_INFO (0x0004).</p></div>
@@ -0,0 +1,59 @@
<div class="content" name="Protector_List" uuid="8bef7919-5a88-44a8-9d03-72c58a14f63f"><p>The DDF and DRF Protector List structure in the Version 4
EFSRPC Metadata MUST be formatted as follows.</p><table>
<tbody><tr>
<th><p><br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>1<br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>2<br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>3<br/>0</p></th>
<th><p><br/>1</p></th>
</tr>
<tr>
<td colspan="32">StructureSize</td>
</tr>
<tr>
<td colspan="16">ProtectorsCount</td>
<td colspan="16">Protector_List_Entries (variable)</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
<tr>
<td colspan="32">…</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
</tbody></table><p><b>StructureSize (4 bytes): </b>The size in bytes of
the protector list. It MUST be a 32-bit unsigned integer in little-endian
format.</p><p><b>ProtectorsCount (2 bytes): </b> This represents
the number of protectors in the protector list. It MUST be a 16-bit unsigned
integer in little-endian format.</p><p><b>Protector_List_Entries (variable): </b>A number of
entries equal to the value in the ProtectorsCount field. The individual entries
MUST be formatted as specified in section <a href="8593a473-b726-4a19-9291-b8669b535304" data-linktype="relative-path">2.2.2.2.5</a>.</p></div>
@@ -0,0 +1,18 @@
<div class="content" name="EFS_DECRYPTION_STATUS_INFO" uuid="9d10b7b1-cc92-404e-a589-640193cc0681"><p>The EFS_DECRYPTION_STATUS_INFO type is used to represent the
predicted outcome if an attempt were made to read the <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_787ee6a8-5f01-4526-828a-d1b3de39c21a" data-linktype="relative-path">plaintext</a> of an encrypted
object.</p><dl>
<dd>
<div><pre> typedef struct {
   DWORD dwDecryptionError;
   DWORD dwHashOffset;
   DWORD cbHash;
 } EFS_DECRYPTION_STATUS_INFO;
</pre></div>
</dd></dl><p><b>dwDecryptionError:</b> The error code
returned if decryption were attempted. If the operation were to succeed, this
value MUST be zero. Otherwise it MUST be set to a nonzero value.</p><p><b>dwHashOffset:</b> The offset of the
appended <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_7a0f4b71-23ba-434f-b781-28053ed64879" data-linktype="relative-path">certificate</a>
hash in bytes from the start of this structure.</p><p><b>cbHash:</b> The length in bytes of the
appended certificate hash.</p><p>If dwDecryptionError is nonzero, the preceding fields are
followed by the hash of a certificate whose corresponding <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_6fca10f4-e829-42ab-ad40-1566585060ca" data-linktype="relative-path">private key</a> is required for
the decryption to succeed.</p></div>
@@ -0,0 +1,117 @@
<div class="content" name="DATA_SEGMENT_ENCRYPTION_HEADER" uuid="a38459f2-40e9-418d-866c-d33789886a91"><p> The Data Segment Encryption Header MUST be formatted as
follows.</p><table>
<tbody><tr>
<th><p><br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>1<br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>2<br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>3<br/>0</p></th>
<th><p><br/>1</p></th>
</tr>
<tr>
<td colspan="32">Starting File Offset</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
<tr>
<td colspan="32">Length</td>
</tr>
<tr>
<td colspan="32">Bytes Within Stream Size</td>
</tr>
<tr>
<td colspan="32">Bytes Within VDL</td>
</tr>
<tr>
<td colspan="16">0x0000</td>
<td colspan="8">Data Unit Shift</td>
<td colspan="8">Chunk Shift</td>
</tr>
<tr>
<td colspan="8">Cluster Shift</td>
<td colspan="8">0x01</td>
<td colspan="16">Number of Data Blocks</td>
</tr>
<tr>
<td colspan="32">Data Block Sizes (variable)</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
<tr>
<td colspan="32">Extended Header (16 bytes, optional)</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
</tbody></table><p><b>Starting File Offset (8 bytes): </b>This field
MUST contain an unsigned 64-bit integer in little-endian format denoting the
offset, in bytes, into the stream being serialized of the first data byte
contained in this data segment.</p><p><b>Length (4 bytes): </b>The length of this header,
in bytes, measured from the beginning of the <b>Starting File Offset</b> field
to the end of the <b>Data Segment Encryption Header</b>. It MUST be a 32-bit
unsigned integer in little-endian format. Any unused bytes within this
structure MUST be set to zero and ignored by the server.</p><p><b>Bytes Within Stream Size (4 bytes): </b>The number
of bytes contained within this stream data segment that fall within the stream
size. It MUST be a 32-bit unsigned integer in little-endian format. This can be
less than the number of bytes actually present due to padding required by the
encryption algorithm.</p><p><b>Bytes Within VDL (4 bytes): </b>The number of
bytes contained within this stream data segment that fall within the <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_802f5450-7e2b-4e6d-85ec-306971174ab1" data-linktype="relative-path">valid data length (VDL)</a>. It
MUST be a 32-bit unsigned integer in little-endian format. This can be less
than the number of bytes actually present due to padding required by the
encryption algorithm. Bytes beyond the VDL MUST be set to zero after
decryption.</p><p><b>Data Unit Shift (1 byte): </b>The base-2 logarithm
of the data unit size. It MUST be an 8-bit unsigned integer. For files that are
not <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_57c7faf0-6002-4b1a-b8fc-fc9244d5a6e5" data-linktype="relative-path">sparse files</a>, the
data unit size MUST be set to the size of the data in this segment. For sparse
files, it MUST be equal to the size of a compression unit, which is the
smallest unit that all holes MUST be a multiple of.</p><p><b>Chunk Shift (1 byte): </b>The base-2 logarithm of
the chunk size. It MUST be an 8-bit unsigned integer. The chunk size MUST be
equal to the data unit size.</p><p><b>Cluster Shift (1 byte): </b>The base-2 logarithm
of the cluster size in bytes. It MUST be an 8-bit unsigned integer. It MUST be
equal to the smallest unit of allocation in the underlying <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_528b06a4-e67c-43b3-a02d-8738858a691d" data-linktype="relative-path">file system</a>.</p><p><b>Number of Data Blocks (2 bytes): </b>This field
MUST contain the number of data blocks specified in this segment. It MUST be a
16-bit unsigned integer in little-endian format. It MUST be equal to the number
of entries in the <b>Data Block Sizes</b> field specified next.</p><p><b>Data Block Sizes (variable): </b>This field MUST
consist of a sequence of unsigned 32-bit values in little-endian format,
denoting the sizes of the successive data blocks in the <b>Stream Data</b>
field that follows this header. Each value in the sequence MUST be less than or
equal to the data unit size, unless it spans the VDL or a hole in the case of a
sparse file.</p><p><b>Extended Header (16 bytes): </b>This field is
optional, and its presence is indicated by the four-byte signature located at
the start of this field. If this field is present, the server SHOULD interpret
it as defined in section <a href="9f6beece-d6c3-483f-a969-5af841b88f1e" data-linktype="relative-path">2.2.3.4</a>.
The server MAY ignore this field.<a id="Appendix_A_Target_20"></a><a aria-label="Product behavior note 20" href="cecd911d-7105-45cc-a7c8-348335d6f03f#Appendix_A_20" data-linktype="relative-path">&lt;20&gt;</a></p></div>
@@ -0,0 +1,21 @@
<div class="content" name="EfsRpcReadFileRaw" uuid="a3a6d95f-ebd5-4a08-9d19-6b6c1b7d41f6"><p>The method EfsRpcReadFileRaw is used by a client to obtain
marshaled data for an encrypted object from the server.</p><dl>
<dd>
<div><pre> long EfsRpcReadFileRaw(
  [in] PEXIMPORT_CONTEXT_HANDLE hContext,
  [out] EFS_EXIM_PIPE* EfsOutPipe
 );
</pre></div>
</dd></dl><p><b>hContext: </b>A context handle returned by the <a href="ccc4fb75-1c86-41d7-bbc4-b278ec13bfb8" data-linktype="relative-path">EfsRpcOpenFileRaw</a> method,
which MUST have been called without the CREATE_FOR_IMPORT flag.</p><p><b>EfsOutPipe: </b>A pipe structure. The push
procedure of this pipe will be called with the marshaled data. The structure of
this marshaled data is specified in section <a href="e67520ea-0cb6-4349-bbe5-427a644d9492" data-linktype="relative-path">2.2.3</a>.</p><p><b>Return Values: </b>The server MUST return 0 if it
successfully processes the message received from the client.</p><p>If called with a context handle that has not been obtained
by calling the EfsRpcOpenFileRaw method without the CREATE_FOR_IMPORT flag set,
the server SHOULD throw an RPC exception.</p><p>The server MUST read data from the object and write it to
the pipe in EFSRPC Raw Data Format until all the data in the object has been
written. When all the data in the object has been written, the server MUST
flush the pipe by performing a 0-byte write to the pipe, and return 0 to the
user to indicate success.</p><p>If an error is encountered during the read, the server MUST
flush the pipe and SHOULD throw an RPC exception. The pipe MUST be flushed by
performing a 0-byte write to the pipe.</p></div>
@@ -0,0 +1,16 @@
<div class="content" name="EfsRpcFlushEfsCache" uuid="a7e37233-b684-4c3f-905b-81c2e04482f1"><p>The EfsRpcFlushEfsCache method causes <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_3bd30c20-9517-4030-a48c-380362e209a1" data-linktype="relative-path">EFS</a> to flush the logical
cache that holds all the sensitive information required to perform EFSRPC
operations for the calling user.</p><dl>
<dd>
<div><pre> DWORD EfsRpcFlushEfsCache(
  [in] handle_t binding_h
 );
</pre></div>
</dd></dl><p><b>binding_h: </b>This is an <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_8a7f6700-8311-45bc-af10-82e10accd331" data-linktype="relative-path">RPC</a> <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_1cf35308-abab-4123-9cbd-99c42dc9a6ff" data-linktype="relative-path">binding</a> handle parameter,
as specified in <a href="https://go.microsoft.com/fwlink/?LinkId=89824" data-linktype="external">[C706]</a>
and <a href="../ms-rpce/290c38b1-92fe-4229-91e6-4fc376610c15" data-linktype="relative-path">[MS-RPCE]</a>
section <a href="../ms-rpce/a01f5886-c485-4bcf-bb23-e0d755510ab7" data-linktype="relative-path">2</a>.</p><p><b>Return Values: </b>The server MUST return 0 if it
successfully processes the message received from the client. The server MUST
return a nonzero value if processing fails.</p><p>The server MUST completely discard the logical cache being
maintained on behalf of the calling user. The logical cache is as specified in
section <a href="2425f825-aa14-4895-a159-4122927dec7c" data-linktype="relative-path">3.1.1</a>.</p></div>
@@ -0,0 +1,24 @@
<div class="content" name="EfsRpcAddUsersToFile" uuid="afd56d24-3732-4477-b5cf-44cc33848d85"><p>The EfsRpcAddUsersToFile method is used to grant the
possessors of the <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_6fca10f4-e829-42ab-ad40-1566585060ca" data-linktype="relative-path">private
keys</a> corresponding to certain <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_2069b65d-b546-4198-abfd-768badc2258e" data-linktype="relative-path">X.509</a> <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_7a0f4b71-23ba-434f-b781-28053ed64879" data-linktype="relative-path">certificates</a> the ability to
decrypt the object.</p><dl>
<dd>
<div><pre> DWORD EfsRpcAddUsersToFile(
  [in] handle_t binding_h,
  [in, string] wchar_t* FileName,
  [in] ENCRYPTION_CERTIFICATE_LIST* EncryptionCertificates
 );
</pre></div>
</dd></dl><p><b>binding_h: </b>This is an <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_8a7f6700-8311-45bc-af10-82e10accd331" data-linktype="relative-path">RPC</a> <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_1cf35308-abab-4123-9cbd-99c42dc9a6ff" data-linktype="relative-path">binding</a> handle parameter,
as specified in <a href="https://go.microsoft.com/fwlink/?LinkId=89824" data-linktype="external">[C706]</a>
and <a href="../ms-rpce/290c38b1-92fe-4229-91e6-4fc376610c15" data-linktype="relative-path">[MS-RPCE]</a>
section <a href="../ms-rpce/a01f5886-c485-4bcf-bb23-e0d755510ab7" data-linktype="relative-path">2</a>.</p><p><b>FileName: </b>An EFSRPC nonzero name, as specified
in section <a href="9db7433f-be13-4605-993f-3695a2d2916e" data-linktype="relative-path">2.2.1</a>. </p><p><b>EncryptionCertificates: </b>A list of
certificates, represented by an <a href="d5e14019-e104-4ac1-abb9-525ec4f716a7" data-linktype="relative-path">ENCRYPTION_CERTIFICATE_LIST</a>
structure, which are to be given access to the object.</p><p><b>Return Values: </b>The server MUST return 0 if it
successfully processes the message received from the client. The server MUST
return a nonzero value if processing fails.</p><p>If no object exists on the server with the specified name,
or if the object exists and is not encrypted, the server MUST return a nonzero
value. Otherwise, the server MUST modify the object&#39;s <a href="3166cf4a-e085-47be-94c6-b69bddf274ff" data-linktype="relative-path">EFSRPC Metadata</a> such that
all the user certificates listed in the Users structure have the ability to
decrypt the object.</p></div>
@@ -0,0 +1,127 @@
<div class="content" name="EfsRpcDuplicateEncryptionInfoFile" uuid="b39ec3e2-d3f0-4934-925e-74032365f9d2"><p>The EfsRpcDuplicateEncryptionInfoFile method is used to
duplicate the <a href="3166cf4a-e085-47be-94c6-b69bddf274ff" data-linktype="relative-path">EFSRPC
Metadata</a> of one encrypted object and attach it to another encrypted object.
This is typically done when copying objects to maintain the same set of <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_718bfd46-3cd2-45e8-befa-55f5c9f3be7b" data-linktype="relative-path">keys</a> and users for the copy
as for the original.</p><dl>
<dd>
<div><pre> DWORD EfsRpcDuplicateEncryptionInfoFile(
  [in] handle_t binding_h,
  [in, string] wchar_t* SrcFileName,
  [in, string] wchar_t* DestFileName,
  [in] DWORD dwCreationDisposition,
  [in] DWORD dwAttributes,
  [in, unique] EFS_RPC_BLOB* RelativeSD,
  [in] BOOL bInheritHandle
 );
</pre></div>
</dd></dl><p><b>binding_h: </b>This is an <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_8a7f6700-8311-45bc-af10-82e10accd331" data-linktype="relative-path">RPC</a> <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_1cf35308-abab-4123-9cbd-99c42dc9a6ff" data-linktype="relative-path">binding</a> handle parameter,
as specified in <a href="https://go.microsoft.com/fwlink/?LinkId=89824" data-linktype="external">[C706]</a>
and <a href="../ms-rpce/290c38b1-92fe-4229-91e6-4fc376610c15" data-linktype="relative-path">[MS-RPCE]</a>
section <a href="../ms-rpce/a01f5886-c485-4bcf-bb23-e0d755510ab7" data-linktype="relative-path">2</a>.</p><p><b>SrcFileName: </b> An EFSRPC identifier, as
specified in section <a href="9db7433f-be13-4605-993f-3695a2d2916e" data-linktype="relative-path">2.2.1</a>.</p><p><b>DestFileName: </b>An EFSRPC identifier, as
specified in section 2.2.1.</p><p><b>dwCreationDisposition: </b>This parameter
specifies what action the server is advised to take if the object referred to
by <i>DestFileName</i> does not already exist. It MUST be one of the following
values.</p><dl>
<dd>
<table><thead>
<tr>
<th>
<p>Value</p>
</th>
<th>
<p>Meaning</p>
</th>
</tr>
</thead><tbody><tr>
<td>CREATE_NEW 0x00000001</td>
<td>Do not overwrite the data object referred to by DestFileName if it already exists.</td>
</tr><tr>
<td>CREATE_ALWAYS 0x00000002</td>
<td>Overwrite the data object referred to by DestFileName if it already exists.</td>
</tr></tbody></table>
</dd></dl><p><b>dwAttributes: </b>Desired attributes for the
target object. Clients SHOULD set this parameter to the bitwise OR of zero or
more of the following values. Servers SHOULD support all of these values. These
values can be interpreted by the underlying server data store, and they do not
affect protocol behavior.</p><dl>
<dd>
<table><thead>
<tr>
<th>
<p>Value</p>
</th>
<th>
<p>Meaning</p>
</th>
</tr>
</thead><tbody><tr>
<td>FILE_ATTRIBUTE_HIDDEN 0x00000002</td>
<td>The file is hidden (not displayed in normal folder listings).</td>
</tr><tr>
<td>FILE_ATTRIBUTE_ARCHIVE 0x00000020</td>
<td>This attribute is used by applications to mark files for backup or removal.</td>
</tr><tr>
<td>FILE_ATTRIBUTE_TEMPORARY 0x00000100</td>
<td>The file is being used for temporary storage.</td>
</tr><tr>
<td>FILE_ATTRIBUTE_NOT_CONTENT_INDEXED 0x00002000</td>
<td>The file&#39;s contents are not to be indexed by the content indexing service.</td>
</tr><tr>
<td>FILE_ATTRIBUTE_NORMAL 0x00000080</td>
<td>No other attributes are to be set.</td>
</tr></tbody></table>
</dd></dl><p><b>RelativeSD: </b>Relative security descriptor for
the target object. The format of this is implementation-dependent.<a id="Appendix_A_Target_49"></a><a aria-label="Product behavior note 49" href="cecd911d-7105-45cc-a7c8-348335d6f03f#Appendix_A_49" data-linktype="relative-path">&lt;49&gt;</a></p><p><b>bInheritHandle: </b>This parameter SHOULD be set
to FALSE by the client and SHOULD be ignored by the server.</p><p><b>Return Values: </b>The server MUST return 0 if it
successfully processes the message received from the client. The server MUST
return a nonzero value if processing fails.<a id="Appendix_A_Target_50"></a><a aria-label="Product behavior note 50" href="cecd911d-7105-45cc-a7c8-348335d6f03f#Appendix_A_50" data-linktype="relative-path">&lt;50&gt;</a></p><dl>
<dd>
<p>If no object exists on the server with the name
specified in the <i>SrcFileName</i> parameter, or if it exists and is not
encrypted, the server MUST return a nonzero value.</p>
</dd>
<dd>
<p>If an encrypted object exists with the name
specified in the <i>SrcFileName</i> and <i>dwCreationDisposition</i> parameters
is equal to CREATE_NEW, then:</p>
</dd></dl><ul><li><p><span><span>
</span></span>If an object exists with the name specified in the <i>DestFileName</i>
parameter, the server MUST return a nonzero value.</p>
</li><li><p><span><span>
</span></span>If no object exists with the name specified in the <i>DestFileName</i>
parameter, the server MUST create a new object with this name and duplicate the
EFSRPC Metadata from the <i>SrcFileName</i> parameter into it. If the object
specified in <i>SrcFileName</i> is a container for other objects, the server
MUST create the object as a container for objects, and it MUST encrypt any
objects that are subsequently placed in the container after this message has
been processed. Otherwise, the server MUST create the object as a non-container
encrypted data object.</p>
<p>If an encrypted object exists with the name
specified in the <i>SrcFileName</i> and <i>dwCreationDisposition</i> parameters
is not equal to CREATE_NEW, then:</p>
</li><li><p><span><span>
</span></span>If an object already exists with the name specified in the <i>DestFileName</i>
parameter, the server MUST check whether the object referred to by <i>SrcFileName</i>
is of the same type (either simple object or container for other objects); if the
object is not of the same type, the server MUST return a nonzero value. In
addition, if the object referred to by <i>DestFileName</i> is a container for
other objects, and it is not already encrypted, the server MUST return a
nonzero value. Otherwise, the server SHOULD overwrite the object, clear its
existing attributes, create a new object in its place with the attributes
specified, and duplicate the EFSRPC Metadata from the <i>SrcFileName</i>
parameter into it.</p>
</li><li><p><span><span>
</span></span>If no object exists with the name specified in the <i>DestFileName</i>
parameter, the server MUST create a new object with this name and duplicate the
EFSRPC Metadata from the <i>SrcFileName</i> parameter into it. If the object
specified in <i>SrcFileName</i> is a container for other objects, the server
MUST create the object as a container for objects, and it MUST encrypt any
objects that are subsequently placed in the container after this message has
been processed. Otherwise, the server MUST create the object as a non-container
encrypted data object.</p>
</li></ul><p>In duplicating the EFSRPC Metadata from the <i>SrcFileName</i>
parameter to the <i>DestFileName</i> parameter, the server MAY<a id="Appendix_A_Target_51"></a><a aria-label="Product behavior note 51" href="cecd911d-7105-45cc-a7c8-348335d6f03f#Appendix_A_51" data-linktype="relative-path">&lt;51&gt;</a> change the metadata. However,
upon successful completion, the set of users and <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_c2d1bb54-31a8-4918-a163-39a7851c347a" data-linktype="relative-path">DRAs</a> with access to the <i>DestFileName</i>
parameter MUST be the same set of users who had access to the <i>SrcFileName</i>
parameter at the outset.</p></div>
@@ -0,0 +1,17 @@
<div class="content" name="EfsRpcWriteFileRaw" uuid="b4fa10e8-31bb-4dd4-87af-1c4a3dedf417"><p>The method EfsRpcWriteFileRaw is used to create an encrypted
object on the server from the marshaled data provided by the client.</p><dl>
<dd>
<div><pre> long EfsRpcWriteFileRaw(
  [in] PEXIMPORT_CONTEXT_HANDLE hContext,
  [in] EFS_EXIM_PIPE* EfsInPipe
 );
</pre></div>
</dd></dl><p><b>hContext: </b>A context handle returned by the <a href="ccc4fb75-1c86-41d7-bbc4-b278ec13bfb8" data-linktype="relative-path">EfsRpcOpenFileRaw</a> method,
which MUST have been called with the CREATE_FOR_IMPORT flag.</p><p><b>EfsInPipe: </b>A pipe structure. The pull
procedure of this pipe is expected to provide the marshaled data. The structure
of this marshaled data is specified in section <a href="e67520ea-0cb6-4349-bbe5-427a644d9492" data-linktype="relative-path">2.2.3</a>.</p><p><b>Return Values: </b>The server MUST return 0 if it
successfully processes the message received from the client.</p><p>If called with a context handle that has not been obtained
by calling EfsRpcOpenFileRaw with the CREATE_FOR_IMPORT flag set, the server
MUST abort the operation. In this case, it SHOULD throw an RPC exception.</p><p>The server MUST read data from the pipe and write it to the
object indicated by the context handle. If an error is encountered during the
write, the server SHOULD throw an RPC exception.</p></div>
@@ -0,0 +1,90 @@
<div class="content" name="Blob_Datum" uuid="b5a69be6-4759-4dfb-9e66-b37dfcd8529e"><p>  </p><p>The Blob Datum encapsulates an opaque binary object. It MUST
be formatted as below.</p><table>
<tbody><tr>
<th><p><br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>1<br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>2<br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>3<br/>0</p></th>
<th><p><br/>1</p></th>
</tr>
<tr>
<td colspan="32">EFSX_Datum</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
<tr>
<td colspan="16">BlobType</td>
<td colspan="16">BlobFlags</td>
</tr>
<tr>
<td colspan="32">Blob_Data (variable)</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
</tbody></table><p><b>EFSX_Datum (8 bytes): </b>MUST be formatted as
specified in section <a href="1d2fa232-d557-43fe-95e3-2d4ced7f7934" data-linktype="relative-path">2.2.2.2.2</a>.
The datum Type MUST be EFSX_TYPE_BLOB (0x0001). The datum <b>Flags</b> MUST NOT
include 0x0002.</p><p><b>BlobType (2 bytes): </b>The type of the blob,
which provides a hint to the format of the <b>Blob Data</b>. It MUST be a
16-bit unsigned integer in little-endian format.</p><dl>
<dd>
<table><thead>
<tr>
<th>
<p>Value</p>
</th>
<th>
<p>Meaning</p>
</th>
</tr>
</thead><tbody><tr>
<td>0x0000</td>
<td>The blob has no special formatting.</td>
</tr><tr>
<td>0x0001</td>
<td>The blob contains a public key formatted as a BCRYPT_PUBLIC_KEY_BLOB.</td>
</tr><tr>
<td>0x0002</td>
<td>The blob contains a SHA-1 hash of a DER-encoded form of a certificate.</td>
</tr><tr>
<td>0x0003</td>
<td>The blob contains the encrypted form of an Encrypted FEK structure, as defined in section 2.2.2.1.5. The contents of the key can be either the FEK or the FMK (see section 2.2.2.2.5).</td>
</tr><tr>
<td>0x0004</td>
<td>The blob contains key material wrapped with an AES-256 key wrapping key, as defined by [RFC3394].</td>
</tr><tr>
<td>0x0005</td>
<td>The blob contains key material encrypted by a DPAPI-NG provider on the endpoint. This BlobType MUST only be used when EFS_VERSION is 5.&lt;17&gt;</td>
</tr></tbody></table>
</dd></dl><p><b>BlobFlags (2 bytes): </b>Reserved, MUST be 0x0000.</p><p><b>Blob_Data (variable): </b>Contains opaque,
variable-length data. The <b>Blob Data</b> MUST be entirely contained within
the Blob Datum.</p></div>
@@ -0,0 +1,14 @@
<div class="content" name="EFS_ENCRYPTION_STATUS_INFO" uuid="bc8eef94-813a-4ff0-ad75-4614e992b2ca"><p>The EFS_ENCRYPTION_STATUS_INFO structure is used to
represent the predicted outcome if an attempt were made to convert an
unencrypted object to an encrypted state.</p><dl>
<dd>
<div><pre> typedef struct {
   BOOL bHasCurrentKey;
   DWORD dwEncryptionError;
 } EFS_ENCRYPTION_STATUS_INFO;
</pre></div>
</dd></dl><p><b>bHasCurrentKey:</b> A Boolean value
signifying whether an appropriate <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_718bfd46-3cd2-45e8-befa-55f5c9f3be7b" data-linktype="relative-path">key</a> was found that could be
used for encryption.</p><p><b>dwEncryptionError:</b> The error code
returned if encryption were attempted. If the operation were to succeed, this
value MUST be zero. Otherwise, it MUST be set to a nonzero value.</p></div>
@@ -0,0 +1,11 @@
<div class="content" name="EfsRpcCloseRaw" uuid="c5da8aa7-fe38-4940-8d40-2cebbd887cba"><p>The EfsRpcCloseRaw method is called to release any resources
allocated by the <a href="ccc4fb75-1c86-41d7-bbc4-b278ec13bfb8" data-linktype="relative-path">EfsRpcOpenFileRaw</a>
method, or by subsequent calls to the <a href="a3a6d95f-ebd5-4a08-9d19-6b6c1b7d41f6" data-linktype="relative-path">EfsRpcReadFileRaw</a> or <a href="b4fa10e8-31bb-4dd4-87af-1c4a3dedf417" data-linktype="relative-path">EfsRpcWriteFileRaw</a>
methods. </p><dl>
<dd>
<div><pre> void EfsRpcCloseRaw(
  [in, out] PEXIMPORT_CONTEXT_HANDLE* hContext
 );
</pre></div>
</dd></dl><p><b>Return Values: </b>This method has no return
values.</p></div>
@@ -0,0 +1,92 @@
<div class="content" name="EfsRpcOpenFileRaw" uuid="ccc4fb75-1c86-41d7-bbc4-b278ec13bfb8"><p> </p><p>The EfsRpcOpenFileRaw method is used to open an encrypted
object on the server for backup or restore. It allocates resources that MUST be
released by calling the <a href="c5da8aa7-fe38-4940-8d40-2cebbd887cba" data-linktype="relative-path">EfsRpcCloseRaw</a>
method.<a id="Appendix_A_Target_42"></a><a aria-label="Product behavior note 42" href="cecd911d-7105-45cc-a7c8-348335d6f03f#Appendix_A_42" data-linktype="relative-path">&lt;42&gt;</a></p><dl>
<dd>
<div><pre> long EfsRpcOpenFileRaw(
  [in] handle_t binding_h,
  [out] PEXIMPORT_CONTEXT_HANDLE* hContext,
  [in, string] wchar_t* FileName,
  [in] long Flags
 );
</pre></div>
</dd></dl><p><b>binding_h: </b>An explicit <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_1cf35308-abab-4123-9cbd-99c42dc9a6ff" data-linktype="relative-path">binding</a> handle created by
the client. This is an RPC binding handle parameter, as specified in <a href="https://go.microsoft.com/fwlink/?LinkId=89824" data-linktype="external">[C706]</a> and <a href="../ms-rpce/290c38b1-92fe-4229-91e6-4fc376610c15" data-linktype="relative-path">[MS-RPCE]</a>
section <a href="../ms-rpce/a01f5886-c485-4bcf-bb23-e0d755510ab7" data-linktype="relative-path">2</a>.</p><p><b>hContext: </b>An implementation-specific context
handle that is used in subsequent calls by the client to the <a href="a3a6d95f-ebd5-4a08-9d19-6b6c1b7d41f6" data-linktype="relative-path">EfsRpcReadFileRaw</a> method, <a href="b4fa10e8-31bb-4dd4-87af-1c4a3dedf417" data-linktype="relative-path">EfsRpcWriteFileRaw</a> method,
or EfsRpcCloseRaw method.</p><p><b>FileName: </b>An EFSRPC identifier, as specified
in section <a href="9db7433f-be13-4605-993f-3695a2d2916e" data-linktype="relative-path">2.2.1</a>.</p><p><b>Flags: </b>This MUST be set to some combination of
the following values. All servers and clients MUST support the <b>CREATE_FOR_IMPORT</b>
flag. Servers that implement a hierarchical encrypted store, such as the NTFS
file system, SHOULD also support the <b>CREATE_FOR_DIR</b> flag. Servers SHOULD
support the <b>OVERWRITE_HIDDEN</b> flag, and MAY interpret it in
implementation-specific ways. A client MUST ensure that all the flags it does
not support are set to zero. A server MUST ignore all flags it does not
support. Flag values are specified in the following table.</p><dl>
<dd>
<table><thead>
<tr>
<th>
<p>Value</p>
</th>
<th>
<p>Meaning</p>
</th>
</tr>
</thead><tbody><tr>
<td>CREATE_FOR_IMPORT 0x00000001</td>
<td>Open the object for writing (that is, restore). If this flag is not set, open the object for reading (that is, backup).</td>
</tr><tr>
<td>CREATE_FOR_DIR 0x00000002</td>
<td>This flag is only intended for use in conjunction with the CREATE_FOR_IMPORT flag. It indicates that the object being restored is a container for other objects.&lt;43&gt;</td>
</tr><tr>
<td>OVERWRITE_HIDDEN 0x00000004</td>
<td>This flag is only intended for use in conjunction with the CREATE_FOR_IMPORT flag. This flag indicates a request from the client for the server to overwrite an existing object even if the existing object is &#34;hidden&#34;. The meaning of &#34;hidden&#34; is specific to the implementation of the data store, and this meaning does not affect protocol behavior.</td>
</tr><tr>
<td>EFS_DROP_ALTERNATE_STREAMS 0x00000010</td>
<td>This flag indicates that content from any alternate data streams, if present and implemented by the storage system, will be ignored.</td>
</tr></tbody></table>
</dd></dl><p><b>Return Values: </b>The server MUST return 0 if it
successfully processes the message received from the client. The server MUST
return a nonzero value if processing fails.</p><p>First, the server SHOULD perform any additional access
checks prescribed by the implementation. If any of these checks fail, it MUST
return a nonzero value.</p><p>EFSRPC servers SHOULD return an error unless at least one of
the following conditions is true:</p><ul><li><p><span><span>
</span></span>The calling user has a <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_6fca10f4-e829-42ab-ad40-1566585060ca" data-linktype="relative-path">private key</a> that grants the
user authorized access to the file. </p>
</li><li><p><span><span>
</span></span>The <b>CREATE_FOR_IMPORT</b> flag is set, and the user has
restore rights on the server. </p>
</li><li><p><span><span>
</span></span>The <b>CREATE_FOR_IMPORT</b> flag is not set, and the user has
backup rights on the server.</p>
</li></ul><p>If the <b>CREATE_FOR_IMPORT</b> flag is set, the server MUST
attempt to create an object with the given name and prepare it for writing data
received in future EfsRpcWriteFileRaw calls. The server MUST return a nonzero
value if this fails.</p><p>If the <b>CREATE_FOR_IMPORT</b> flag is not set, the server
MUST attempt to locate the object requested and prepare it for reading data to
be sent through future EfsRpcReadFileRaw calls. The server MUST return a
nonzero value if it fails.</p><p>If the server supports the <b>CREATE_FOR_DIR</b> flag, and
this flag is set:</p><ul><li><p><span><span>
</span></span>If the <b>CREATE_FOR_IMPORT</b> flag is not set:</p>
<ul><li><p><span><span> </span></span>If
the data object referred to by <i>FileName</i> exists on the server and is not
a container for other objects, the server SHOULD return a nonzero value.</p>
</li><li><p><span><span> </span></span>Otherwise,
the server SHOULD ignore the <b>CREATE_FOR_DIR</b> flag.</p>
</li></ul></li><li><p><span><span>
</span></span>If the <b>CREATE_FOR_IMPORT</b> flag is set, the server MUST
attempt to create a container with the given name and prepare it for writing
data received in future EfsRpcWriteFileRaw calls. The server MUST return a
nonzero value if this fails.</p>
</li></ul><p>If the server supports the <b>OVERWRITE_HIDDEN</b> flag, and
this flag is set:</p><ul><li><p><span><span>
</span></span>If the <b>CREATE_FOR_IMPORT</b> flag is not set, the server
SHOULD ignore this flag.</p>
</li><li><p><span><span>
</span></span>If the <b>CREATE_FOR_IMPORT</b> flag is set, the server SHOULD
overwrite an existing object even if the object is &#34;hidden&#34;. The
meaning of &#34;hidden&#34; is specific to the implementation of the data
store, and this meaning does not affect protocol behavior.</p>
</li></ul><p>The server MUST ignore any flags that it does not support.</p><p>On success, the server MUST create an appropriate context
handle and return it to the client.</p></div>
@@ -0,0 +1,31 @@
<div class="content" name="EfsRpcQueryRecoveryAgents" uuid="cf759c00-1b90-4c33-9ace-f51c20149cea"><p>The EfsRpcQueryRecoveryAgents method is used to query the <a href="3166cf4a-e085-47be-94c6-b69bddf274ff" data-linktype="relative-path">EFSRPC Metadata</a> of an
encrypted object for the <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_2069b65d-b546-4198-abfd-768badc2258e" data-linktype="relative-path">X.509</a>
<a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_7a0f4b71-23ba-434f-b781-28053ed64879" data-linktype="relative-path">certificates</a> of the data
recovery agents whose private <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_718bfd46-3cd2-45e8-befa-55f5c9f3be7b" data-linktype="relative-path">keys</a>
can be used to decrypt the object.</p><dl>
<dd>
<div><pre> DWORD EfsRpcQueryRecoveryAgents(
  [in] handle_t binding_h,
  [in, string] wchar_t* FileName,
  [out] ENCRYPTION_CERTIFICATE_HASH_LIST** RecoveryAgents
 );
</pre></div>
</dd></dl><p><b>binding_h: </b>This is an <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_8a7f6700-8311-45bc-af10-82e10accd331" data-linktype="relative-path">RPC</a>  <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_1cf35308-abab-4123-9cbd-99c42dc9a6ff" data-linktype="relative-path">binding</a> handle parameter,
as specified in <a href="https://go.microsoft.com/fwlink/?LinkId=89824" data-linktype="external">[C706]</a>
and <a href="../ms-rpce/290c38b1-92fe-4229-91e6-4fc376610c15" data-linktype="relative-path">[MS-RPCE]</a>
section <a href="../ms-rpce/a01f5886-c485-4bcf-bb23-e0d755510ab7" data-linktype="relative-path">2</a>.</p><p><b>FileName: </b>An EFSRPC identifier as specified in
section <a href="9db7433f-be13-4605-993f-3695a2d2916e" data-linktype="relative-path">2.2.1</a>. </p><p><b>RecoveryAgents: </b>A list of certificate hashes,
represented by an <a href="2718804c-6ab9-45fd-98cf-541bc3b6bc75" data-linktype="relative-path">ENCRYPTION_CERTIFICATE_HASH_LIST</a>
structure.</p><p><b>Return Values: </b>The server MUST return 0 if it
successfully processes the message received from the client. The server MUST
return a nonzero value if processing fails.</p><dl>
<dd>
<p>If no object exists on the server with the specified
name, or if the object exists and is not encrypted, the server MUST return a
nonzero value. Otherwise, the server MUST read the object&#39;s EFSRPC Metadata and
return a list of the hashes of all the <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_c2d1bb54-31a8-4918-a163-39a7851c347a" data-linktype="relative-path">DRA</a> certificates that have
access to the object in the <i>RecoveryAgents</i> parameter. The server MUST
NOT include any certificates that were not added by virtue of being defined as
DRAs in administrative policy. If no DRAs are defined on the object, the call
MUST return success and this list MUST be empty.</p>
</dd></dl></div>
@@ -0,0 +1,23 @@
<div class="content" name="EfsRpcFileKeyInfoEx" uuid="d0da10ab-3139-4d67-a66c-ea6eb497118d"><p>On receiving the EfsRpcFileKeyInfoEx method call, an EFSRPC
server SHOULD ignore the input parameters and return a nonzero value. The
server MAY act on this method in an implementation-specific manner.<a id="Appendix_A_Target_52"></a><a aria-label="Product behavior note 52" href="cecd911d-7105-45cc-a7c8-348335d6f03f#Appendix_A_52" data-linktype="relative-path">&lt;52&gt;</a></p><dl>
<dd>
<div><pre> DWORD EfsRpcFileKeyInfoEx(
  [in] handle_t binding_h,
  [in] DWORD dwFileKeyInfoFlags,
  [in, unique] EFS_RPC_BLOB* Reserved,
  [in, string] wchar_t* FileName,
  [in] DWORD InfoClass,
  [out] EFS_RPC_BLOB** KeyInfo
 );
</pre></div>
</dd></dl><p><b>binding_h: </b>This is an <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_8a7f6700-8311-45bc-af10-82e10accd331" data-linktype="relative-path">RPC</a> <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_1cf35308-abab-4123-9cbd-99c42dc9a6ff" data-linktype="relative-path">binding</a> handle parameter,
as specified in <a href="https://go.microsoft.com/fwlink/?LinkId=89824" data-linktype="external">[C706]</a>
and <a href="../ms-rpce/290c38b1-92fe-4229-91e6-4fc376610c15" data-linktype="relative-path">[MS-RPCE]</a>
section <a href="../ms-rpce/a01f5886-c485-4bcf-bb23-e0d755510ab7" data-linktype="relative-path">2</a>.</p><p><b>dwFileKeyInfoFlags: </b>This parameter is
reserved. It MUST be set to zero by the client and ignored by the server.</p><p><b>Reserved: </b>This parameter is reserved. It MUST
be set to NULL by the client and ignored by the server.</p><p><b>FileName: </b>An EFSRPC identifier, as specified
in section <a href="9db7433f-be13-4605-993f-3695a2d2916e" data-linktype="relative-path">2.2.1</a>.</p><p><b>InfoClass: </b>One of the values specified for the
<i>InfoClass</i> parameter of the <a href="6813bfa8-1538-4c5f-982a-ad58caff3c1c" data-linktype="relative-path">EfsRpcFileKeyInfo</a> method.</p><p><b>KeyInfo: </b>The server SHOULD ignore this
parameter.<a id="Appendix_A_Target_53"></a><a aria-label="Product behavior note 53" href="cecd911d-7105-45cc-a7c8-348335d6f03f#Appendix_A_53" data-linktype="relative-path">&lt;53&gt;</a></p><p><b>Return Values: </b>The server SHOULD return a
nonzero value.<a id="Appendix_A_Target_54"></a><a aria-label="Product behavior note 54" href="cecd911d-7105-45cc-a7c8-348335d6f03f#Appendix_A_54" data-linktype="relative-path">&lt;54&gt;</a></p></div>
@@ -0,0 +1,75 @@
<div class="content" name="EfsRpcAddUsersToFileEx" uuid="d36df703-edc9-4482-87b7-d05c7783d65e"><p>The EfsRpcAddUsersToFileEx method is used to grant the
possessors of the <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_6fca10f4-e829-42ab-ad40-1566585060ca" data-linktype="relative-path">private
keys</a> corresponding to certain <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_2069b65d-b546-4198-abfd-768badc2258e" data-linktype="relative-path">X.509</a> <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_7a0f4b71-23ba-434f-b781-28053ed64879" data-linktype="relative-path">certificates</a> the ability to
decrypt the object.</p><dl>
<dd>
<div><pre> DWORD EfsRpcAddUsersToFileEx(
  [in] handle_t binding_h,
  [in] DWORD dwFlags,
  [in, unique] EFS_RPC_BLOB* Reserved,
  [in, string] wchar_t* FileName,
  [in] ENCRYPTION_CERTIFICATE_LIST* EncryptionCertificates
 );
</pre></div>
</dd></dl><p><b>binding_h: </b>This is an <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_8a7f6700-8311-45bc-af10-82e10accd331" data-linktype="relative-path">RPC</a> <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_1cf35308-abab-4123-9cbd-99c42dc9a6ff" data-linktype="relative-path">binding</a> handle parameter,
as specified in <a href="https://go.microsoft.com/fwlink/?LinkId=89824" data-linktype="external">[C706]</a>
and <a href="../ms-rpce/290c38b1-92fe-4229-91e6-4fc376610c15" data-linktype="relative-path">[MS-RPCE]</a>
section <a href="../ms-rpce/a01f5886-c485-4bcf-bb23-e0d755510ab7" data-linktype="relative-path">2</a>.</p><p><b>dwFlags: </b>This MUST be set to a bitwise OR of 0
or more of the following flags. The descriptions of the flags are specified in
the following table. If the EFSRPC_ADDUSERFLAG_REPLACE_DDF flag is used, then
the <i>EncryptionCertificates</i> parameter MUST contain exactly one
certificate.</p><dl>
<dd>
<table><thead>
<tr>
<th>
<p>Name</p>
</th>
<th>
<p>Value</p>
</th>
</tr>
</thead><tbody><tr>
<td>EFSRPC_ADDUSERFLAG_ADD_POLICY_KEYTYPE</td>
<td>0x00000002</td>
</tr><tr>
<td>EFSRPC_ADDUSERFLAG_REPLACE_DDF</td>
<td>0x00000004</td>
</tr></tbody></table>
</dd></dl><p><b>Reserved: </b>This parameter is not used. It MUST
be set to NULL by the client and ignored by the server.</p><p><b>FileName: </b>An EFSRPC identifier, as specified
in section <a href="9db7433f-be13-4605-993f-3695a2d2916e" data-linktype="relative-path">2.2.1</a>.</p><p><b>EncryptionCertificates: </b>A list of
certificates, represented by an <a href="d5e14019-e104-4ac1-abb9-525ec4f716a7" data-linktype="relative-path">ENCRYPTION_CERTIFICATE_LIST</a>
structure, which are to be given access to the object.</p><p><b>Return Values: </b>The server MUST return 0 if it
successfully processes the message received from the client. The server MUST
return a nonzero value if processing fails.</p><dl>
<dd>
<p>If no object exists on the server with the specified
name, or if it exists and is not encrypted, the server MUST return a nonzero
value.</p>
</dd>
<dd>
<p>If the EFSRPC_ADDUSERFLAG_REPLACE_DDF flag is set in
the <i>dwFlags</i> parameter, and the <i>EncryptionCertificates</i> parameter
contains more than one certificate, the server MUST return a nonzero value.</p>
</dd>
<dd>
<p>If the EFSRPC_ADDUSERFLAG_REPLACE_DDF flag is set in
the <i>dwFlags</i> parameter, and the calling user does not have the ability to
decrypt the object, the server MUST return a nonzero value.</p>
</dd>
<dd>
<p>If the EFSRPC_ADDUSERFLAG_REPLACE_DDF flag is set in
the <i>dwFlags</i> parameter, and the user certificate in the <i>EncryptionCertificates</i>
parameter already has access to the object, then the server MUST return a zero
value.</p>
</dd></dl><p>If the EFSRPC_ADDUSERFLAG_ADD_POLICY_KEYTYPE flag is
specified in the <i>dwFlags</i> parameter, then for each certificate specified
in the <i>EncryptionCertificates</i> parameter, the server MUST check whether
the private <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_718bfd46-3cd2-45e8-befa-55f5c9f3be7b" data-linktype="relative-path">key</a> for the
certificate is stored on a smart card. If the key is stored, the server MUST
return a nonzero value; otherwise, the server MUST ignore this flag.</p><p>If the EFSRPC_ADDUSERFLAG_REPLACE_DDF flag is set in the <i>dwFlags</i>
parameter, and the calling user has the ability to decrypt the object, then the
certificate in the <i>EncryptionCertificates</i> parameter is to be given
access to the object, replacing one of the calling user&#39;s user certificates
through which he currently has access.</p></div>
@@ -0,0 +1,148 @@
<div class="content" name="Public_Key_Information" uuid="db88e723-1ff7-4351-a518-e1c60ee391a7"><p> The Public Key Information structure MUST be formatted as
follows.</p><table>
<tbody><tr>
<th><p><br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>1<br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>2<br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>3<br/>0</p></th>
<th><p><br/>1</p></th>
</tr>
<tr>
<td colspan="32">Length</td>
</tr>
<tr>
<td colspan="32">Offset to Owner Hint</td>
</tr>
<tr>
<td colspan="8">0x03</td>
<td colspan="8">0x00</td>
<td colspan="8">0x00</td>
<td colspan="8">0x00</td>
</tr>
<tr>
<td colspan="32">Length of Certificate Data</td>
</tr>
<tr>
<td colspan="32">Offset to Certificate Data</td>
</tr>
<tr>
<td colspan="32">Reserved</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
<tr>
<td colspan="32">Data Fields (variable)</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
</tbody></table><p><b>Length (4 bytes): </b>This MUST be set to the
length, in bytes, of this structure. It MUST be a 32-bit unsigned integer in
little-endian format.</p><p><b>Offset to Owner Hint (4 bytes): </b>If the <b>Owner
Hint</b> field is present, this field MUST be set to the offset of the <b>Owner
Hint</b> from the beginning of this structure, measured in bytes. If this field
is zero, then the <b>Owner Hint</b> field MUST NOT be present. This field MUST
be a 32-bit unsigned integer in little-endian format.</p><p><b>Length of Certificate Data (4 bytes): </b>The
size, in bytes, of the <b>Certificate Data</b> field. It MUST be a 32-bit
unsigned integer in little-endian format.</p><p><b>Offset to Certificate Data (4 bytes): </b>The
offset, in bytes, of the <b>Certificate Data</b> field from the start of this
structure. It MUST be a 32-bit unsigned integer in little-endian format.</p><p><b>Reserved (8 bytes): </b>MUST be set to zero and
ignored upon receipt.</p><p><b>Data Fields (variable): </b>This field MUST
contain the following items, in any order, and at the locations indicated by
the respective <b>Offset</b> fields above. These items MUST be completely
contained inside this field and MUST NOT overlap each other. There MUST NOT be
any unused areas within this field that span more than eight contiguous bytes.</p><dl>
<dd>
<table>
<tbody><tr>
<th><p><br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>1<br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>2<br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>3<br/>0</p></th>
<th><p><br/>1</p></th>
</tr>
<tr>
<td colspan="32">Owner Hint (variable)</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
<tr>
<td colspan="32">Certificate Data (variable)</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
</tbody></table>
</dd>
<dd>
<p><b>Owner Hint (variable): </b> A
<a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_83f2020d-0804-4840-a5ac-e06439d50f8d" data-linktype="relative-path">security identifier (SID)</a>
in RPC marshaling format that is intended to be used as a hint regarding the
identity of the <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_718bfd46-3cd2-45e8-befa-55f5c9f3be7b" data-linktype="relative-path">key</a>
owner. This item MUST be present only if the <b>Offset to Owner Hint</b> field
is nonzero. The structure of an RPC SID is specified in <a href="../ms-dtyp/cca27429-5689-4a16-b2b4-9325d93e4ba2" data-linktype="relative-path">[MS-DTYP]</a>
section <a href="../ms-dtyp/5cb97814-a1c2-4215-b7dc-76d1f4bfad01" data-linktype="relative-path">2.4.2.3</a>.</p>
</dd>
<dd>
<p><b>Certificate Data
(variable): </b>This field MUST contain information about the <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_2069b65d-b546-4198-abfd-768badc2258e" data-linktype="relative-path">X.509</a> <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_7a0f4b71-23ba-434f-b781-28053ed64879" data-linktype="relative-path">certificate</a> associated with
the <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_4cf96ca0-e3a9-4165-8d1a-a21b1397007a" data-linktype="relative-path">public key</a> that is
used to encrypt the <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_3a58e275-3d9f-4b66-8c8d-9808cd0cd8ff" data-linktype="relative-path">FEK</a>
data in this key list entry. It MUST be formatted as specified in section <a href="066d0c3d-182c-4730-a005-dbf8990c9fbb" data-linktype="relative-path">2.2.2.1.4</a>.</p>
</dd></dl></div>
@@ -0,0 +1,95 @@
<div class="content" name="RAW_DATA" uuid="e67520ea-0cb6-4349-bbe5-427a644d9492"><p>The EFSRPC raw data format is used by the EFSRPC raw
methods. The output of the <a href="a3a6d95f-ebd5-4a08-9d19-6b6c1b7d41f6" data-linktype="relative-path">EfsRpcReadFileRaw</a>
method MUST conform to this format. The input to the <a href="b4fa10e8-31bb-4dd4-87af-1c4a3dedf417" data-linktype="relative-path">EfsRpcWriteFileRaw</a> method
MUST conform to the EFSRPC Raw Data Format. The details of this format are
implementation dependent. An EFSRPC client SHOULD NOT parse this format and
SHOULD NOT rely on it having any particular structure. An EFSRPC server MUST
validate input data passed to it by the EfsRpcWriteFileRaw method, and SHOULD
abort the EfsRpcWriteFileRaw operation with an RPC exception if this data is in
an unsupported format.</p><p>The EFSRPC Raw Data Format SHOULD be formatted as follows.</p><table>
<tbody><tr>
<th><p><br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>1<br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>2<br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>3<br/>0</p></th>
<th><p><br/>1</p></th>
</tr>
<tr>
<td colspan="8">0x00</td>
<td colspan="8">0x01</td>
<td colspan="8">0x00</td>
<td colspan="8">0x00</td>
</tr>
<tr>
<td colspan="8">0x52</td>
<td colspan="8">0x00</td>
<td colspan="8">0x4f</td>
<td colspan="8">0x00</td>
</tr>
<tr>
<td colspan="8">0x42</td>
<td colspan="8">0x00</td>
<td colspan="8">0x53</td>
<td colspan="8">0x00</td>
</tr>
<tr>
<td colspan="32">Reserved</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
<tr>
<td colspan="32">EFSRPC Metadata Stream (variable)</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
<tr>
<td colspan="32">Additional Stream 1 (variable)</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
<tr>
<td colspan="32">Additional Stream n (variable)</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
</tbody></table><p><b>Reserved (8 bytes): </b>MUST be set to zero and
ignored.</p><p><b>EFSRPC Metadata Stream (variable): </b>This field
MUST be formatted as specified in section <a href="053f87fb-4896-4307-8ece-f23dc8e9762d" data-linktype="relative-path">2.2.3.1</a>. This field MUST
contain the <a href="3166cf4a-e085-47be-94c6-b69bddf274ff" data-linktype="relative-path">EFSRPC Metadata</a>
for the <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_a04c146a-de3b-4e4b-829f-a9e772f3fe25" data-linktype="relative-path">file</a>, along with
a header. The structure of the EFSRPC Metadata is specified in section 2.2.2.</p><p><b>Additional Stream 1 ... n: </b>These MUST
correspond to marshaled versions of all the <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_f3529cd8-50da-4f36-aa0b-66af455edbb6" data-linktype="relative-path">streams</a> (except for <a href="625335e5-a423-4d1c-be51-c696c32aa2eb" data-linktype="relative-path">EFSRPC Metadata</a>) in the
given file. They are optional and might not exist (for example, for <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_6afebb3e-5358-4ab8-b0fc-fcc8de47fcc1" data-linktype="relative-path">folders</a> with no alternate
streams). For more information on <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_86f79a17-c0be-4937-8660-0cf6ce5ddc1a" data-linktype="relative-path">NTFS</a> file streams, see <a href="https://go.microsoft.com/fwlink/?LinkId=90200" data-linktype="external">[MSFT-NTFS]</a>. These
fields MUST be formatted as specified in section 2.2.3.1. </p></div>
@@ -0,0 +1,35 @@
<div class="content" name="EFS_CERTIFICATE_BLOB" uuid="ecaf8957-7c32-4039-9392-0f8db7eb2623"><p>The EFS_CERTIFICATE_BLOB type is used to represent the
encoded contents of an <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_2069b65d-b546-4198-abfd-768badc2258e" data-linktype="relative-path">X.509</a>
<a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_7a0f4b71-23ba-434f-b781-28053ed64879" data-linktype="relative-path">certificate</a>.</p><dl>
<dd>
<div><pre> typedef struct _CERTIFICATE_BLOB {
   DWORD dwCertEncodingType;
   [range(0,32768)] DWORD cbData;
   [size_is(cbData)] unsigned char* bData;
 } EFS_CERTIFICATE_BLOB;
</pre></div>
</dd></dl><p><b>dwCertEncodingType:</b> The certificate
encoding type. This MUST be set to one of the following values. If set to any
other value, the certificate is considered invalid and behavior is undefined.</p><dl>
<dd>
<table><thead>
<tr>
<th>
<p>Value</p>
</th>
<th>
<p>Meaning</p>
</th>
</tr>
</thead><tbody><tr>
<td>0x00000001</td>
<td>Certificate uses X.509 ASN.1 encoding.</td>
</tr><tr>
<td>0x00000002</td>
<td>Certificate uses X.509 NDR encoding.</td>
</tr></tbody></table>
</dd></dl><p><b>cbData:</b> The number of bytes in the
bData buffer.</p><p><b>bData:</b> An encoded X.509 certificate.
Its format is specified by the <b>dwCertEncodingType</b> member. For more
information on ASN encoding, see <a href="https://go.microsoft.com/fwlink/?LinkId=90593" data-linktype="external">[X690]</a>. NDR encoding
is specified in <a href="https://go.microsoft.com/fwlink/?LinkId=89824" data-linktype="external">[C706]</a>.<a id="Appendix_A_Target_21"></a><a aria-label="Product behavior note 21" href="cecd911d-7105-45cc-a7c8-348335d6f03f#Appendix_A_21" data-linktype="relative-path">&lt;21&gt;</a></p></div>
@@ -0,0 +1,159 @@
<div class="content" name="KEY_LIST_ENTRY" uuid="f8c3837c-8617-4346-b188-989933705a40"><p>Each individual Key List Entry MUST be formatted as follows.
</p><table>
<tbody><tr>
<th><p><br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>1<br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>2<br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>3<br/>0</p></th>
<th><p><br/>1</p></th>
</tr>
<tr>
<td colspan="32">Length</td>
</tr>
<tr>
<td colspan="32">Offset to Public Key Information</td>
</tr>
<tr>
<td colspan="32">Encrypted FEK Length</td>
</tr>
<tr>
<td colspan="32">Offset to Encrypted FEK</td>
</tr>
<tr>
<td colspan="32">Flags</td>
</tr>
<tr>
<td colspan="32">Data Fields (variable)</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
</tbody></table><p><b>Length (4 bytes): </b>MUST be equal to the length
of this key list entry in bytes. It MUST be a 32-bit unsigned integer in
little-endian format.</p><p><b>Offset to Public Key Information (4 bytes): </b>MUST
contain the offset to the <b>Public Key Information</b> field in bytes from the
start of this entry. It MUST be a 32-bit unsigned integer in little-endian
format. The <b>Public Key Information</b> field MUST be completely contained
inside the <b>Data Fields</b>.</p><p><b>Encrypted FEK Length (4 bytes): </b>MUST be set to
the length of the data in the <b>Encrypted FEK</b> field, in bytes. It MUST be
a 32-bit unsigned integer in little-endian format.</p><p><b>Offset to Encrypted FEK (4 bytes): </b>MUST
contain the offset to the <b>Encrypted FEK</b> field, in bytes from the start
of this entry. It MUST be a 32-bit unsigned integer in little-endian format.
The <b>Encrypted FEK</b> MUST be completely contained inside the <b>Data</b>
fields.</p><p><b>Flags (4 bytes): </b>This field MUST indicate the
algorithm used to encrypt the <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_3a58e275-3d9f-4b66-8c8d-9808cd0cd8ff" data-linktype="relative-path">FEK</a>
in this key list entry. It MUST be a 32-bit unsigned integer in little-endian
format. EFSRPC servers SHOULD support all the values listed below, and MUST
ignore any unsupported values.</p><dl>
<dd>
<table><thead>
<tr>
<th>
<p>Value</p>
</th>
<th>
<p>Meaning</p>
</th>
</tr>
</thead><tbody><tr>
<td>0x00000000</td>
<td>The Encrypted FEK field is encrypted using RSA, with a public key belonging to a user or DRA.</td>
</tr><tr>
<td>0x00000001</td>
<td>The Encrypted FEK field is encrypted using AES-256, with a key that is obtained by signing the non-terminated Unicode string &#34;MICROSOFTE&#34; (20 bytes long) with the user&#39;s RSA and computing the SHA-256 hash of the result. This value is used when a user&#39;s private key is stored on a smart card to improve performance by minimizing the number of smart card accesses.&lt;10&gt;</td>
</tr></tbody></table>
</dd></dl><p><b>Data Fields (variable): </b>This field MUST
contain the following items, in any order, at the locations indicated by the
respective <b>Offset</b> fields previously listed. These items MUST be
completely contained inside this field and MUST NOT overlap each other. There
MUST NOT be unused areas within this field spanning more than 8 contiguous
bytes.</p><dl>
<dd>
<table>
<tbody><tr>
<th><p><br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>1<br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>2<br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>3<br/>0</p></th>
<th><p><br/>1</p></th>
</tr>
<tr>
<td colspan="32">Public Key Information (variable)</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
<tr>
<td colspan="32">Encrypted FEK (variable)</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
</tbody></table>
</dd>
<dd>
<p><b>Public Key Information
(variable): </b>This field MUST contain information about the <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_2069b65d-b546-4198-abfd-768badc2258e" data-linktype="relative-path">X.509</a> <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_7a0f4b71-23ba-434f-b781-28053ed64879" data-linktype="relative-path">certificate</a> that contains
the RSA public key, which is used to encrypt the <b>Encrypted FEK</b> field. It
MUST be formatted as specified in section <a href="db88e723-1ff7-4351-a518-e1c60ee391a7" data-linktype="relative-path">2.2.2.1.3</a>.</p>
</dd>
<dd>
<p><b>Encrypted FEK (variable):
</b>This field MUST contain information about the FEK, encrypted as indicated
by the contents of the <b>Flags</b> field. It MUST be formatted as specified in
section <a href="00933615-c9cf-4d51-9d9a-bb3fb33a3560" data-linktype="relative-path">2.2.2.1.5</a>.</p>
</dd></dl></div>
@@ -0,0 +1,67 @@
<div class="content" name="Fek_Info" uuid="ff8802e8-6e1d-41fc-904e-b1f01212cf9b"><p> The Fek Info datum encapsulates the algorithm ID (<a href="4cc8e6ae-99aa-483e-99c1-ab4c0ee46294" data-linktype="relative-path">ALG_ID</a>) used for the FEK,
the encrypted FEK, and the File IV. The FEK and File IV are both protected
using <a href="230807ac-20be-494f-86e3-4c8ac23ea584#gt_21edac94-99d0-44cb-bc1a-3416d8fc618e" data-linktype="relative-path">advanced encryption
standard (AES)</a> keywrap, with the FMK as the wrapping key.</p><table>
<tbody><tr>
<th><p><br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>1<br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>2<br/>0</p></th>
<th><p><br/>1</p></th>
<th><p><br/>2</p></th>
<th><p><br/>3</p></th>
<th><p><br/>4</p></th>
<th><p><br/>5</p></th>
<th><p><br/>6</p></th>
<th><p><br/>7</p></th>
<th><p><br/>8</p></th>
<th><p><br/>9</p></th>
<th><p>3<br/>0</p></th>
<th><p><br/>1</p></th>
</tr>
<tr>
<td colspan="32">EFSX_Datum</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
<tr>
<td colspan="32">AlgorithmID</td>
</tr>
<tr>
<td colspan="32">Data_Fields (variable)</td>
</tr>
<tr>
<td colspan="32">...</td>
</tr>
</tbody></table><p><b>EFSX_Datum (8 bytes): </b>MUST be formatted as
specified in section <a href="1d2fa232-d557-43fe-95e3-2d4ced7f7934" data-linktype="relative-path">2.2.2.2.2</a>.
The datum <b>Type</b> MUST be EFSX_TYPE_FEK_INFO (0x0006). The datum <b>Flags</b>
SHOULD include 0x0002, indicating a complex datum.</p><p><b>AlgorithmID (4 bytes): </b>The symmetric
cryptographic algorithm associated with this key. It MUST be a 32-bit unsigned
integer in little-endian format. Possible values are specified in section
2.2.13.</p><p><b>Data_Fields (variable): </b>This field contains
any number of nested EFSX_Datum structures. The nested datum structures MUST
NOT overlap, and MUST be entirely contained within the Fek Info datum. This
field MUST contain at least two datum structures of type EFSX_TYPE_BLOB
(0x0001). These blobs MUST have <b>Role</b> fields set to 0x000a (for the
encrypted FEK) and 0x000b (for the encrypted File IV), respectively. The <b>BlobType</b>
for these blobs MUST be 0x0004, indicating that the blob data contains a key
wrapped with an AES 256 key encryption key, as defined in <a href="https://go.microsoft.com/fwlink/?LinkId=131784" data-linktype="external">[RFC3394]</a>.</p></div>
@@ -0,0 +1,342 @@
{
"Abstract data model": {
"Abstract data model": "2425f825-aa14-4895-a159-4122927dec7c"
},
"Access to this page requires authorization. You can try signing in or changing directories.": {
"signing in": "#"
},
"Applicability": {
"Applicability": "a60402ce-6bed-496b-960a-3b28631fa4c5"
},
"Application Requests for a User-Certificate Binding": {
"Application Requests for a User-Certificate Binding": "acca9fee-57f9-4178-9515-0f2f6bd84cdd"
},
"Application Requests for a User-Certificate Binding method": {
"Application Requests for a User-Certificate Binding method": "acca9fee-57f9-4178-9515-0f2f6bd84cdd"
},
"Blob_Datum packet": {
"Blob_Datum packet": "b5a69be6-4759-4dfb-9e66-b37dfcd8529e"
},
"CERTIFICATE_DATA packet": {
"CERTIFICATE_DATA packet": "066d0c3d-182c-4730-a005-dbf8990c9fbb"
},
"Capability negotiation": {
"Capability negotiation": "7ab6ddec-9552-4e20-9f3e-e72e81495afe"
},
"Change tracking": {
"Change tracking": "b6bf906d-6309-415f-83cc-31d89b400fbb"
},
"Common data types": {
"Common data types": "cd6a287a-2d22-40d2-848d-e478ea323251"
},
"DATA_SEGMENT_ENCRYPTION_HEADER packet": {
"DATA_SEGMENT_ENCRYPTION_HEADER packet": "a38459f2-40e9-418d-866c-d33789886a91"
},
"Data model - abstract": {
"Data model - abstract": "2425f825-aa14-4895-a159-4122927dec7c"
},
"Data types": {
"Data types": "cd6a287a-2d22-40d2-848d-e478ea323251"
},
"Descriptor_Datum packet": {
"Descriptor_Datum packet": "2527501c-7230-4d4c-a0b3-2a1841634a86"
},
"EFSRPC Interface": {
"EFSRPC Interface": "403c7ae0-1a3a-4e96-8efc-54e79a2cc451"
},
"EFSRPC Interface method": {
"EFSRPC Interface method": "403c7ae0-1a3a-4e96-8efc-54e79a2cc451"
},
"EFSRPC_METADATA_V1 packet": {
"EFSRPC_METADATA_V1 packet": "625335e5-a423-4d1c-be51-c696c32aa2eb"
},
"EFSX_Datum packet": {
"EFSX_Datum packet": "1d2fa232-d557-43fe-95e3-2d4ced7f7934"
},
"EFS_CERTIFICATE_BLOB structure": {
"EFS_CERTIFICATE_BLOB structure": "ecaf8957-7c32-4039-9392-0f8db7eb2623"
},
"EFS_COMPATIBILITY_INFO structure": {
"EFS_COMPATIBILITY_INFO structure": "08ad49d7-29e4-4c50-b2c1-8c21df94f947"
},
"EFS_DECRYPTION_STATUS_INFO structure": {
"EFS_DECRYPTION_STATUS_INFO structure": "9d10b7b1-cc92-404e-a589-640193cc0681"
},
"EFS_ENCRYPTION_STATUS_INFO structure": {
"EFS_ENCRYPTION_STATUS_INFO structure": "bc8eef94-813a-4ff0-ad75-4614e992b2ca"
},
"EFS_HASH_BLOB structure": {
"EFS_HASH_BLOB structure": "242d857f-ac8e-4cc8-b5e4-9314a942f45e"
},
"EFS_KEY_INFO structure": {
"EFS_KEY_INFO structure": "49a8335f-3136-4059-9deb-9574d5ed5c86"
},
"EFS_RPC_BLOB structure": {
"EFS_RPC_BLOB structure": "0b9b7b7e-9491-47eb-b057-c94bd0193a13"
},
"ENCRYPTED_FILE_METADATA_SIGNATURE structure": {
"ENCRYPTED_FILE_METADATA_SIGNATURE structure": "4c2748b2-7e16-4e9f-9bac-311902d2c0cb"
},
"ENCRYPTION_CERTIFICATE structure (section 2.2.8, section 2.2.19)": {
"section 2.2.19": "5b598190-e3c6-4fa9-901c-9b59c9c020bd",
"section 2.2.8": "6e0da5b4-1d90-45b1-82df-8c64cf6bbc9e"
},
"ENCRYPTION_CERTIFICATE_HASH structure": {
"ENCRYPTION_CERTIFICATE_HASH structure": "3a7e7151-edcb-4b32-a119-35cdce1584c0"
},
"ENCRYPTION_CERTIFICATE_HASH_LIST structure": {
"ENCRYPTION_CERTIFICATE_HASH_LIST structure": "2718804c-6ab9-45fd-98cf-541bc3b6bc75"
},
"ENCRYPTION_CERTIFICATE_LIST structure (section 2.2.9, section 2.2.20)": {
"section 2.2.20": "28da7f90-16c8-4306-ae62-115c8f5e2a09",
"section 2.2.9": "d5e14019-e104-4ac1-abb9-525ec4f716a7"
},
"EfsRpcAddUsersToFile method": {
"EfsRpcAddUsersToFile method": "afd56d24-3732-4477-b5cf-44cc33848d85"
},
"EfsRpcAddUsersToFileEx method": {
"EfsRpcAddUsersToFileEx method": "d36df703-edc9-4482-87b7-d05c7783d65e"
},
"EfsRpcCloseRaw method": {
"EfsRpcCloseRaw method": "c5da8aa7-fe38-4940-8d40-2cebbd887cba"
},
"EfsRpcDecryptFileSrv method": {
"EfsRpcDecryptFileSrv method": "043715de-caee-402a-a61b-921743337e78"
},
"EfsRpcDuplicateEncryptionInfoFile method": {
"EfsRpcDuplicateEncryptionInfoFile method": "b39ec3e2-d3f0-4934-925e-74032365f9d2"
},
"EfsRpcEncryptFileSrv method (section 3.1.4.2.5, section 3.1.4.2.19)": {
"section 3.1.4.2.19": "366bb217-dad6-407d-9205-88e798713494",
"section 3.1.4.2.5": "0d599976-758c-4dbd-ac8c-c9db2a922d76"
},
"EfsRpcFileKeyInfo method": {
"EfsRpcFileKeyInfo method": "6813bfa8-1538-4c5f-982a-ad58caff3c1c"
},
"EfsRpcFileKeyInfoEx method": {
"EfsRpcFileKeyInfoEx method": "d0da10ab-3139-4d67-a66c-ea6eb497118d"
},
"EfsRpcFlushEfsCache method": {
"EfsRpcFlushEfsCache method": "a7e37233-b684-4c3f-905b-81c2e04482f1"
},
"EfsRpcGetEncryptedFileMetadata method": {
"EfsRpcGetEncryptedFileMetadata method": "5cb4e26d-5632-4048-8b2d-f661f8e8ee6b"
},
"EfsRpcNotSupported method": {
"EfsRpcNotSupported method": "473813b6-8290-430c-8124-3ee31c7c9ec5"
},
"EfsRpcOpenFileRaw method": {
"EfsRpcOpenFileRaw method": "ccc4fb75-1c86-41d7-bbc4-b278ec13bfb8"
},
"EfsRpcQueryRecoveryAgents method": {
"EfsRpcQueryRecoveryAgents method": "cf759c00-1b90-4c33-9ace-f51c20149cea"
},
"EfsRpcQueryUsersOnFile method (section 3.1.4.2.7, section 3.1.4.2.20, section 7)": {
"section 3.1.4.2.20": "ce7a5c85-9358-43a3-afd2-173a666cd407",
"section 3.1.4.2.7": "a058dc6c-bb7e-491c-9143-a5cb1f7e7cea",
"section 7": "cecd911d-7105-45cc-a7c8-348335d6f03f"
},
"EfsRpcReadFileRaw method": {
"EfsRpcReadFileRaw method": "a3a6d95f-ebd5-4a08-9d19-6b6c1b7d41f6"
},
"EfsRpcRemoveUsersFromFile method": {
"EfsRpcRemoveUsersFromFile method": "28609dad-5fa5-4af9-9382-18d40e3e9dec"
},
"EfsRpcSetEncryptedFileMetadata method": {
"EfsRpcSetEncryptedFileMetadata method": "38a5a7d3-4d47-4075-b830-b657805f2e94"
},
"EfsRpcWriteFileRaw method": {
"EfsRpcWriteFileRaw method": "b4fa10e8-31bb-4dd4-87af-1c4a3dedf417"
},
"Examples": {
"Examples": "91dc53cc-e2c1-4340-baec-541b9c03dbc0"
},
"Extended Header packet": {
"Extended Header packet": "9f6beece-d6c3-483f-a969-5af841b88f1e"
},
"FEK packet": {
"FEK packet": "00933615-c9cf-4d51-9d9a-bb3fb33a3560"
},
"Fek_Info packet": {
"Fek_Info packet": "ff8802e8-6e1d-41fc-904e-b1f01212cf9b"
},
"Fields - vendor-extensible": {
"Fields - vendor-extensible": "7a28ccb2-3d5d-4333-822d-f68bc72fe369"
},
"Full IDL": {
"Full IDL": "4a25b8e1-fd90-41b6-9301-62ed71334436"
},
"Glossary": {
"Glossary": "230807ac-20be-494f-86e3-4c8ac23ea584"
},
"IDL": {
"IDL": "4a25b8e1-fd90-41b6-9301-62ed71334436"
},
"Identifiers": {
"Identifiers": "9db7433f-be13-4605-993f-3695a2d2916e"
},
"Implementer - security considerations": {
"Implementer - security considerations": "31248846-cafe-4dda-95fb-7ef2acfdf0b3"
},
"Implementer considerations - security": {
"Implementer considerations - security": "31248846-cafe-4dda-95fb-7ef2acfdf0b3"
},
"Index of security parameters (section 5.2, section 6)": {
"section 5.2": "9e6e95cb-e945-455b-9366-9e7d5629a784",
"section 6": "4a25b8e1-fd90-41b6-9301-62ed71334436"
},
"Informative references": {
"Informative references": "09f9f2f3-b0d2-4425-88c9-773b77d99e28"
},
"Initialization": {
"Initialization": "0dfd46a6-4326-4f37-8ecf-0e8aedaafa8c"
},
"Introduction": {
"Introduction": "82543317-ac9c-4340-b6a6-8cd5e6ad8215"
},
"KEY_LIST packet": {
"KEY_LIST packet": "0e9d5482-59c7-4cd3-a439-603f9d154963"
},
"KEY_LIST_ENTRY packet": {
"KEY_LIST_ENTRY packet": "f8c3837c-8617-4346-b188-989933705a40"
},
"Local events": {
"Local events": "acd46ee4-c3e0-4fa7-add8-1132646170e1"
},
"MARSHALED_STREAM packet": {
"MARSHALED_STREAM packet": "053f87fb-4896-4307-8ece-f23dc8e9762d"
},
"Message processing": {
"Message processing": "403c7ae0-1a3a-4e96-8efc-54e79a2cc451"
},
"Normative references": {
"Normative references": "9f1690ef-c41b-47c5-b92a-92b82d42ebae"
},
"Overview (synopsis)": {
"Overview (synopsis)": "4892c610-4595-4fba-a67f-a2d26b9b6dcd"
},
"PEFS_RPC_BLOB": {
"PEFS_RPC_BLOB": "0b9b7b7e-9491-47eb-b057-c94bd0193a13"
},
"Parameters - security index": {
"Parameters - security index": "9e6e95cb-e945-455b-9366-9e7d5629a784"
},
"Parameters index - security": {
"Parameters index - security": "4a25b8e1-fd90-41b6-9301-62ed71334436"
},
"Preconditions": {
"Preconditions": "c312f3b1-fcf0-4d3a-8ff3-ed1dbd8c2b66"
},
"Prerequisites": {
"Prerequisites": "c312f3b1-fcf0-4d3a-8ff3-ed1dbd8c2b66"
},
"Product behavior": {
"Product behavior": "cecd911d-7105-45cc-a7c8-348335d6f03f"
},
"Protector_Info_Datum packet": {
"Protector_Info_Datum packet": "4aae68f5-a2c0-4c6f-90fd-a268d52ef5f3"
},
"Protector_List packet": {
"Protector_List packet": "8bef7919-5a88-44a8-9d03-72c58a14f63f"
},
"Protector_List_Entry packet": {
"Protector_List_Entry packet": "8593a473-b726-4a19-9291-b8669b535304"
},
"Public_Key_Information packet": {
"Public_Key_Information packet": "db88e723-1ff7-4351-a518-e1c60ee391a7"
},
"RAW_DATA packet": {
"RAW_DATA packet": "e67520ea-0cb6-4349-bbe5-427a644d9492"
},
"Raw data format": {
"Raw data format": "e67520ea-0cb6-4349-bbe5-427a644d9492"
},
"References": {
"References": "b5d79d42-2164-4e0e-913b-2bd3d50a5e36"
},
"Relationship to other protocols": {
"Relationship to other protocols": "853d7713-6620-4caa-8764-dca9580997d7"
},
"STREAM_DATA_SEGMENT packet": {
"STREAM_DATA_SEGMENT packet": "5464320a-f822-4cf8-9fa2-a8bd11bcc4e1"
},
"Sequencing rules": {
"Sequencing rules": "403c7ae0-1a3a-4e96-8efc-54e79a2cc451"
},
"Standards assignments": {
"Standards assignments": "1baaad2f-7a84-4238-b113-f32827a39cd2"
},
"TS_COMPDESK_REDIRSURF_ASSOC_LSURFACE packet (section 2.2.2.2.7, section 2.2.2.2.9)": {
"section 2.2.2.2.7": "c99f33a8-daf6-40ee-af64-1bad104f03d0",
"section 2.2.2.2.9": "5431ac4c-dd3a-43ee-8934-ee4eeda1efea"
},
"Timer events": {
"Timer events": "658fdcdb-9029-491a-a92b-7bfb9491fb7e"
},
"Timers": {
"Timers": "1f4ec298-edaa-451d-9d0e-670fdb0982d4"
},
"Tracking changes": {
"Tracking changes": "b6bf906d-6309-415f-83cc-31d89b400fbb"
},
"Transport": {
"Transport": "ab3c0be4-5b55-4a08-b198-f17170100be6"
},
"Vendor-extensible fields": {
"Vendor-extensible fields": "7a28ccb2-3d5d-4333-822d-f68bc72fe369"
},
"Versioning": {
"Versioning": "7ab6ddec-9552-4e20-9f3e-e72e81495afe"
},
"abstract data model": {
"abstract data model": "2425f825-aa14-4895-a159-4122927dec7c"
},
"common - overview": {
"common - overview": "cd6a287a-2d22-40d2-848d-e478ea323251"
},
"common data types": {
"common data types": "cd6a287a-2d22-40d2-848d-e478ea323251"
},
"implementer considerations": {
"implementer considerations": "31248846-cafe-4dda-95fb-7ef2acfdf0b3"
},
"informative": {
"informative": "09f9f2f3-b0d2-4425-88c9-773b77d99e28"
},
"initialization": {
"initialization": "0dfd46a6-4326-4f37-8ecf-0e8aedaafa8c"
},
"local - server": {
"local - server": "acd46ee4-c3e0-4fa7-add8-1132646170e1"
},
"local events": {
"local events": "acd46ee4-c3e0-4fa7-add8-1132646170e1"
},
"normative": {
"normative": "9f1690ef-c41b-47c5-b92a-92b82d42ebae"
},
"overview": {
"overview": "7df28303-c0d2-4ba6-ab63-765056cec603"
},
"parameter index": {
"parameter index": "9e6e95cb-e945-455b-9366-9e7d5629a784"
},
"parameters index": {
"parameters index": "4a25b8e1-fd90-41b6-9301-62ed71334436"
},
"server": {
"server": "1f4ec298-edaa-451d-9d0e-670fdb0982d4"
},
"timer - server": {
"timer - server": "658fdcdb-9029-491a-a92b-7bfb9491fb7e"
},
"timer events": {
"timer events": "658fdcdb-9029-491a-a92b-7bfb9491fb7e"
},
"timers": {
"timers": "1f4ec298-edaa-451d-9d0e-670fdb0982d4"
},
"transport": {
"transport": "ab3c0be4-5b55-4a08-b198-f17170100be6"
}
}
+2 -2
View File
@@ -1,3 +1,5 @@
// Code generated by github.com/oiweiwei/midl-gen-go. DO NOT EDIT.
// The efsr package implements the EFSR client protocol.
//
// # Introduction
@@ -148,7 +150,6 @@ import (
"unicode/utf16"
dcerpc "github.com/oiweiwei/go-msrpc/dcerpc"
errors "github.com/oiweiwei/go-msrpc/dcerpc/errors"
uuid "github.com/oiweiwei/go-msrpc/midl/uuid"
ndr "github.com/oiweiwei/go-msrpc/ndr"
)
@@ -161,7 +162,6 @@ var (
_ = ndr.ZeroString
_ = (*uuid.UUID)(nil)
_ = (*dcerpc.SyntaxID)(nil)
_ = (*errors.Error)(nil)
)
var (
+30 -2
View File
@@ -1,3 +1,5 @@
// Code generated by github.com/oiweiwei/midl-gen-go. DO NOT EDIT.
package efsrpc
import (
@@ -7,7 +9,6 @@ import (
"unicode/utf16"
dcerpc "github.com/oiweiwei/go-msrpc/dcerpc"
errors "github.com/oiweiwei/go-msrpc/dcerpc/errors"
uuid "github.com/oiweiwei/go-msrpc/midl/uuid"
ndr "github.com/oiweiwei/go-msrpc/ndr"
)
@@ -20,7 +21,6 @@ var (
_ = ndr.ZeroString
_ = (*uuid.UUID)(nil)
_ = (*dcerpc.SyntaxID)(nil)
_ = (*errors.Error)(nil)
)
// efsrpc server interface.
@@ -145,6 +145,14 @@ type EfsrpcServer interface {
//
// Return Values: The server MUST return 0 if it successfully processes the message
// received from the client. The server MUST return a nonzero value if processing fails.
//
// If no object exists on the server with the specified name, or if the object exists
// and is not encrypted, the server MUST return a nonzero value. Otherwise, the server
// MUST read the object's EFSRPC Metadata and return a list of the hashes of all the
// DRA certificates that have access to the object in the RecoveryAgents parameter.
// The server MUST NOT include any certificates that were not added by virtue of being
// defined as DRAs in administrative policy. If no DRAs are defined on the object, the
// call MUST return success and this list MUST be empty.
QueryRecoveryAgents(context.Context, *QueryRecoveryAgentsRequest) (*QueryRecoveryAgentsResponse, error)
// The EfsRpcRemoveUsersFromFile method is used to revoke a user's access to an encrypted
@@ -154,6 +162,15 @@ type EfsrpcServer interface {
// Return Values: The server MUST return 0 if it successfully processes the message
// received from the client. The server MUST return a nonzero value if processing fails.
//
// If no object exists on the server with the specified name, or if the object exists
// and is not encrypted, the server MUST return a nonzero value. The server SHOULD verify
// that the calling user is authorized to access the object, SHOULD verify that the
// calling user possesses a private key corresponding to a user certificate present
// in the EFSRPC Metadata for the object, and MUST return a nonzero value if this verification
// fails. If the calling user is authorized to access the object and the set of user
// certificates on the object contains only one entry, the server MUST return a nonzero
// value.
//
// If none of the preceding errors occur, the server MUST remove the parts of the object's
// EFSRPC Metadata that refer to the user certificates listed in the Users structure.
RemoveUsersFromFile(context.Context, *RemoveUsersFromFileRequest) (*RemoveUsersFromFileResponse, error)
@@ -218,6 +235,10 @@ type EfsrpcServer interface {
// the KeyInfo parameter, which provides a hint to the client what error code would
// be returned if decryption were attempted on this object without any further user
// interaction or higher-level events.
//
// If the value of the InfoClass parameter is equal to CHECK_COMPATIBILITY_INFO, the
// server MUST return an EFS_COMPATIBILITY_INFO structure in the KeyInfo parameter,
// which provides the EFSVersion of the EFSRPC metadata associated with the file.
FileKeyInfo(context.Context, *FileKeyInfoRequest) (*FileKeyInfoResponse, error)
// The EfsRpcDuplicateEncryptionInfoFile method is used to duplicate the EFSRPC Metadata
@@ -231,6 +252,9 @@ type EfsrpcServer interface {
// If no object exists on the server with the name specified in the SrcFileName parameter,
// or if it exists and is not encrypted, the server MUST return a nonzero value.
//
// If an encrypted object exists with the name specified in the SrcFileName and dwCreationDisposition
// parameters is equal to CREATE_NEW, then:
//
// * If an object exists with the name specified in the DestFileName parameter, the
// server MUST return a nonzero value.
//
@@ -289,6 +313,10 @@ type EfsrpcServer interface {
// calling user does not have the ability to decrypt the object, the server MUST return
// a nonzero value.
//
// If the EFSRPC_ADDUSERFLAG_REPLACE_DDF flag is set in the dwFlags parameter, and the
// user certificate in the EncryptionCertificates parameter already has access to the
// object, then the server MUST return a zero value.
//
// If the EFSRPC_ADDUSERFLAG_ADD_POLICY_KEYTYPE flag is specified in the dwFlags parameter,
// then for each certificate specified in the EncryptionCertificates parameter, the
// server MUST check whether the private key for the certificate is stored on a smart
+315 -21
View File
@@ -1,3 +1,5 @@
// Code generated by github.com/oiweiwei/midl-gen-go. DO NOT EDIT.
package efsrpc
import (
@@ -7,7 +9,6 @@ import (
"unicode/utf16"
dcerpc "github.com/oiweiwei/go-msrpc/dcerpc"
errors "github.com/oiweiwei/go-msrpc/dcerpc/errors"
uuid "github.com/oiweiwei/go-msrpc/midl/uuid"
dcetypes "github.com/oiweiwei/go-msrpc/msrpc/dcetypes"
dtyp "github.com/oiweiwei/go-msrpc/msrpc/dtyp"
@@ -22,7 +23,6 @@ var (
_ = ndr.ZeroString
_ = (*uuid.UUID)(nil)
_ = (*dcerpc.SyntaxID)(nil)
_ = (*errors.Error)(nil)
_ = dcetypes.GoPackage
_ = dtyp.GoPackage
)
@@ -161,6 +161,14 @@ type EfsrpcClient interface {
//
// Return Values: The server MUST return 0 if it successfully processes the message
// received from the client. The server MUST return a nonzero value if processing fails.
//
// If no object exists on the server with the specified name, or if the object exists
// and is not encrypted, the server MUST return a nonzero value. Otherwise, the server
// MUST read the object's EFSRPC Metadata and return a list of the hashes of all the
// DRA certificates that have access to the object in the RecoveryAgents parameter.
// The server MUST NOT include any certificates that were not added by virtue of being
// defined as DRAs in administrative policy. If no DRAs are defined on the object, the
// call MUST return success and this list MUST be empty.
QueryRecoveryAgents(context.Context, *QueryRecoveryAgentsRequest, ...dcerpc.CallOption) (*QueryRecoveryAgentsResponse, error)
// The EfsRpcRemoveUsersFromFile method is used to revoke a user's access to an encrypted
@@ -170,6 +178,15 @@ type EfsrpcClient interface {
// Return Values: The server MUST return 0 if it successfully processes the message
// received from the client. The server MUST return a nonzero value if processing fails.
//
// If no object exists on the server with the specified name, or if the object exists
// and is not encrypted, the server MUST return a nonzero value. The server SHOULD verify
// that the calling user is authorized to access the object, SHOULD verify that the
// calling user possesses a private key corresponding to a user certificate present
// in the EFSRPC Metadata for the object, and MUST return a nonzero value if this verification
// fails. If the calling user is authorized to access the object and the set of user
// certificates on the object contains only one entry, the server MUST return a nonzero
// value.
//
// If none of the preceding errors occur, the server MUST remove the parts of the object's
// EFSRPC Metadata that refer to the user certificates listed in the Users structure.
RemoveUsersFromFile(context.Context, *RemoveUsersFromFileRequest, ...dcerpc.CallOption) (*RemoveUsersFromFileResponse, error)
@@ -234,6 +251,10 @@ type EfsrpcClient interface {
// the KeyInfo parameter, which provides a hint to the client what error code would
// be returned if decryption were attempted on this object without any further user
// interaction or higher-level events.
//
// If the value of the InfoClass parameter is equal to CHECK_COMPATIBILITY_INFO, the
// server MUST return an EFS_COMPATIBILITY_INFO structure in the KeyInfo parameter,
// which provides the EFSVersion of the EFSRPC metadata associated with the file.
FileKeyInfo(context.Context, *FileKeyInfoRequest, ...dcerpc.CallOption) (*FileKeyInfoResponse, error)
// The EfsRpcDuplicateEncryptionInfoFile method is used to duplicate the EFSRPC Metadata
@@ -247,6 +268,9 @@ type EfsrpcClient interface {
// If no object exists on the server with the name specified in the SrcFileName parameter,
// or if it exists and is not encrypted, the server MUST return a nonzero value.
//
// If an encrypted object exists with the name specified in the SrcFileName and dwCreationDisposition
// parameters is equal to CREATE_NEW, then:
//
// * If an object exists with the name specified in the DestFileName parameter, the
// server MUST return a nonzero value.
//
@@ -305,6 +329,10 @@ type EfsrpcClient interface {
// calling user does not have the ability to decrypt the object, the server MUST return
// a nonzero value.
//
// If the EFSRPC_ADDUSERFLAG_REPLACE_DDF flag is set in the dwFlags parameter, and the
// user certificate in the EncryptionCertificates parameter already has access to the
// object, then the server MUST return a zero value.
//
// If the EFSRPC_ADDUSERFLAG_ADD_POLICY_KEYTYPE flag is specified in the dwFlags parameter,
// then for each certificate specified in the EncryptionCertificates parameter, the
// server MUST check whether the private key for the certificate is stored on a smart
@@ -2037,7 +2065,7 @@ func (o *xxx_DefaultEfsrpcClient) OpenFileRaw(ctx context.Context, in *OpenFileR
out := &OpenFileRawResponse{}
out.xxx_FromOp(ctx, op)
if op.Return != int32(0) {
return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
return out, fmt.Errorf("%s: %w", op.OpName(), o.cc.Error(ctx, op.Return))
}
return out, nil
}
@@ -2050,7 +2078,7 @@ func (o *xxx_DefaultEfsrpcClient) ReadFileRaw(ctx context.Context, in *ReadFileR
out := &ReadFileRawResponse{}
out.xxx_FromOp(ctx, op)
if op.Return != int32(0) {
return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
return out, fmt.Errorf("%s: %w", op.OpName(), o.cc.Error(ctx, op.Return))
}
return out, nil
}
@@ -2063,7 +2091,7 @@ func (o *xxx_DefaultEfsrpcClient) WriteFileRaw(ctx context.Context, in *WriteFil
out := &WriteFileRawResponse{}
out.xxx_FromOp(ctx, op)
if op.Return != int32(0) {
return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
return out, fmt.Errorf("%s: %w", op.OpName(), o.cc.Error(ctx, op.Return))
}
return out, nil
}
@@ -2086,7 +2114,7 @@ func (o *xxx_DefaultEfsrpcClient) EncryptFileServer(ctx context.Context, in *Enc
out := &EncryptFileServerResponse{}
out.xxx_FromOp(ctx, op)
if op.Return != int32(0) {
return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
return out, fmt.Errorf("%s: %w", op.OpName(), o.cc.Error(ctx, op.Return))
}
return out, nil
}
@@ -2099,7 +2127,7 @@ func (o *xxx_DefaultEfsrpcClient) DecryptFileServer(ctx context.Context, in *Dec
out := &DecryptFileServerResponse{}
out.xxx_FromOp(ctx, op)
if op.Return != int32(0) {
return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
return out, fmt.Errorf("%s: %w", op.OpName(), o.cc.Error(ctx, op.Return))
}
return out, nil
}
@@ -2112,7 +2140,7 @@ func (o *xxx_DefaultEfsrpcClient) QueryUsersOnFile(ctx context.Context, in *Quer
out := &QueryUsersOnFileResponse{}
out.xxx_FromOp(ctx, op)
if op.Return != uint32(0) {
return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
return out, fmt.Errorf("%s: %w", op.OpName(), o.cc.Error(ctx, op.Return))
}
return out, nil
}
@@ -2125,7 +2153,7 @@ func (o *xxx_DefaultEfsrpcClient) QueryRecoveryAgents(ctx context.Context, in *Q
out := &QueryRecoveryAgentsResponse{}
out.xxx_FromOp(ctx, op)
if op.Return != uint32(0) {
return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
return out, fmt.Errorf("%s: %w", op.OpName(), o.cc.Error(ctx, op.Return))
}
return out, nil
}
@@ -2138,7 +2166,7 @@ func (o *xxx_DefaultEfsrpcClient) RemoveUsersFromFile(ctx context.Context, in *R
out := &RemoveUsersFromFileResponse{}
out.xxx_FromOp(ctx, op)
if op.Return != uint32(0) {
return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
return out, fmt.Errorf("%s: %w", op.OpName(), o.cc.Error(ctx, op.Return))
}
return out, nil
}
@@ -2151,7 +2179,7 @@ func (o *xxx_DefaultEfsrpcClient) AddUsersToFile(ctx context.Context, in *AddUse
out := &AddUsersToFileResponse{}
out.xxx_FromOp(ctx, op)
if op.Return != uint32(0) {
return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
return out, fmt.Errorf("%s: %w", op.OpName(), o.cc.Error(ctx, op.Return))
}
return out, nil
}
@@ -2164,7 +2192,7 @@ func (o *xxx_DefaultEfsrpcClient) NotSupported(ctx context.Context, in *NotSuppo
out := &NotSupportedResponse{}
out.xxx_FromOp(ctx, op)
if op.Return != uint32(0) {
return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
return out, fmt.Errorf("%s: %w", op.OpName(), o.cc.Error(ctx, op.Return))
}
return out, nil
}
@@ -2177,7 +2205,7 @@ func (o *xxx_DefaultEfsrpcClient) FileKeyInfo(ctx context.Context, in *FileKeyIn
out := &FileKeyInfoResponse{}
out.xxx_FromOp(ctx, op)
if op.Return != uint32(0) {
return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
return out, fmt.Errorf("%s: %w", op.OpName(), o.cc.Error(ctx, op.Return))
}
return out, nil
}
@@ -2190,7 +2218,7 @@ func (o *xxx_DefaultEfsrpcClient) DuplicateEncryptionInfoFile(ctx context.Contex
out := &DuplicateEncryptionInfoFileResponse{}
out.xxx_FromOp(ctx, op)
if op.Return != uint32(0) {
return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
return out, fmt.Errorf("%s: %w", op.OpName(), o.cc.Error(ctx, op.Return))
}
return out, nil
}
@@ -2203,7 +2231,7 @@ func (o *xxx_DefaultEfsrpcClient) AddUsersToFileEx(ctx context.Context, in *AddU
out := &AddUsersToFileExResponse{}
out.xxx_FromOp(ctx, op)
if op.Return != uint32(0) {
return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
return out, fmt.Errorf("%s: %w", op.OpName(), o.cc.Error(ctx, op.Return))
}
return out, nil
}
@@ -2216,7 +2244,7 @@ func (o *xxx_DefaultEfsrpcClient) FileKeyInfoEx(ctx context.Context, in *FileKey
out := &FileKeyInfoExResponse{}
out.xxx_FromOp(ctx, op)
if op.Return != uint32(0) {
return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
return out, fmt.Errorf("%s: %w", op.OpName(), o.cc.Error(ctx, op.Return))
}
return out, nil
}
@@ -2229,7 +2257,7 @@ func (o *xxx_DefaultEfsrpcClient) GetEncryptedFileMetadata(ctx context.Context,
out := &GetEncryptedFileMetadataResponse{}
out.xxx_FromOp(ctx, op)
if op.Return != uint32(0) {
return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
return out, fmt.Errorf("%s: %w", op.OpName(), o.cc.Error(ctx, op.Return))
}
return out, nil
}
@@ -2242,7 +2270,7 @@ func (o *xxx_DefaultEfsrpcClient) SetEncryptedFileMetadata(ctx context.Context,
out := &SetEncryptedFileMetadataResponse{}
out.xxx_FromOp(ctx, op)
if op.Return != uint32(0) {
return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
return out, fmt.Errorf("%s: %w", op.OpName(), o.cc.Error(ctx, op.Return))
}
return out, nil
}
@@ -2255,7 +2283,7 @@ func (o *xxx_DefaultEfsrpcClient) FlushEFSCache(ctx context.Context, in *FlushEF
out := &FlushEFSCacheResponse{}
out.xxx_FromOp(ctx, op)
if op.Return != uint32(0) {
return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
return out, fmt.Errorf("%s: %w", op.OpName(), o.cc.Error(ctx, op.Return))
}
return out, nil
}
@@ -2268,7 +2296,7 @@ func (o *xxx_DefaultEfsrpcClient) EncryptFileExServer(ctx context.Context, in *E
out := &EncryptFileExServerResponse{}
out.xxx_FromOp(ctx, op)
if op.Return != int32(0) {
return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
return out, fmt.Errorf("%s: %w", op.OpName(), o.cc.Error(ctx, op.Return))
}
return out, nil
}
@@ -2281,7 +2309,7 @@ func (o *xxx_DefaultEfsrpcClient) QueryProtectors(ctx context.Context, in *Query
out := &QueryProtectorsResponse{}
out.xxx_FromOp(ctx, op)
if op.Return != uint32(0) {
return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
return out, fmt.Errorf("%s: %w", op.OpName(), o.cc.Error(ctx, op.Return))
}
return out, nil
}
@@ -2310,8 +2338,10 @@ type xxx_OpenFileRawOperation struct {
Return int32 `idl:"name:Return" json:"return"`
}
// OpNum returns the operation number of EfsRpcOpenFileRaw operation.
func (o *xxx_OpenFileRawOperation) OpNum() int { return 0 }
// OpName returns the operation name of EfsRpcOpenFileRaw operation.
func (o *xxx_OpenFileRawOperation) OpName() string { return "/efsrpc/v1/EfsRpcOpenFileRaw" }
func (o *xxx_OpenFileRawOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
@@ -2479,6 +2509,17 @@ func (o *OpenFileRawRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) err
return nil
}
// MakeOpenFileRawRequest build a response structure from the given request structure.
func (o *OpenFileRawRequest) MakeResponse() *OpenFileRawResponse {
return &OpenFileRawResponse{}
}
// OpNum returns the operation number of EfsRpcOpenFileRaw operation.
func (o *OpenFileRawRequest) OpNum() int { return 0 }
// OpName returns the operation name of EfsRpcOpenFileRaw operation.
func (o *OpenFileRawRequest) OpName() string { return "/efsrpc/v1/EfsRpcOpenFileRaw" }
// OpenFileRawResponse structure represents the EfsRpcOpenFileRaw operation response
type OpenFileRawResponse struct {
// hContext: An implementation-specific context handle that is used in subsequent calls
@@ -2527,8 +2568,10 @@ type xxx_ReadFileRawOperation struct {
Return int32 `idl:"name:Return" json:"return"`
}
// OpNum returns the operation number of EfsRpcReadFileRaw operation.
func (o *xxx_ReadFileRawOperation) OpNum() int { return 1 }
// OpName returns the operation name of EfsRpcReadFileRaw operation.
func (o *xxx_ReadFileRawOperation) OpName() string { return "/efsrpc/v1/EfsRpcReadFileRaw" }
func (o *xxx_ReadFileRawOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
@@ -2714,6 +2757,17 @@ func (o *ReadFileRawRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) err
return nil
}
// MakeReadFileRawRequest build a response structure from the given request structure.
func (o *ReadFileRawRequest) MakeResponse() *ReadFileRawResponse {
return &ReadFileRawResponse{}
}
// OpNum returns the operation number of EfsRpcReadFileRaw operation.
func (o *ReadFileRawRequest) OpNum() int { return 1 }
// OpName returns the operation name of EfsRpcReadFileRaw operation.
func (o *ReadFileRawRequest) OpName() string { return "/efsrpc/v1/EfsRpcReadFileRaw" }
// ReadFileRawResponse structure represents the EfsRpcReadFileRaw operation response
type ReadFileRawResponse struct {
// EfsOutPipe: A pipe structure. The push procedure of this pipe will be called with
@@ -2762,8 +2816,10 @@ type xxx_WriteFileRawOperation struct {
Return int32 `idl:"name:Return" json:"return"`
}
// OpNum returns the operation number of EfsRpcWriteFileRaw operation.
func (o *xxx_WriteFileRawOperation) OpNum() int { return 2 }
// OpName returns the operation name of EfsRpcWriteFileRaw operation.
func (o *xxx_WriteFileRawOperation) OpName() string { return "/efsrpc/v1/EfsRpcWriteFileRaw" }
func (o *xxx_WriteFileRawOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
@@ -2944,6 +3000,17 @@ func (o *WriteFileRawRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) er
return nil
}
// MakeWriteFileRawRequest build a response structure from the given request structure.
func (o *WriteFileRawRequest) MakeResponse() *WriteFileRawResponse {
return &WriteFileRawResponse{}
}
// OpNum returns the operation number of EfsRpcWriteFileRaw operation.
func (o *WriteFileRawRequest) OpNum() int { return 2 }
// OpName returns the operation name of EfsRpcWriteFileRaw operation.
func (o *WriteFileRawRequest) OpName() string { return "/efsrpc/v1/EfsRpcWriteFileRaw" }
// WriteFileRawResponse structure represents the EfsRpcWriteFileRaw operation response
type WriteFileRawResponse struct {
// Return: The EfsRpcWriteFileRaw return value.
@@ -2984,8 +3051,10 @@ type xxx_CloseRawOperation struct {
Context *Context `idl:"name:hContext" json:"context"`
}
// OpNum returns the operation number of EfsRpcCloseRaw operation.
func (o *xxx_CloseRawOperation) OpNum() int { return 3 }
// OpName returns the operation name of EfsRpcCloseRaw operation.
func (o *xxx_CloseRawOperation) OpName() string { return "/efsrpc/v1/EfsRpcCloseRaw" }
func (o *xxx_CloseRawOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
@@ -3104,6 +3173,17 @@ func (o *CloseRawRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error
return nil
}
// MakeCloseRawRequest build a response structure from the given request structure.
func (o *CloseRawRequest) MakeResponse() *CloseRawResponse {
return &CloseRawResponse{}
}
// OpNum returns the operation number of EfsRpcCloseRaw operation.
func (o *CloseRawRequest) OpNum() int { return 3 }
// OpName returns the operation name of EfsRpcCloseRaw operation.
func (o *CloseRawRequest) OpName() string { return "/efsrpc/v1/EfsRpcCloseRaw" }
// CloseRawResponse structure represents the EfsRpcCloseRaw operation response
type CloseRawResponse struct {
Context *Context `idl:"name:hContext" json:"context"`
@@ -3144,8 +3224,10 @@ type xxx_EncryptFileServerOperation struct {
Return int32 `idl:"name:Return" json:"return"`
}
// OpNum returns the operation number of EfsRpcEncryptFileSrv operation.
func (o *xxx_EncryptFileServerOperation) OpNum() int { return 4 }
// OpName returns the operation name of EfsRpcEncryptFileSrv operation.
func (o *xxx_EncryptFileServerOperation) OpName() string { return "/efsrpc/v1/EfsRpcEncryptFileSrv" }
func (o *xxx_EncryptFileServerOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
@@ -3246,6 +3328,17 @@ func (o *EncryptFileServerRequest) UnmarshalNDR(ctx context.Context, r ndr.Reade
return nil
}
// MakeEncryptFileServerRequest build a response structure from the given request structure.
func (o *EncryptFileServerRequest) MakeResponse() *EncryptFileServerResponse {
return &EncryptFileServerResponse{}
}
// OpNum returns the operation number of EfsRpcEncryptFileSrv operation.
func (o *EncryptFileServerRequest) OpNum() int { return 4 }
// OpName returns the operation name of EfsRpcEncryptFileSrv operation.
func (o *EncryptFileServerRequest) OpName() string { return "/efsrpc/v1/EfsRpcEncryptFileSrv" }
// EncryptFileServerResponse structure represents the EfsRpcEncryptFileSrv operation response
type EncryptFileServerResponse struct {
// Return: The EfsRpcEncryptFileSrv return value.
@@ -3288,8 +3381,10 @@ type xxx_DecryptFileServerOperation struct {
Return int32 `idl:"name:Return" json:"return"`
}
// OpNum returns the operation number of EfsRpcDecryptFileSrv operation.
func (o *xxx_DecryptFileServerOperation) OpNum() int { return 5 }
// OpName returns the operation name of EfsRpcDecryptFileSrv operation.
func (o *xxx_DecryptFileServerOperation) OpName() string { return "/efsrpc/v1/EfsRpcDecryptFileSrv" }
func (o *xxx_DecryptFileServerOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
@@ -3408,6 +3503,17 @@ func (o *DecryptFileServerRequest) UnmarshalNDR(ctx context.Context, r ndr.Reade
return nil
}
// MakeDecryptFileServerRequest build a response structure from the given request structure.
func (o *DecryptFileServerRequest) MakeResponse() *DecryptFileServerResponse {
return &DecryptFileServerResponse{}
}
// OpNum returns the operation number of EfsRpcDecryptFileSrv operation.
func (o *DecryptFileServerRequest) OpNum() int { return 5 }
// OpName returns the operation name of EfsRpcDecryptFileSrv operation.
func (o *DecryptFileServerRequest) OpName() string { return "/efsrpc/v1/EfsRpcDecryptFileSrv" }
// DecryptFileServerResponse structure represents the EfsRpcDecryptFileSrv operation response
type DecryptFileServerResponse struct {
// Return: The EfsRpcDecryptFileSrv return value.
@@ -3450,8 +3556,10 @@ type xxx_QueryUsersOnFileOperation struct {
Return uint32 `idl:"name:Return" json:"return"`
}
// OpNum returns the operation number of EfsRpcQueryUsersOnFile operation.
func (o *xxx_QueryUsersOnFileOperation) OpNum() int { return 6 }
// OpName returns the operation name of EfsRpcQueryUsersOnFile operation.
func (o *xxx_QueryUsersOnFileOperation) OpName() string { return "/efsrpc/v1/EfsRpcQueryUsersOnFile" }
func (o *xxx_QueryUsersOnFileOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
@@ -3598,6 +3706,17 @@ func (o *QueryUsersOnFileRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader
return nil
}
// MakeQueryUsersOnFileRequest build a response structure from the given request structure.
func (o *QueryUsersOnFileRequest) MakeResponse() *QueryUsersOnFileResponse {
return &QueryUsersOnFileResponse{}
}
// OpNum returns the operation number of EfsRpcQueryUsersOnFile operation.
func (o *QueryUsersOnFileRequest) OpNum() int { return 6 }
// OpName returns the operation name of EfsRpcQueryUsersOnFile operation.
func (o *QueryUsersOnFileRequest) OpName() string { return "/efsrpc/v1/EfsRpcQueryUsersOnFile" }
// QueryUsersOnFileResponse structure represents the EfsRpcQueryUsersOnFile operation response
type QueryUsersOnFileResponse struct {
Users *EncryptionCertificateHashList `idl:"name:Users" json:"users"`
@@ -3643,8 +3762,10 @@ type xxx_QueryRecoveryAgentsOperation struct {
Return uint32 `idl:"name:Return" json:"return"`
}
// OpNum returns the operation number of EfsRpcQueryRecoveryAgents operation.
func (o *xxx_QueryRecoveryAgentsOperation) OpNum() int { return 7 }
// OpName returns the operation name of EfsRpcQueryRecoveryAgents operation.
func (o *xxx_QueryRecoveryAgentsOperation) OpName() string {
return "/efsrpc/v1/EfsRpcQueryRecoveryAgents"
}
@@ -3794,6 +3915,17 @@ func (o *QueryRecoveryAgentsRequest) UnmarshalNDR(ctx context.Context, r ndr.Rea
return nil
}
// MakeQueryRecoveryAgentsRequest build a response structure from the given request structure.
func (o *QueryRecoveryAgentsRequest) MakeResponse() *QueryRecoveryAgentsResponse {
return &QueryRecoveryAgentsResponse{}
}
// OpNum returns the operation number of EfsRpcQueryRecoveryAgents operation.
func (o *QueryRecoveryAgentsRequest) OpNum() int { return 7 }
// OpName returns the operation name of EfsRpcQueryRecoveryAgents operation.
func (o *QueryRecoveryAgentsRequest) OpName() string { return "/efsrpc/v1/EfsRpcQueryRecoveryAgents" }
// QueryRecoveryAgentsResponse structure represents the EfsRpcQueryRecoveryAgents operation response
type QueryRecoveryAgentsResponse struct {
// RecoveryAgents: A list of certificate hashes, represented by an ENCRYPTION_CERTIFICATE_HASH_LIST
@@ -3841,8 +3973,10 @@ type xxx_RemoveUsersFromFileOperation struct {
Return uint32 `idl:"name:Return" json:"return"`
}
// OpNum returns the operation number of EfsRpcRemoveUsersFromFile operation.
func (o *xxx_RemoveUsersFromFileOperation) OpNum() int { return 8 }
// OpName returns the operation name of EfsRpcRemoveUsersFromFile operation.
func (o *xxx_RemoveUsersFromFileOperation) OpName() string {
return "/efsrpc/v1/EfsRpcRemoveUsersFromFile"
}
@@ -3978,6 +4112,17 @@ func (o *RemoveUsersFromFileRequest) UnmarshalNDR(ctx context.Context, r ndr.Rea
return nil
}
// MakeRemoveUsersFromFileRequest build a response structure from the given request structure.
func (o *RemoveUsersFromFileRequest) MakeResponse() *RemoveUsersFromFileResponse {
return &RemoveUsersFromFileResponse{}
}
// OpNum returns the operation number of EfsRpcRemoveUsersFromFile operation.
func (o *RemoveUsersFromFileRequest) OpNum() int { return 8 }
// OpName returns the operation name of EfsRpcRemoveUsersFromFile operation.
func (o *RemoveUsersFromFileRequest) OpName() string { return "/efsrpc/v1/EfsRpcRemoveUsersFromFile" }
// RemoveUsersFromFileResponse structure represents the EfsRpcRemoveUsersFromFile operation response
type RemoveUsersFromFileResponse struct {
// Return: The EfsRpcRemoveUsersFromFile return value.
@@ -4020,8 +4165,10 @@ type xxx_AddUsersToFileOperation struct {
Return uint32 `idl:"name:Return" json:"return"`
}
// OpNum returns the operation number of EfsRpcAddUsersToFile operation.
func (o *xxx_AddUsersToFileOperation) OpNum() int { return 9 }
// OpName returns the operation name of EfsRpcAddUsersToFile operation.
func (o *xxx_AddUsersToFileOperation) OpName() string { return "/efsrpc/v1/EfsRpcAddUsersToFile" }
func (o *xxx_AddUsersToFileOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
@@ -4155,6 +4302,17 @@ func (o *AddUsersToFileRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader)
return nil
}
// MakeAddUsersToFileRequest build a response structure from the given request structure.
func (o *AddUsersToFileRequest) MakeResponse() *AddUsersToFileResponse {
return &AddUsersToFileResponse{}
}
// OpNum returns the operation number of EfsRpcAddUsersToFile operation.
func (o *AddUsersToFileRequest) OpNum() int { return 9 }
// OpName returns the operation name of EfsRpcAddUsersToFile operation.
func (o *AddUsersToFileRequest) OpName() string { return "/efsrpc/v1/EfsRpcAddUsersToFile" }
// AddUsersToFileResponse structure represents the EfsRpcAddUsersToFile operation response
type AddUsersToFileResponse struct {
// Return: The EfsRpcAddUsersToFile return value.
@@ -4201,8 +4359,10 @@ type xxx_NotSupportedOperation struct {
Return uint32 `idl:"name:Return" json:"return"`
}
// OpNum returns the operation number of EfsRpcNotSupported operation.
func (o *xxx_NotSupportedOperation) OpNum() int { return 11 }
// OpName returns the operation name of EfsRpcNotSupported operation.
func (o *xxx_NotSupportedOperation) OpName() string { return "/efsrpc/v1/EfsRpcNotSupported" }
func (o *xxx_NotSupportedOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
@@ -4397,6 +4557,17 @@ func (o *NotSupportedRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) er
return nil
}
// MakeNotSupportedRequest build a response structure from the given request structure.
func (o *NotSupportedRequest) MakeResponse() *NotSupportedResponse {
return &NotSupportedResponse{}
}
// OpNum returns the operation number of EfsRpcNotSupported operation.
func (o *NotSupportedRequest) OpNum() int { return 11 }
// OpName returns the operation name of EfsRpcNotSupported operation.
func (o *NotSupportedRequest) OpName() string { return "/efsrpc/v1/EfsRpcNotSupported" }
// NotSupportedResponse structure represents the EfsRpcNotSupported operation response
type NotSupportedResponse struct {
// Return: The EfsRpcNotSupported return value.
@@ -4440,8 +4611,10 @@ type xxx_FileKeyInfoOperation struct {
Return uint32 `idl:"name:Return" json:"return"`
}
// OpNum returns the operation number of EfsRpcFileKeyInfo operation.
func (o *xxx_FileKeyInfoOperation) OpNum() int { return 12 }
// OpName returns the operation name of EfsRpcFileKeyInfo operation.
func (o *xxx_FileKeyInfoOperation) OpName() string { return "/efsrpc/v1/EfsRpcFileKeyInfo" }
func (o *xxx_FileKeyInfoOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
@@ -4637,6 +4810,17 @@ func (o *FileKeyInfoRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) err
return nil
}
// MakeFileKeyInfoRequest build a response structure from the given request structure.
func (o *FileKeyInfoRequest) MakeResponse() *FileKeyInfoResponse {
return &FileKeyInfoResponse{}
}
// OpNum returns the operation number of EfsRpcFileKeyInfo operation.
func (o *FileKeyInfoRequest) OpNum() int { return 12 }
// OpName returns the operation name of EfsRpcFileKeyInfo operation.
func (o *FileKeyInfoRequest) OpName() string { return "/efsrpc/v1/EfsRpcFileKeyInfo" }
// FileKeyInfoResponse structure represents the EfsRpcFileKeyInfo operation response
type FileKeyInfoResponse struct {
// KeyInfo: Returned by the server, as previously specified.
@@ -4687,8 +4871,10 @@ type xxx_DuplicateEncryptionInfoFileOperation struct {
Return uint32 `idl:"name:Return" json:"return"`
}
// OpNum returns the operation number of EfsRpcDuplicateEncryptionInfoFile operation.
func (o *xxx_DuplicateEncryptionInfoFileOperation) OpNum() int { return 13 }
// OpName returns the operation name of EfsRpcDuplicateEncryptionInfoFile operation.
func (o *xxx_DuplicateEncryptionInfoFileOperation) OpName() string {
return "/efsrpc/v1/EfsRpcDuplicateEncryptionInfoFile"
}
@@ -4950,6 +5136,19 @@ func (o *DuplicateEncryptionInfoFileRequest) UnmarshalNDR(ctx context.Context, r
return nil
}
// MakeDuplicateEncryptionInfoFileRequest build a response structure from the given request structure.
func (o *DuplicateEncryptionInfoFileRequest) MakeResponse() *DuplicateEncryptionInfoFileResponse {
return &DuplicateEncryptionInfoFileResponse{}
}
// OpNum returns the operation number of EfsRpcDuplicateEncryptionInfoFile operation.
func (o *DuplicateEncryptionInfoFileRequest) OpNum() int { return 13 }
// OpName returns the operation name of EfsRpcDuplicateEncryptionInfoFile operation.
func (o *DuplicateEncryptionInfoFileRequest) OpName() string {
return "/efsrpc/v1/EfsRpcDuplicateEncryptionInfoFile"
}
// DuplicateEncryptionInfoFileResponse structure represents the EfsRpcDuplicateEncryptionInfoFile operation response
type DuplicateEncryptionInfoFileResponse struct {
// Return: The EfsRpcDuplicateEncryptionInfoFile return value.
@@ -4994,8 +5193,10 @@ type xxx_AddUsersToFileExOperation struct {
Return uint32 `idl:"name:Return" json:"return"`
}
// OpNum returns the operation number of EfsRpcAddUsersToFileEx operation.
func (o *xxx_AddUsersToFileExOperation) OpNum() int { return 15 }
// OpName returns the operation name of EfsRpcAddUsersToFileEx operation.
func (o *xxx_AddUsersToFileExOperation) OpName() string { return "/efsrpc/v1/EfsRpcAddUsersToFileEx" }
func (o *xxx_AddUsersToFileExOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
@@ -5190,6 +5391,17 @@ func (o *AddUsersToFileExRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader
return nil
}
// MakeAddUsersToFileExRequest build a response structure from the given request structure.
func (o *AddUsersToFileExRequest) MakeResponse() *AddUsersToFileExResponse {
return &AddUsersToFileExResponse{}
}
// OpNum returns the operation number of EfsRpcAddUsersToFileEx operation.
func (o *AddUsersToFileExRequest) OpNum() int { return 15 }
// OpName returns the operation name of EfsRpcAddUsersToFileEx operation.
func (o *AddUsersToFileExRequest) OpName() string { return "/efsrpc/v1/EfsRpcAddUsersToFileEx" }
// AddUsersToFileExResponse structure represents the EfsRpcAddUsersToFileEx operation response
type AddUsersToFileExResponse struct {
// Return: The EfsRpcAddUsersToFileEx return value.
@@ -5235,8 +5447,10 @@ type xxx_FileKeyInfoExOperation struct {
Return uint32 `idl:"name:Return" json:"return"`
}
// OpNum returns the operation number of EfsRpcFileKeyInfoEx operation.
func (o *xxx_FileKeyInfoExOperation) OpNum() int { return 16 }
// OpName returns the operation name of EfsRpcFileKeyInfoEx operation.
func (o *xxx_FileKeyInfoExOperation) OpName() string { return "/efsrpc/v1/EfsRpcFileKeyInfoEx" }
func (o *xxx_FileKeyInfoExOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
@@ -5449,6 +5663,17 @@ func (o *FileKeyInfoExRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) e
return nil
}
// MakeFileKeyInfoExRequest build a response structure from the given request structure.
func (o *FileKeyInfoExRequest) MakeResponse() *FileKeyInfoExResponse {
return &FileKeyInfoExResponse{}
}
// OpNum returns the operation number of EfsRpcFileKeyInfoEx operation.
func (o *FileKeyInfoExRequest) OpNum() int { return 16 }
// OpName returns the operation name of EfsRpcFileKeyInfoEx operation.
func (o *FileKeyInfoExRequest) OpName() string { return "/efsrpc/v1/EfsRpcFileKeyInfoEx" }
// FileKeyInfoExResponse structure represents the EfsRpcFileKeyInfoEx operation response
type FileKeyInfoExResponse struct {
// KeyInfo: The server SHOULD ignore this parameter.<53>
@@ -5495,8 +5720,10 @@ type xxx_GetEncryptedFileMetadataOperation struct {
Return uint32 `idl:"name:Return" json:"return"`
}
// OpNum returns the operation number of EfsRpcGetEncryptedFileMetadata operation.
func (o *xxx_GetEncryptedFileMetadataOperation) OpNum() int { return 18 }
// OpName returns the operation name of EfsRpcGetEncryptedFileMetadata operation.
func (o *xxx_GetEncryptedFileMetadataOperation) OpName() string {
return "/efsrpc/v1/EfsRpcGetEncryptedFileMetadata"
}
@@ -5646,6 +5873,19 @@ func (o *GetEncryptedFileMetadataRequest) UnmarshalNDR(ctx context.Context, r nd
return nil
}
// MakeGetEncryptedFileMetadataRequest build a response structure from the given request structure.
func (o *GetEncryptedFileMetadataRequest) MakeResponse() *GetEncryptedFileMetadataResponse {
return &GetEncryptedFileMetadataResponse{}
}
// OpNum returns the operation number of EfsRpcGetEncryptedFileMetadata operation.
func (o *GetEncryptedFileMetadataRequest) OpNum() int { return 18 }
// OpName returns the operation name of EfsRpcGetEncryptedFileMetadata operation.
func (o *GetEncryptedFileMetadataRequest) OpName() string {
return "/efsrpc/v1/EfsRpcGetEncryptedFileMetadata"
}
// GetEncryptedFileMetadataResponse structure represents the EfsRpcGetEncryptedFileMetadata operation response
type GetEncryptedFileMetadataResponse struct {
// EfsStreamBlob: The server SHOULD ignore this parameter.<56>
@@ -5694,8 +5934,10 @@ type xxx_SetEncryptedFileMetadataOperation struct {
Return uint32 `idl:"name:Return" json:"return"`
}
// OpNum returns the operation number of EfsRpcSetEncryptedFileMetadata operation.
func (o *xxx_SetEncryptedFileMetadataOperation) OpNum() int { return 19 }
// OpName returns the operation name of EfsRpcSetEncryptedFileMetadata operation.
func (o *xxx_SetEncryptedFileMetadataOperation) OpName() string {
return "/efsrpc/v1/EfsRpcSetEncryptedFileMetadata"
}
@@ -5933,6 +6175,19 @@ func (o *SetEncryptedFileMetadataRequest) UnmarshalNDR(ctx context.Context, r nd
return nil
}
// MakeSetEncryptedFileMetadataRequest build a response structure from the given request structure.
func (o *SetEncryptedFileMetadataRequest) MakeResponse() *SetEncryptedFileMetadataResponse {
return &SetEncryptedFileMetadataResponse{}
}
// OpNum returns the operation number of EfsRpcSetEncryptedFileMetadata operation.
func (o *SetEncryptedFileMetadataRequest) OpNum() int { return 19 }
// OpName returns the operation name of EfsRpcSetEncryptedFileMetadata operation.
func (o *SetEncryptedFileMetadataRequest) OpName() string {
return "/efsrpc/v1/EfsRpcSetEncryptedFileMetadata"
}
// SetEncryptedFileMetadataResponse structure represents the EfsRpcSetEncryptedFileMetadata operation response
type SetEncryptedFileMetadataResponse struct {
// Return: The EfsRpcSetEncryptedFileMetadata return value.
@@ -5973,8 +6228,10 @@ type xxx_FlushEFSCacheOperation struct {
Return uint32 `idl:"name:Return" json:"return"`
}
// OpNum returns the operation number of EfsRpcFlushEfsCache operation.
func (o *xxx_FlushEFSCacheOperation) OpNum() int { return 20 }
// OpName returns the operation name of EfsRpcFlushEfsCache operation.
func (o *xxx_FlushEFSCacheOperation) OpName() string { return "/efsrpc/v1/EfsRpcFlushEfsCache" }
func (o *xxx_FlushEFSCacheOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
@@ -6060,6 +6317,17 @@ func (o *FlushEFSCacheRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) e
return nil
}
// MakeFlushEFSCacheRequest build a response structure from the given request structure.
func (o *FlushEFSCacheRequest) MakeResponse() *FlushEFSCacheResponse {
return &FlushEFSCacheResponse{}
}
// OpNum returns the operation number of EfsRpcFlushEfsCache operation.
func (o *FlushEFSCacheRequest) OpNum() int { return 20 }
// OpName returns the operation name of EfsRpcFlushEfsCache operation.
func (o *FlushEFSCacheRequest) OpName() string { return "/efsrpc/v1/EfsRpcFlushEfsCache" }
// FlushEFSCacheResponse structure represents the EfsRpcFlushEfsCache operation response
type FlushEFSCacheResponse struct {
// Return: The EfsRpcFlushEfsCache return value.
@@ -6103,8 +6371,10 @@ type xxx_EncryptFileExServerOperation struct {
Return int32 `idl:"name:Return" json:"return"`
}
// OpNum returns the operation number of EfsRpcEncryptFileExSrv operation.
func (o *xxx_EncryptFileExServerOperation) OpNum() int { return 21 }
// OpName returns the operation name of EfsRpcEncryptFileExSrv operation.
func (o *xxx_EncryptFileExServerOperation) OpName() string {
return "/efsrpc/v1/EfsRpcEncryptFileExSrv"
}
@@ -6262,6 +6532,17 @@ func (o *EncryptFileExServerRequest) UnmarshalNDR(ctx context.Context, r ndr.Rea
return nil
}
// MakeEncryptFileExServerRequest build a response structure from the given request structure.
func (o *EncryptFileExServerRequest) MakeResponse() *EncryptFileExServerResponse {
return &EncryptFileExServerResponse{}
}
// OpNum returns the operation number of EfsRpcEncryptFileExSrv operation.
func (o *EncryptFileExServerRequest) OpNum() int { return 21 }
// OpName returns the operation name of EfsRpcEncryptFileExSrv operation.
func (o *EncryptFileExServerRequest) OpName() string { return "/efsrpc/v1/EfsRpcEncryptFileExSrv" }
// EncryptFileExServerResponse structure represents the EfsRpcEncryptFileExSrv operation response
type EncryptFileExServerResponse struct {
// Return: The EfsRpcEncryptFileExSrv return value.
@@ -6304,8 +6585,10 @@ type xxx_QueryProtectorsOperation struct {
Return uint32 `idl:"name:Return" json:"return"`
}
// OpNum returns the operation number of EfsRpcQueryProtectors operation.
func (o *xxx_QueryProtectorsOperation) OpNum() int { return 22 }
// OpName returns the operation name of EfsRpcQueryProtectors operation.
func (o *xxx_QueryProtectorsOperation) OpName() string { return "/efsrpc/v1/EfsRpcQueryProtectors" }
func (o *xxx_QueryProtectorsOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
@@ -6471,6 +6754,17 @@ func (o *QueryProtectorsRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader)
return nil
}
// MakeQueryProtectorsRequest build a response structure from the given request structure.
func (o *QueryProtectorsRequest) MakeResponse() *QueryProtectorsResponse {
return &QueryProtectorsResponse{}
}
// OpNum returns the operation number of EfsRpcQueryProtectors operation.
func (o *QueryProtectorsRequest) OpNum() int { return 22 }
// OpName returns the operation name of EfsRpcQueryProtectors operation.
func (o *QueryProtectorsRequest) OpName() string { return "/efsrpc/v1/EfsRpcQueryProtectors" }
// QueryProtectorsResponse structure represents the EfsRpcQueryProtectors operation response
type QueryProtectorsResponse struct {
ProtectorList *EncryptionProtectorList `idl:"name:ppProtectorList" json:"protector_list"`