aboutsummaryrefslogtreecommitdiff
path: root/raw-wiki-dump/GitRepositories%2Fcore%2Fhash%2Fsha3.trac
blob: 946c60b0b66f0feabaf14f6506c56ab8aac78611 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
{{{
#!htmlcomment

This page is maintained automatically by a script.  Don't modify this page by hand,
your changes will just be overwritten the next time the script runs.  Talk to your
Friendly Neighborhood Repository Maintainer if you need to change something here.

}}}

{{{
#!html
<h1>SHA-3</h1>

<h2>Core Description</h2>

<p>This core implements the sponge construction defined in the SHA-3 hash standard.</p>

<h2>API Specification</h2>

<p>The interface of the core is similar to other CrypTech cores. FMC memory map is split into two parts, the first part contains registers and looks like the following:</p>

<table>
<thead>
<tr>
  <th>Offset</th>
  <th>Register</th>
</tr>
</thead>
<tbody>
<tr>
  <td>0x0000</td>
  <td>NAME0</td>
</tr>
<tr>
  <td>0x0004</td>
  <td>NAME1</td>
</tr>
<tr>
  <td>0x0008</td>
  <td>VERSION</td>
</tr>
<tr>
  <td>0x0020</td>
  <td>CONTROL</td>
</tr>
<tr>
  <td>0x0024</td>
  <td>STATUS</td>
</tr>
</tbody>
</table>

<p>The core has the following registers:</p>

<ul>
<li><p><strong>NAME0</strong>, <strong>NAME1</strong> <br />
Read-only core name ("sha3", "    " [four whitespaces]).</p></li>
<li><p><strong>VERSION</strong> <br />
Read-only core version, currently "0.10".</p></li>
<li><p><strong>CONTROL</strong> <br />
Register bits: <br />
[31:2] Don't care, always read as 0 <br />
[1] "next" control bit <br />
[0] "init" control bit <br />
The "init" control bit replaces the core's state with the contents of the input block and starts hashing, it should be used to absorb the very first block of data into the sponge. The "next" control bit xor's the core's state with the contents of the input block and continues hashing, it should be used to absorb subsequent blocks into the sponge. The core starts operation when a control bit changes from 0 to 1. This way when a bit is set, the core will only perform one operation and then stop. To start another operation, the bit must be cleared at first and then set to 1 again. Note, that "init" has priority over "next", if both bits are set simultaneously, "init" takes precedence.</p></li>
<li><p><strong>STATUS</strong>
Read-only register bits: <br />
[31:2] Don't care, always read as 0 <br />
[1] "valid" control bit <br />
[0] "ready" control bit (always read as 1) <br />
The "valid" status bit is cleared as soon as the core starts absorbing input data block, and gets set after the operation is complete. The "ready" status bit is hardwired to always read 1.</p></li>
</ul>

<p>The second part of the address space is split into two banks:</p>

<table>
<thead>
<tr>
  <th>Offset</th>
  <th>Bank</th>
</tr>
</thead>
<tbody>
<tr>
  <td>0x200</td>
  <td>BLOCK</td>
</tr>
<tr>
  <td>0x300</td>
  <td>STATE</td>
</tr>
</tbody>
</table>

<p>Length of each bank is 200 bytes, the first bank has read-write access and contains input data block, the second bank is read-only and contains the core's internal state.</p>

<h2>Vendor-specific Primitives</h2>

<p>This core doesn't use vendor-specific primitives.</p>
}}}

[[RepositoryIndex(format=table,glob=core/hash/sha3)]]

|| Clone `https://git.cryptech.is/core/hash/sha3.git` ||