You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>The <dfndata-dfn-for=TurboShakeParamsid=dfn-TurboShakeParams-length>length</dfn> member represents the requested output length in bits.</p>
6170
+
<p>The <dfndata-dfn-for=TurboShakeParamsid=dfn-TurboShakeParams-domainSeparation>domainSeparation</dfn> member represents the domain separation byte. If not specified, it defaults to <code>0x1F</code>. Valid values are in the range <code>0x01</code> to <code>0x7F</code>.</p>
6171
+
<pclass="note">
6172
+
Protocols that use both KangarooTwelve and TurboSHAKE should avoid using the values
6173
+
<code>0x06</code>, <code>0x07</code>, and <code>0x0B</code> for domain separation,
6174
+
as these are used internally by KangarooTwelve.
6175
+
</p>
6176
+
</section>
6177
+
<sectionid="turboshake-operations">
6178
+
<h4>Operations</h4>
6179
+
<sectionid="turboshake-operations-digest">
6180
+
<h5>Digest</h5>
6181
+
<ol>
6182
+
<li>
6183
+
<p>
6184
+
Let |length| be the {{TurboShakeParams/length}} member of
6185
+
|normalizedAlgorithm|.
6186
+
</p>
6187
+
</li>
6188
+
<li>
6189
+
<p>
6190
+
Let |domainSeparation| be the {{TurboShakeParams/domainSeparation}} member of
6191
+
|normalizedAlgorithm| if present, or <code>0x1F</code> otherwise.
6192
+
</p>
6193
+
</li>
6194
+
<li>
6195
+
<p>
6196
+
If |domainSeparation| is less than <code>0x01</code> or greater than <code>0x7F</code>,
6197
+
then [= exception/throw =] an {{OperationError}}.
6198
+
</p>
6199
+
</li>
6200
+
<li>
6201
+
<dlclass="switch">
6202
+
<dt>
6203
+
If the {{Algorithm/name}} member of
6204
+
|normalizedAlgorithm| is a case-sensitive string match for
6205
+
"`TurboSHAKE128`":
6206
+
</dt>
6207
+
<dd>
6208
+
Let |result| be the result of performing the TurboSHAKE128 function
6209
+
defined in Section 2 of [[RFC9861]] using
6210
+
|message| as the |M| input parameter,
6211
+
|domainSeparation| as the |D| input parameter, and
6212
+
|length| divided by 8 as the |L| input parameter.
6213
+
</dd>
6214
+
<dt>
6215
+
If the {{Algorithm/name}} member of
6216
+
|normalizedAlgorithm| is a case-sensitive string match for
6217
+
"`TurboSHAKE256`":
6218
+
</dt>
6219
+
<dd>
6220
+
Let |result| be the result of performing the TurboSHAKE256 function
6221
+
defined in Section 2 of [[RFC9861]] using
6222
+
|message| as the |M| input parameter,
6223
+
|domainSeparation| as the |D| input parameter, and
6224
+
|length| divided by 8 as the |L| input parameter.
6225
+
</dd>
6226
+
</dl>
6227
+
</li>
6228
+
<li>
6229
+
<p>
6230
+
If performing the operation results in an error, then [= exception/throw =] an {{OperationError}}.
<p>The <dfndata-dfn-for=KangarooTwelveParamsid=dfn-KangarooTwelveParams-length>length</dfn> member represents the requested output length in bits.</p>
6295
+
<p>The <dfndata-dfn-for=KangarooTwelveParamsid=dfn-KangarooTwelveParams-customization>customization</dfn> member represents the customization string. The application selects this string to define a variant of the function. If not specified, it defaults to the empty string.</p>
6296
+
</section>
6297
+
<sectionid="kangarootwelve-operations">
6298
+
<h4>Operations</h4>
6299
+
<sectionid="kangarootwelve-operations-digest">
6300
+
<h5>Digest</h5>
6301
+
<ol>
6302
+
<li>
6303
+
<p>
6304
+
Let |length| be the {{KangarooTwelveParams/length}} member of
6305
+
|normalizedAlgorithm|.
6306
+
</p>
6307
+
</li>
6308
+
<li>
6309
+
<p>
6310
+
Let |customization| be the {{KangarooTwelveParams/customization}} member of
6311
+
|normalizedAlgorithm| if present or the empty octet
6312
+
string otherwise.
6313
+
</p>
6314
+
</li>
6315
+
<li>
6316
+
<dlclass="switch">
6317
+
<dt>
6318
+
If the {{Algorithm/name}} member of
6319
+
|normalizedAlgorithm| is a case-sensitive string match for
6320
+
"`KT128`":
6321
+
</dt>
6322
+
<dd>
6323
+
Let |result| be the result of performing the KT128 function
6324
+
defined in Section 3 of [[RFC9861]] using
6325
+
|message| as the |M| input parameter,
6326
+
|customization| as the |C| input parameter, and
6327
+
|length| divided by 8 as the |L| input parameter.
6328
+
</dd>
6329
+
<dt>
6330
+
If the {{Algorithm/name}} member of
6331
+
|normalizedAlgorithm| is a case-sensitive string match for
6332
+
"`KT256`":
6333
+
</dt>
6334
+
<dd>
6335
+
Let |result| be the result of performing the KT256 function
6336
+
defined in Section 3 of [[RFC9861]] using
6337
+
|message| as the |M| input parameter,
6338
+
|customization| as the |C| input parameter, and
6339
+
|length| divided by 8 as the |L| input parameter.
6340
+
</dd>
6341
+
</dl>
6342
+
</li>
6343
+
<li>
6344
+
<p>
6345
+
If performing the operation results in an error, then [= exception/throw =] an {{OperationError}}.
0 commit comments