Skip to content

Commit 5bdfd07

Browse files
committed
Throw on truncation in the ECDH derive bits operation
1 parent 0eed687 commit 5bdfd07

File tree

1 file changed

+10
-17
lines changed

1 file changed

+10
-17
lines changed

spec/Overview.html

+10-17
Original file line numberDiff line numberDiff line change
@@ -8808,24 +8808,17 @@ <h4>Operations</h4>
88088808
</li>
88098809
<li>
88108810
<dl class="switch">
8811-
<dt>If |length| is null:</dt>
8812-
<dd>Return |secret|</dd>
8813-
<dt>Otherwise:</dt>
8811+
<dt>
8812+
If |length| is not null, and not equal to the length of |secret| in bits:
8813+
</dt>
88148814
<dd>
8815-
<dl class="switch">
8816-
<dt>
8817-
If the length of |secret| in bits is less than
8818-
|length|:
8819-
</dt>
8820-
<dd>
8821-
[= exception/throw =] an
8822-
{{OperationError}}.
8823-
</dd>
8824-
<dt>Otherwise:</dt>
8825-
<dd>
8826-
Return an [= octet string containing =] the first |length| bits of |secret|.
8827-
</dd>
8828-
</dl>
8815+
[= exception/throw =] an {{OperationError}}.
8816+
</dd>
8817+
<dt>
8818+
Otherwise:
8819+
</dt>
8820+
<dd>
8821+
Return |secret|.
88298822
</dd>
88308823
</dl>
88318824
</li>

0 commit comments

Comments
 (0)