summaryrefslogtreecommitdiff
path: root/raw-wiki-dump/GitRepositories%2Fuser%2Fshatov%2Fecdsa384
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2020-09-13 23:04:30 +0000
committerRob Austein <sra@hactrn.net>2020-09-13 23:04:30 +0000
commitb092ffbcbe2c9398494f7dc9db6f0796971633e0 (patch)
tree6fabf690f1ebf485a9fea9af5298e44ad2a59a3e /raw-wiki-dump/GitRepositories%2Fuser%2Fshatov%2Fecdsa384
parent9d927e49d9c10fc16c6dfa4a2a96cdb6216e4e2b (diff)
Import Cryptech wiki dump
Diffstat (limited to 'raw-wiki-dump/GitRepositories%2Fuser%2Fshatov%2Fecdsa384')
-rw-r--r--raw-wiki-dump/GitRepositories%2Fuser%2Fshatov%2Fecdsa384104
1 files changed, 104 insertions, 0 deletions
diff --git a/raw-wiki-dump/GitRepositories%2Fuser%2Fshatov%2Fecdsa384 b/raw-wiki-dump/GitRepositories%2Fuser%2Fshatov%2Fecdsa384
new file mode 100644
index 0000000..00ff1a0
--- /dev/null
+++ b/raw-wiki-dump/GitRepositories%2Fuser%2Fshatov%2Fecdsa384
@@ -0,0 +1,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>ecdsa384</h1>
+
+<h2>Core Description</h2>
+
+<p>This core implements the scalar base point multiplier for ECDSA curve P-384. It can be used during generation of public keys, the core can also be used as part of the signing operation. </p>
+
+<h2>API Specification</h2>
+
+<p>The core interface is similar to other Cryptech cores. FMC memory map looks like the following:</p>
+
+<p><code>0x0000 | NAME0</code>
+<code>0x0004 | NAME1</code>
+<code>0x0008 | VERSION</code></p>
+
+<p><code>0x0020 | CONTROL</code>
+<code>0x0024 | STATUS</code></p>
+
+<p><code>0x0100 | K0</code>
+<code>0x0104 | K1</code>
+<code>...</code>
+<code>0x012C | K11</code></p>
+
+<p><code>0x0140 | X0</code>
+<code>0x0144 | X1</code>
+<code>...</code>
+<code>0x017C | X11</code></p>
+
+<p><code>0x0180 | Y0</code>
+<code>0x0184 | Y1</code>
+<code>...</code>
+<code>0x01AC | Y11</code></p>
+
+<p>The core has the following registers:</p>
+
+<ul>
+<li><p><strong>NAME0</strong>, <strong>NAME1</strong>
+Read-only core name ("ecdsa384").</p></li>
+<li><p><strong>VERSION</strong>
+Read-only core version, currently "0.11".</p></li>
+<li><p><strong>CONTROL</strong>
+Control register bits:
+[31:2] Don't care, always read as 0
+[1] "next" control bit
+[0] Don't care, always read as 0
+The core starts multiplication when the "next" control bit changes from 0 to 1. This way when the bit is set, the core will only perform one multiplication and then stop. To start another operation, the bit must be cleared at first and then set to 1 again.</p></li>
+<li><p><strong>STATUS</strong>
+Read-only status register bits:
+[31:2] Don't care, always read as 0
+[1] "valid" control bit
+[0] "ready" control bit (always read as 1)
+The "valid" control bit is cleared as soon as the core starts operation, and gets set after the multiplication operations is complete. Note, that unlike some other Cryptech cores, this core doesn't need any special initialization, so the "ready" control bit is simply hardwired to always read as 1. This is to keep general core interface consistency.</p></li>
+<li><p><strong>K0</strong>-<strong>K11</strong>
+Buffer for the 384-bit multiplication factor (multiplier) K. The core will compute Q = K * G (the base point G is the multiplicand). K0 is the least significant 32-bit word of K, i.e. bits [31:0], while K11 is the most significant 32-bit word of K, i.e. bits [383:352].</p></li>
+<li><p><strong>X0</strong>-<strong>X11</strong>, <strong>Y0</strong>-<strong>Y11</strong>
+Buffers for the 384-bit coordinates X and Y of the product Q = K * G. Values are returned in affine coordinates. X0 and Y0 contain the least significant 32-bit words, i.e. bits [31:0], while X11 and Y11 contain the most significant 32-bit words, i.e. bits [383:352].</p></li>
+</ul>
+
+<h2>Implementation Details</h2>
+
+<p>The top-level core module contains block memory buffers for input and output operands and the base point multiplier, that reads from the input buffer and writes to the output buffers.</p>
+
+<p>The base point multiplier itself consists of the following:</p>
+
+<ul>
+<li>Buffers for storage of temporary values</li>
+<li>Configurable "worker" unit</li>
+<li>Microprograms for the worker unit</li>
+<li>Multi-word mover unit</li>
+<li>Modular inversion unit</li>
+</ul>
+
+<p>The "worker" unit can execute five basic operations:</p>
+
+<ul>
+<li>comparison</li>
+<li>copying</li>
+<li>modular addition</li>
+<li>modular subtraction</li>
+<li>modular multiplications</li>
+</ul>
+
+<p>There are two primary microprograms, that the worker runs: curve point doubling and addition of curve point to the base point. Those microprograms use projective Jacobian coordinates, so one more microprogram is used to convert the product into affine coordinates with the help of modular inversion unit.</p>
+
+<p>Note, that the core is supplemented by a reference model written in C, that has extensive comments describing tricky corners of the underlying math.</p>
+
+<h2>Vendor-specific Primitives</h2>
+
+<p>Cryptech Alpha platform is based on Xilinx Artix-7 200T FPGA, so this core takes advantage of Xilinx-specific DSP slices to carry out math-intensive operations. All vendor-specific math primitives are placed under /rtl/lowlevel/artix7, the core also offers generic replacements under /rtl/lowlevel/generic, they can be used for simulation with 3rd party tools, that are not aware of Xilinx-specific stuff. Selection of vendor/generic primitives is done in ecdsa_lowlevel_settings.v, when porting to other architectures, only those four low-level modules need to be ported.</p>
+}}}
+
+[[RepositoryIndex(format=table,glob=user/shatov/ecdsa384)]]
+
+|| Clone `https://git.cryptech.is/user/shatov/ecdsa384.git` ||