{"title":"Cryptech Project","link":[{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/","rel":"alternate"}},{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/feeds\/all.atom.xml","rel":"self"}}],"id":"https:\/\/wiki.cryptech.is\/","updated":"2021-10-10T23:43:00+00:00","entry":[{"title":"Trac Wiki converted to Pelican Markdown","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/Pelican","rel":"alternate"}},"published":"2021-10-07T18:55:00+00:00","updated":"2021-10-07T18:55:00+00:00","author":{"name":"Cryptech Core Team"},"id":"tag:wiki.cryptech.is,2021-10-07:\/Pelican","summary":"<p>The Trac Wiki that used to hold this site has been converted to a\nwiki-like setup using git, Markdown, Pelican, and m.css.<\/p>\n<ul>\n<li><a href=\"https:\/\/git.cryptech.is\/wiki\">git repository behind this Wiki<\/a>.<\/li>\n<li><a href=\"https:\/\/docs.getpelican.com\/en\/stable\/\">Pelican documentation<\/a>.<\/li>\n<li><a href=\"https:\/\/mcss.mosra.cz\/themes\/pelican\/\">m.css documentation<\/a>.<\/li>\n<\/ul>\n<p>The git repository is configured to generate the web content from the\nMarkdown automatically upon receiving a \u2026<\/p>","content":"<p>The Trac Wiki that used to hold this site has been converted to a\nwiki-like setup using git, Markdown, Pelican, and m.css.<\/p>\n<ul>\n<li><a href=\"https:\/\/git.cryptech.is\/wiki\">git repository behind this Wiki<\/a>.<\/li>\n<li><a href=\"https:\/\/docs.getpelican.com\/en\/stable\/\">Pelican documentation<\/a>.<\/li>\n<li><a href=\"https:\/\/mcss.mosra.cz\/themes\/pelican\/\">m.css documentation<\/a>.<\/li>\n<\/ul>\n<p>The git repository is configured to generate the web content from the\nMarkdown automatically upon receiving a <code>git push<\/code>. <\/p>\n<p><a href=\"https:\/\/linkcheck.github.io\/linkchecker\/\">linkchecker<\/a> may also be\nuseful in validating the generated content.<\/p>","category":{"@attributes":{"term":"misc"}}},{"title":"External Project Tor HSM","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/ExternalProjectsTorHSM","rel":"alternate"}},"published":"2018-09-17T10:26:00+00:00","updated":"2018-10-01T14:38:00+00:00","author":{"name":"Linus Nordberg"},"id":"tag:wiki.cryptech.is,2018-09-17:\/ExternalProjectsTorHSM","summary":"<h2>Problem<\/h2>\n<p>The <a href=\"https:\/\/www.torproject.org\/about\/overview.html.en\">Tor network<\/a> is defined by a small number, about ten, of special relays called Directory Authorities (DAs).<\/p>\n<p>Directory Authorities sign the critical <code>status votes<\/code> and <code>consensus status<\/code> documents using SHA-1 and SHA-256 together with RSA-2048 or RSA-3072 once per hour, using medium-term on-line <code>authority signing keys<\/code> signed by \u2026<\/p>","content":"<h2>Problem<\/h2>\n<p>The <a href=\"https:\/\/www.torproject.org\/about\/overview.html.en\">Tor network<\/a> is defined by a small number, about ten, of special relays called Directory Authorities (DAs).<\/p>\n<p>Directory Authorities sign the critical <code>status votes<\/code> and <code>consensus status<\/code> documents using SHA-1 and SHA-256 together with RSA-2048 or RSA-3072 once per hour, using medium-term on-line <code>authority signing keys<\/code> signed by their individual off-line long-term <code>authority identity keys<\/code>. Authority signing keys typically have a lifetime of three to twelve months.<\/p>\n<p>Authority signing keys are currently kept on the same general purpose computer that runs the Directory Authority and are thus subject to a large number of network threats.<\/p>\n<h2>Proposed solution<\/h2>\n<p>Move <code>authority signing keys<\/code> away from the general purpose computer onto an external device which can sign the consensus document without exposing key material to the networked computer system.<\/p>\n<p>The CrypTech project has created an open source (BSD licensed) <code>Alpha<\/code> hardware which would be especially suitable, because the open software and hardware offers unprecedented transparency while also enabling a simple, efficient and legacy-free solution.<\/p>\n<h3>Current typical key roll-over procedure<\/h3>\n<ul>\n<li>Generate new <code>authority signing key<\/code> on offline system<\/li>\n<li>Sign new key using <code>authority identity key<\/code> on offline system<\/li>\n<li>Save new <code>authority signing key<\/code> and <code>key certificate<\/code> on USB stick<\/li>\n<li>Transfer new <code>authority signing key<\/code> and <code>key certificate<\/code> to DA system via network<\/li>\n<\/ul>\n<h3>The key roll-over procedure becomes<\/h3>\n<ul>\n<li>Use administrative tool from this project on DA system to generate new <code>authority signing key<\/code> on HSM<ul>\n<li>The new <code>authority signing key<\/code> initially remains inactive and unavailable for use<\/li>\n<li>The public part of new <code>authority signing key<\/code> is exported from HSM onto the DA system<\/li>\n<\/ul>\n<\/li>\n<li>Transfer new public part of <code>authority signing key<\/code> to USB stick<\/li>\n<li>Sign new public key using <code>authority identity key<\/code> on offline system<\/li>\n<li>Save <code>key certificate<\/code> on USB stick<\/li>\n<li>Transfer <code>key certificate<\/code> to DA system via network and make available to DA<\/li>\n<li>(Optional?) Use administrative tool from this project on DA to present <code>key certificate<\/code> to HSM<\/li>\n<li>Activate key (automatic on verified <code>key certificate<\/code>, manual without <code>key certificate<\/code> verification)<\/li>\n<\/ul>\n<h2>Milestones<\/h2>\n<p>The minimum viable product (MVP) at MS3 is a system where the authority signing key is no longer accessible by the DA system while not making any part of the process worse from a security perspective.<\/p>\n<p>The system at MS6 (to MS8) does not make any part of the process worse from a \/\/usability\/\/ perspective (subjective) and also adds rate limiting.<\/p>\n<h3>MS1 -- PoC using OpenSSL <code>PKCS#11<\/code> engine<\/h3>\n<ul>\n<li>tor using openssl p11 engine; no key management or rate-limiting<\/li>\n<li>useful for test and verification<\/li>\n<\/ul>\n<h3>MS2 -- Using CrypTech RPC instead of OpenSSL<\/h3>\n<ul>\n<li>function declarations in <code>sw\/libhal\/hal.h<\/code>, definitions in <code>sw\/libhal\/rpc_*.c<\/code><\/li>\n<li>TODO: daemon<\/li>\n<\/ul>\n<h3>MS3 (MVP) -- HSM configuration I<\/h3>\n<ul>\n<li>\"HSM configuration\" is aka \"key management\"<\/li>\n<li>administrator connected to MGMT can make HSM<ul>\n<li>generate a MK based on passphrase<\/li>\n<li>print public part of MK<\/li>\n<\/ul>\n<\/li>\n<li>administrator connected to USER can make HSM<ul>\n<li>generate a new authority signing key pair, wrap the secret part in MK, store both parts in flash memory and export the public part<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3>MS4 -- HSM configuration II<\/h3>\n<ul>\n<li>rate limiting<\/li>\n<li>enforcing key validity<\/li>\n<\/ul>\n<h3>MS5 -- Enforcing key validity HSM side<\/h3>\n<h3>MS6 -- Rate limiting of signatures<\/h3>\n<h3>MS7 -- New Shiny Crypto Hardware API using CrypTech RPC<\/h3>\n<h3>MS8 -- Getting entropy from HSM<\/h3>\n<h3>MS9 -- Support for more protocols in New Shiny Crypto Hardware API<\/h3>\n<h2>References<\/h2>\n<ul>\n<li><a href=\"https:\/\/gitweb.torproject.org\/torspec.git\/tree\/dir-spec.txt\">Tor directory protocol, version 3<\/a><\/li>\n<li><a href=\"https:\/\/www.crowdsupply.com\/cryptech\/open-hardware-security-module\">CrypTech Alpha system<\/a><\/li>\n<\/ul>","category":{"@attributes":{"term":"misc"}}},{"title":"External Projects","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/ExternalProjects","rel":"alternate"}},"published":"2018-09-17T10:12:00+00:00","updated":"2018-09-17T10:27:00+00:00","author":{"name":"Cryptech Core Team"},"id":"tag:wiki.cryptech.is,2018-09-17:\/ExternalProjects","content":"<p>External projects using <a href=\"https:\/\/cryptech.is\/\">CrypTech<\/a> technology.<\/p>\n<ul>\n<li><a href=\"https:\/\/wiki.cryptech.is\/ExternalProjectsTorHSM\">TorHSM<\/a><\/li>\n<\/ul>","category":{"@attributes":{"term":"misc"}}},{"title":"Secure Channel","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/SecureChannel","rel":"alternate"}},"published":"2017-07-27T00:24:00+00:00","updated":"2017-07-27T19:02:00+00:00","author":{"name":"Rob Austein"},"id":"tag:wiki.cryptech.is,2017-07-27:\/SecureChannel","summary":"<p>This is a sketch of a design for the secure channel that we want to\nhave between the Cryptech HSM and the client libraries which talk to\nit.  Work in progress, and not implemented yet because a few of the\npieces are still missing.<\/p>\n<h2>Design goals and constraints<\/h2>\n<p>Basic design \u2026<\/p>","content":"<p>This is a sketch of a design for the secure channel that we want to\nhave between the Cryptech HSM and the client libraries which talk to\nit.  Work in progress, and not implemented yet because a few of the\npieces are still missing.<\/p>\n<h2>Design goals and constraints<\/h2>\n<p>Basic design goals:<\/p>\n<ul>\n<li>\n<p>End-to-end between client library and HSM.<\/p>\n<\/li>\n<li>\n<p>Not require yet another presentation layer if we can avoid it (so,\n    reuse XDR if possible, unless we have some strong desire to switch\n    to something else).<\/p>\n<\/li>\n<li>\n<p>Provide end-to-end message integrity between client library and HSM.<\/p>\n<\/li>\n<li>\n<p>Provide end-to-end message confidentiality between client library\n    and HSM.  We only need this for a few operations, but between PINs\n    and private keys it would be simpler just to provide it all the\n    time than to be selective.<\/p>\n<\/li>\n<li>\n<p>Provide some form of mutual authentication between client library\n    and HSM.  This is tricky, since it requires either configuration\n    (of the other party's authenticator) or leap-of-faith.\n    Leap-of-faith is probably good enough for most of what we really\n    care about (insuring that we're talking to the same dog now as we\n    were earlier).<\/p>\n<p>Not 100% certain we need this at all, but if we're going to leave\nourselves wide open to monkey-in-the-middle attacks, there's not\nmuch point in having a secure channel at all.<\/p>\n<\/li>\n<li>\n<p>Use boring simple crypto that we already have (or almost have) and\n    which runs fast.<\/p>\n<\/li>\n<li>\n<p>Continue to support multiplexer.  Taken together with end-to-end\n    message confidentiality, this may mean two layers of headers: an\n    outer set which the multiplexer is allowed to mutate, then an\n    inner set which is protected.  Better, though, would be if the\n    multiplexer can work just by reading the outer headers without\n    modifying anything.<\/p>\n<\/li>\n<li>\n<p>Simple enough that we can implement it easily in HSM, PKCS #11\n    library, and Python library.<\/p>\n<\/li>\n<\/ul>\n<h2>Why not TLS?<\/h2>\n<p>We could, of course, Just Use TLS.  Might end up doing that, if it\nturns out to be easier, but TLS is a complicated beast, with far more\noptions than we need, and doesn't provide all of what we want, so a\nfair amount of the effort would be, not wasted exactly, but a giant\nstep sideways.  Absent sane alternatives, I'd just suck it up and do\nthis, with a greatly restricted ciphersuite, but I think we have a\nbetter option.<\/p>\n<h2>Design<\/h2>\n<p>Basic design lifted from \"Cryptography Engineering: Design Principles\nand Practical Applications\" (ISBN 978-0-470-47424-2,\nhttp:\/\/www.wiley.com\/WileyCDA\/WileyTitle\/productCd-0470474246.html),\ntweaked in places to fit tools we have readily available.<\/p>\n<p>Toolkit:<\/p>\n<ul>\n<li>AES<\/li>\n<li>SHA-2<\/li>\n<li>ECDH<\/li>\n<li>ECDSA<\/li>\n<li>XDR<\/li>\n<\/ul>\n<p>As in the book, there are two layers here: the basic secure channel,\nmoving encrypted-and-authenticated frames back and forth, and a higher\nlevel which handles setup, key agreement, and endpoint authentication.<\/p>\n<p>Chapter 7 outlines a simple lower layer using AES-CTR and\nHMAC-SHA-256.  I don't see any particular reason to change any of\nthis, AES-CTR is easy enough.  I suppose it might be worth looking\ninto AES-CCM and AES-GCM, but they're somewhat more complicated;\nsection 7.5 (\"Alternatives\") discusses these briefly, we also know\nsome of the authors.<\/p>\n<p>For key agreement we probably want to use ECDH.  We don't quite have\nthat yet, but in theory it's relatively minor work to generalize our\nexisting ECDSA code to cover that too, and, again in theory, it should\nbe possible to generalize our existing ECDSA fast base point multiplier\nVerilog cores into fast point multiplier cores (sic: limitation of the\ncurrent cores is that they only compute scalar times the base point,\nnot scalar times an arbitrary point, which is fine for ECDSA but\ndoesn't work for ECDH).<\/p>\n<p>For signature (mutual authentication) we probably want to use ECDSA,\nagain because we have it and it's fast.  The more interesting question\nis the configuration vs leap-of-faith discussion, figuring out under\nwhich circumstances we really care about the peer's identity, and\nfiguring out how to store state.<\/p>\n<p>Chapter 14 (key negotiation) of the same book covers the rest of the\nprotocol, substituting ECDH and ECDSA for DH and RSA, respectively.\nAs noted in the text, we could use a shared secret key and a MAC\nfunction instead of public key based authentication.<\/p>\n<p>Alternatively, the Station-to-Station protocol described in 4.6.1 of\n\"Guide to Elliptic Curve Cryptography\" (ISBN 978-0-387-95273-4,\nhttps:\/\/link.springer.com\/book\/10.1007\/b97644) appears to do what\nwe want, straight out of the box.<\/p>\n<p>Interaction with multiplexer is slightly interesting.  The multiplexer\nreally only cares about one thing: being able to match responses from\nthe HSM to queries sent into the HSM, so that the multiplexer can send\nthe responses back to the right client.  At the moment, it does this\nby seizing control of the client_handle field in the RPC frame, which\nit can get away with doing because there's no end-to-end integrity\ncheck at all (yuck).  We could add an outer layer of headers for the\nmultiplexer, but would rather not.<\/p>\n<p>The obvious \"real\" identity for clients to use would be the public\nkeys (ECDSA in the above discussion) they use to authenticate to the\nHSM, or a hash (perhaps truncated) thereof.  That's good as far as it\ngoes, and may suffice if we can assume that clients always have unique\nkeys, but if client keys are something over which the client has any\ncontrol (which includes selecting where they're stored, which we may\nnot be able to avoid), we have to consider the possibility of multiple\nclients using the same key (yuck).  So a candidate replacement for the\nclient_handle for multiplexer purposes would be some combination of a\npublic key hash and a process ID, both things the client could provide\nwithout the multiplexer needing to do anything.<\/p>\n<p>The one argument in favor of leaving control of this to the\nmultiplexer (rather than the endpoints) is that it would (sort of)\nprotect against one client trying to masquerade as another -- but\nthat's really just another reason why clients should have their own\nkeys to the extent possible.<\/p>\n<p>As a precaution, perhaps the multiplexer should check for duplicate\nidentifiers, then do, um, something? if it finds duplicates.  This\nkind of violates Steinbach's Guideline for Systems Programming (\"Never\ntest for an error condition you don't know how to handle\").  Obvious\nanswer is to break all connections old and new using the duplicate\nidentity, minor questions about how to reset from that, whether worth\ndoing at all, etc.  Maybe clients just shouldn't do that.<\/p>\n<h2>Open issues<\/h2>\n<ul>\n<li>\n<p>Does the resulting design pass examination by clueful people?<\/p>\n<\/li>\n<li>\n<p>Does this end up still being significantly simpler than TLS?<\/p>\n<\/li>\n<li>\n<p>The Cryptography Engineering protocols include a hack to work\n    around a length extension weakness in SHA-2 (see section 5.4.2).\n    Do we need this?  Would we be better off using SHA-3 instead?  The\n    book claims that SHA-3 was expected to fix this, but that was\n    before NIST pissed away their reputation by getting too cosy with\n    the NSA again.  Over my head, ask somebody with more clue.<\/p>\n<\/li>\n<\/ul>","category":{"@attributes":{"term":"FutureWork"}}},{"title":"Release Notes","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/ReleaseNotes","rel":"alternate"}},"published":"2017-05-13T19:06:00+00:00","updated":"2017-05-13T19:18:00+00:00","author":{"name":"Rob Austein"},"id":"tag:wiki.cryptech.is,2017-05-13:\/ReleaseNotes","summary":"<h2>3.0, May 2017<\/h2>\n<ul>\n<li>New keystore implementation.  Basically a very small flash filesystem, including basic wear leveling.  Maximum number of keys varies depending on key size and how many options are attached, but for any reasonable use it should hold on the order of 2,000 keys at least.<\/li>\n<li>In-memory \u2026<\/li><\/ul>","content":"<h2>3.0, May 2017<\/h2>\n<ul>\n<li>New keystore implementation.  Basically a very small flash filesystem, including basic wear leveling.  Maximum number of keys varies depending on key size and how many options are attached, but for any reasonable use it should hold on the order of 2,000 keys at least.<\/li>\n<li>In-memory keystore moved to HSM (previously was in memory of the client library), uses same API as flash keystore.<\/li>\n<li>RPC mechanism extended to support the new keystores (<code>hal_rpc_pkey_match()<\/code>, <code>hal_rpc_pkey_set_attributes()<\/code>, etc).<\/li>\n<li>PKCS #11 code rewritten to use libhal attribute mechanism, sqlite3 database gone.<\/li>\n<li>Verilog implementations of ECDSA base point multipliers for P-256 and P-384 curves, key generation and signing significantly faster than with software ECDSA implementation.<\/li>\n<li>Key backup mechanism: two more RPC functions, and a Python script <code>cryptech_backup<\/code> to drive the process.<\/li>\n<li>Private key representation changed to PKCS #8 format (a self-identifying uniform format with optional encryption, supported by many other tools).  Key backup uses encrypted form of PKCS #8.<\/li>\n<li>Default build of client software now uses a multiplexer daemon <code>cryptech_muxd<\/code> which allows multiple clients to talk to the HSM at once (packages such as OpenDNSSEC which uses multiple daemons talking to the same HSM need this).  Software can still be built for direct connection to HSM but it is no longer the default.<\/li>\n<li>New trivial script <code>cryptech_console<\/code> to talk to the HSM's management port via the multiplexer daemon; <code>cryptech_upload<\/code> now supports both direct connection and connection via the multiplexer daemon.<\/li>\n<li>Python client implementations of libhal RPC mechanism and PKCS #11 now installed as <code>cryptech.libhal<\/code> and <code>cryptech.py11<\/code>, respectively.<\/li>\n<li>Python PKCS #11 client hacked to play nicely with <code>pkcs11-spy<\/code> debugging tool.<\/li>\n<li>RTOS replaced by simple non-preemptive (voluntary yield) tasking system, eliminating a huge morass of potential race conditions, debugging nightmares, priority inversions, and similar horrors.  Lack of preemption means that console acess may have to wait for something else to yield the ARM CPU, but it's more than worth it to get rid of all the stability problems the RTOS was causing.<\/li>\n<li><a href=\"https:\/\/git.cryptech.is\/user\/sra\/openssl-engine\/about\">Sample code for using the HSM as an OpenSSL engine<\/a> is available.  This only works with RSA for the moment, due to apparent limitations of the engine implementation.<\/li>\n<\/ul>\n<p>Getting started with 3.0:<\/p>\n<ul>\n<li><a href=\"https:\/\/wiki.cryptech.is\/BinaryPackages\">Install the software<\/a>.<\/li>\n<li><a href=\"https:\/\/wiki.cryptech.is\/Upgrading\">Upgrade the firmware<\/a>.  <strong>Please note the warnings about bricking your HSM<\/strong>, how to avoid that, and what to do if you failed to avoid it.<\/li>\n<li>Set the usual environment variables, perhaps using <code>cryptech_probe<\/code>.<\/li>\n<li>Start the multiplexer daemon <code>cryptech_muxd<\/code>.<\/li>\n<\/ul>\n<p>At this point, you should be able to use the PKCS #11 library, the <code>cryptech_backup<\/code> script, and so forth.<\/p>","category":{"@attributes":{"term":"Releases"}}},{"title":"Building Cryptech Software\/Firmware\/Bitstream From Source","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/BuildingFromSource","rel":"alternate"}},"published":"2017-05-13T17:47:00+00:00","updated":"2021-10-10T23:43:00+00:00","author":{"name":"Rob Austein"},"id":"tag:wiki.cryptech.is,2017-05-13:\/BuildingFromSource","summary":"<p>Everything you need to build our software, firmware, and FPGA\nbitstreams from source yourself is publicly available, but the process\nis a bit complicated.  Overall, there are two methods, one of which\nour developers use while writing this stuff, the other of which we use\nfor the automated reproducible builds \u2026<\/p>","content":"<p>Everything you need to build our software, firmware, and FPGA\nbitstreams from source yourself is publicly available, but the process\nis a bit complicated.  Overall, there are two methods, one of which\nour developers use while writing this stuff, the other of which we use\nfor the automated reproducible builds which go into our binary\ndistributions.  Both methods eventually boil down to \"get the source\ncode then run make\", but the details differ.<\/p>\n<h2>What developers do<\/h2>\n<p>We check out copies of all the several dozen separate repositories and\ncarefully arrange them in a tree structure which matches the official\nnaming scheme.  Yes, really.  It's tedious, but we have\n<a href=\"https:\/\/git.cryptech.is\/user\/sra\/build-tools\/tree\/https-sync-repos.py\">a script to automate this<\/a>.\nThis works by parsing the <code>.gitmodules<\/code> file in the <code>releng\/alpha<\/code>\nrepository (see \"reproducible builds\", below).<\/p>\n<p>Once you have this tree, you can hop around within it, building\nwhichever bits are of interest to you.  So if you want to rebuild just\nthe HSM firmware (the C code that runs on the ARM), you would go to\n<code>sw\/stm32<\/code> and run <code>make<\/code> there.<\/p>\n<h2>What we do for reproducible builds<\/h2>\n<p>Reproducible builds use the same tree structure (as they must for the\nvarious Makefiles to work properly), but the entire tree is embedded\nin a git \"superrepository\" which also contains the release engineering\ngoo necessary to make the whole thing work.  Do <code>git help submodule<\/code>\nfor an introduction to git's submodule mechanism.<\/p>\n<p>With this model, one just checks out a copy of\n<a href=\"https:\/\/git.cryptech.is\/releng\/alpha\/about\">the superrepository<\/a>,\nruns <code>make<\/code> in its top directory, and eventually\nthe complete package pops out the other side.<\/p>\n<div class=\"highlight\"><pre><span><\/span><code>git clone https:\/\/git.cryptech.is\/releng\/alpha.git\ncd alpha\nmake\n<\/code><\/pre><\/div>\n\n<p>That's the good news.  The bad news is that this process has higher\ndemands on its build environment: it expects to find the a complete\ntool set, including the XiLinx synthesis tools, the several different\ncross compilers for the firmware, and the <code>pbuilder<\/code> system for\nbuilding clean room packages for Ubuntu and Debian.<\/p>\n<p>As a compromise, one can use this source tree as if it were the\ndevelopment source tree described above: just use the supermodule to\npull down everything else, but then ignore the supermodule and build\nindividual pieces as if you'd checked out all the repositories by\nhand.<\/p>\n<h2>Skip all this git mess and just download a tarball<\/h2>\n<p>There's another alternative, which is simpler than any of the above:\njust download the source tarball.  Since the only build environments\nwe support at the moment are Debian Jessie and Ubuntu Xenial, which\nalso happen to be environments for which we build binary packages, you\ncan just use APT:<\/p>\n<div class=\"highlight\"><pre><span><\/span><code>apt-get source cryptech-alpha\n<\/code><\/pre><\/div>\n\n<p>Which will give you the same tree structure, but without all the git fun.<\/p>\n<h2>Build environment<\/h2>\n<p>Our software and firmware developers use the Debian and Ubuntu Linux\ndistributions.  Our current build box for binary packages runs Debian\nJessie.<\/p>\n<p>Our Verilog developers use various environments and have been known to\nuse graphical tools, but synthesis of the bitstreams that go in our\nbinary packages is done via the XiLinx command line tools on the same\nDebian Jessie machine as the software and firmware builds.<\/p>\n<p>Which tools you need will of course depend on exactly what you're\ntrying to do.<\/p>\n<p>Most of the tools work on either 32-bit or 64-bit machines, but if you\nintend to run the full binary package build script, you'll need a\n64-bit machine (or VM) because the tools won't build 64-bit binaries\non a 32-bit machine.<\/p>\n<p>Basic tool set (not all required for every purpose, but they're all\nsupported Debian packages so it's usually easier just to install them\nall and not worry about it):<\/p>\n<div class=\"highlight\"><pre><span><\/span><code><span class=\"w\">  <\/span><span class=\"n\">apt<\/span><span class=\"o\">-<\/span><span class=\"n\">get<\/span><span class=\"w\"> <\/span><span class=\"n\">install<\/span><span class=\"w\"> <\/span><span class=\"n\">git<\/span><span class=\"w\"> <\/span><span class=\"n\">pbuilder<\/span><span class=\"w\"> <\/span><span class=\"n\">ubuntu<\/span><span class=\"o\">-<\/span><span class=\"n\">dev<\/span><span class=\"o\">-<\/span><span class=\"n\">tools<\/span><span class=\"w\"> <\/span><span class=\"n\">rsync<\/span><span class=\"w\"> <\/span><span class=\"n\">sudo<\/span>\n<span class=\"w\">  <\/span><span class=\"n\">apt<\/span><span class=\"o\">-<\/span><span class=\"n\">get<\/span><span class=\"w\"> <\/span><span class=\"n\">install<\/span><span class=\"w\"> <\/span><span class=\"n\">python<\/span><span class=\"o\">-<\/span><span class=\"n\">yaml<\/span><span class=\"w\"> <\/span><span class=\"n\">python<\/span><span class=\"o\">-<\/span><span class=\"n\">serial<\/span><span class=\"w\"> <\/span><span class=\"n\">python<\/span><span class=\"o\">-<\/span><span class=\"n\">crypto<\/span><span class=\"w\"> <\/span><span class=\"n\">python<\/span><span class=\"o\">-<\/span><span class=\"n\">ecdsa<\/span>\n<span class=\"w\">  <\/span><span class=\"n\">apt<\/span><span class=\"o\">-<\/span><span class=\"n\">get<\/span><span class=\"w\"> <\/span><span class=\"n\">install<\/span><span class=\"w\"> <\/span><span class=\"n\">gcc<\/span><span class=\"o\">-<\/span><span class=\"n\">arm<\/span><span class=\"o\">-<\/span><span class=\"n\">none<\/span><span class=\"o\">-<\/span><span class=\"n\">eabi<\/span><span class=\"w\"> <\/span><span class=\"n\">gdb<\/span><span class=\"o\">-<\/span><span class=\"n\">arm<\/span><span class=\"o\">-<\/span><span class=\"n\">none<\/span><span class=\"o\">-<\/span><span class=\"n\">eabi<\/span>\n<span class=\"w\">  <\/span><span class=\"n\">apt<\/span><span class=\"o\">-<\/span><span class=\"n\">get<\/span><span class=\"w\"> <\/span><span class=\"n\">install<\/span><span class=\"w\"> <\/span><span class=\"n\">gcc<\/span><span class=\"o\">-<\/span><span class=\"n\">avr<\/span><span class=\"w\"> <\/span><span class=\"n\">binutils<\/span><span class=\"o\">-<\/span><span class=\"n\">avr<\/span><span class=\"w\"> <\/span><span class=\"n\">avr<\/span><span class=\"o\">-<\/span><span class=\"n\">libc<\/span>\n<span class=\"w\">  <\/span><span class=\"n\">apt<\/span><span class=\"o\">-<\/span><span class=\"n\">get<\/span><span class=\"w\"> <\/span><span class=\"o\">-<\/span><span class=\"n\">t<\/span><span class=\"w\"> <\/span><span class=\"n\">jessie<\/span><span class=\"o\">-<\/span><span class=\"n\">backports<\/span><span class=\"w\"> <\/span><span class=\"n\">install<\/span><span class=\"w\"> <\/span><span class=\"n\">debootstrap<\/span><span class=\"w\"> <\/span><span class=\"n\">distro<\/span><span class=\"o\">-<\/span><span class=\"n\">info<\/span><span class=\"o\">-<\/span><span class=\"n\">data<\/span>\n<span class=\"w\">  <\/span><span class=\"n\">apt<\/span><span class=\"o\">-<\/span><span class=\"n\">get<\/span><span class=\"w\"> <\/span><span class=\"n\">install<\/span><span class=\"w\"> <\/span><span class=\"n\">reprepro<\/span><span class=\"w\"> <\/span><span class=\"n\">ubuntu<\/span><span class=\"o\">-<\/span><span class=\"n\">archive<\/span><span class=\"o\">-<\/span><span class=\"n\">keyring<\/span>\n<\/code><\/pre><\/div>\n\n<p>This is not an exhaustive list, because some of the other packages we\nuse are pulled in by these as dependencies.<\/p>\n<p>You will also need a copy of the XiLinx tools, which is tedious enough\nthat it's described in a separate section, below.<\/p>\n<p>Once you have all the tools installed, you'll need a copy of the\nsource tree, as explained in the preceeding sections.<\/p>\n<p>pbuilder requires a bit of setup (you can skip this if you're not\ntrying to do the full binary package build):<\/p>\n<div class=\"highlight\"><pre><span><\/span><code>for code in jessie xenial; do for arch in i386 amd64; do pbuilder-dist $code $arch create; done; done\nln -s jessie_result ~\/pbuilder\/jessie-amd64_result\nln -s xenial_result ~\/pbuilder\/xenial-amd64_result\n<\/code><\/pre><\/div>\n\n<h2>Installing the XiLinx tools<\/h2>\n<p>XiLinx tools setup is a bit involved.  You can skip this section if\nyou don't intend to build FPGA bitstreams.<\/p>\n<p>We use the command line versions of the XiLinx tools, but installing\nthem requires a graphical environment, because the XiLinx installer\nand license manager are GUI tools.  If you're running this on a server\nand don't already have a graphical environment installed, you can get\naway with something fairly minimal.  For example, if you have a VNC\nviewer such as \"Chicken of the VNC\" on your laptop, you can get away\nwith a fairly minimal X11 toolset:<\/p>\n<div class=\"highlight\"><pre><span><\/span><code>apt-get install tightvncserver xterm icewm\n<\/code><\/pre><\/div>\n\n<p>If you're already running X11 on your laptop and are comfortable with\nextruding that to the build machine, eg, via <code>ssh -Y<\/code>, you can just\nuse that (not recommended for long-haul use, eg, if the laptop is in\nBoston and the server is in Reykjavik).<\/p>\n<p>You'll need to start by using a web browser to download the\n<a href=\"http:\/\/www.xilinx.com\/support\/download\/index.html\/content\/xilinx\/en\/downloadNav\/design-tools.html\">Xilinx \u200bISE Design Suite<\/a>.<\/p>\n<p>XiLinx only supports specific versions of Red Hat and Suse Linux, but\ntheir tools do run on Debian and Ubuntu.  A few  caveats:<\/p>\n<ul>\n<li>\n<p>Debian and Ubuntu symlink <code>\/bin\/sh<\/code> to <code>\/bin\/dash<\/code>, which can't handle\n  some of the syntax used in XiLinx's shell scripts, so you'll need to\n  change that symlink to point to <code>\/bin\/bash<\/code>.<\/p>\n<\/li>\n<li>\n<p>Although the XiLinx software can be installed as user or root, by\n  default it wants to install into \/opt\/Xilinx, so you need to install\n  as root if you want to do that.<\/p>\n<\/li>\n<li>\n<p>The XiLinx tools are disk hogs, so if you're building a VM for this,\n  you'll probably want to give it at least 30-40 GB of disk space.<\/p>\n<\/li>\n<\/ul>\n<p>Step-by-step installation:<\/p>\n<ol>\n<li>Unpack <code>Xilinx_ISE_DS_Lin_14.7_1015_1.tar<\/code> (or whatever version you have).<\/li>\n<li>In an X11 environment, cd to <code>Xilinx_ISE_DS_Lin_14.7_1015_1<\/code>, and run <code>sudo .\/xsetup<\/code><\/li>\n<li>Click through two screens of license agreements.<\/li>\n<li>Select <code>ISE WebPACK<\/code>.<\/li>\n<li>Unselect (or leave unselected) Install Cable Drivers.<\/li>\n<li>Go!<\/li>\n<\/ol>\n<p>Well, not quite.  You'll need to convince the ISE tools that you have\na valid license to use the ISE tools.  Go to\nhttp:\/\/www.xilinx.com\/products\/design-tools\/ise-design-suite\/ise-webpack.htm,\nclick the <code>Licensing Solutions<\/code> link.  On the page to which that takes\nyou, expand the section <code>Obtain a license for Free or Evaluation\nproduct<\/code>.  To download the ISE Webpack, you should have created an\naccount, so now you can go to the Licensing Site and use that account\nto create a Certificate Based License.<\/p>\n<p>You do not need to go through the HostID dance, just say Do It. You\nwill then receive a certificate in email (not an X.509 certificate)\nwhich you will be able to use. Then start the ISE Webpack by issuing\nthe command <code>ise<\/code>.  Go to the Help menu and Manage Licenses. Use the\nresulting new License Manager window to install the <code>.lic<\/code> file.  This\nprocess is complex and flakey.<\/p>\n<p>Here's\n<a href=\"http:\/\/www.armadeus.com\/wiki\/index.php?title=ISE_WebPack_installation_on_Linux\">another description of installing ISE on Ubuntu<\/a>.<\/p>\n<p>The <code>ise<\/code> binary referred to above is in <code>\/opt\/Xilinx\/14.7\/ISE_DS\/ISE\/bin\/lin64\/ise<\/code>\n(or in <code>...\/lin\/ise<\/code>, but the pbuilder setup requires a 64-bit build machine).<\/p>\n<p>When running this remotely under tightvncserver, setup looks something like this:<\/p>\n<div class=\"highlight\"><pre><span><\/span><code><span class=\"n\">vncserver<\/span><span class=\"w\"> <\/span><span class=\"o\">:<\/span><span class=\"mi\">0<\/span><span class=\"w\"> <\/span><span class=\"o\">-<\/span><span class=\"n\">geometry<\/span><span class=\"w\"> <\/span><span class=\"mi\">1280<\/span><span class=\"n\">x768<\/span><span class=\"w\"> <\/span><span class=\"o\">-<\/span><span class=\"n\">depth<\/span><span class=\"w\"> <\/span><span class=\"mi\">16<\/span><span class=\"w\"> <\/span><span class=\"o\">-<\/span><span class=\"n\">localhost<\/span>\n<span class=\"n\">export<\/span><span class=\"w\"> <\/span><span class=\"n\">DISPLAY<\/span><span class=\"o\">=:<\/span><span class=\"mi\">0<\/span><span class=\"w\"> <\/span><span class=\"n\">XAUTHORITY<\/span><span class=\"o\">=~\/.<\/span><span class=\"n\">Xauthority<\/span>\n<span class=\"n\">icewm<\/span><span class=\"o\">&amp;<\/span>\n<\/code><\/pre><\/div>\n\n<p>Then, either in the same shell as the above or in an xterm in the new display<\/p>\n<div class=\"highlight\"><pre><span><\/span><code>cd Xilinx_ISE_DS_Lin_14.7_1015_1\nsudo .\/xsetup\n\ncd\n\/opt\/Xilinx\/14.7\/ISE_DS\/ISE\/bin\/lin64\/ise\n<\/code><\/pre><\/div>\n\n<p>It turns out you don't really need to run the whole <code>ise<\/code> tool to\nget to the license manager, you can just run<\/p>\n<div class=\"highlight\"><pre><span><\/span><code>\/opt\/Xilinx\/14.7\/ISE_DS\/common\/bin\/lin64\/xlcm -manage\n<\/code><\/pre><\/div>\n\n<p>But you do have to source the appropriate settings file first, none of\nthe XiLinx tools work properly without that:<\/p>\n<div class=\"highlight\"><pre><span><\/span><code>. \/opt\/Xilinx\/14.7\/ISE_DS\/settings64.sh\n<\/code><\/pre><\/div>","category":{"@attributes":{"term":"Releases"}}},{"title":"Using ST-Link on the Alpha Board","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/UsingSTLink","rel":"alternate"}},"published":"2017-05-13T03:37:00+00:00","updated":"2019-01-24T14:37:00+00:00","author":{"name":"Joachim Str\u00f6mbergson"},"id":"tag:wiki.cryptech.is,2017-05-13:\/UsingSTLink","summary":"<p>ST-LINK is STM's implementation of the <a href=\"https:\/\/developer.arm.com\/products\/architecture\/cpu-architecture\/debug-visibility-and-trace\/coresight-architecture\/serial-wire-debug\">| Serial Wire Debug (SWD)<\/a> protocol.\nThink of it as JTAG if you're more comfortable with that.<\/p>\n<h2>Getting an ST-LINK programmer<\/h2>\n<p>ST-LINK is built into all(?) of STM's Nucleo and Discovery evaluation\nboards, which can be had for as little as US$10 from <a href=\"http:\/\/mouser.com\">Mouser \u2026<\/a><\/p>","content":"<p>ST-LINK is STM's implementation of the <a href=\"https:\/\/developer.arm.com\/products\/architecture\/cpu-architecture\/debug-visibility-and-trace\/coresight-architecture\/serial-wire-debug\">| Serial Wire Debug (SWD)<\/a> protocol.\nThink of it as JTAG if you're more comfortable with that.<\/p>\n<h2>Getting an ST-LINK programmer<\/h2>\n<p>ST-LINK is built into all(?) of STM's Nucleo and Discovery evaluation\nboards, which can be had for as little as US$10 from <a href=\"http:\/\/mouser.com\">Mouser<\/a>\nor <a href=\"http:\/\/element14.com\">element14<\/a> (<a href=\"http:\/\/newark.com\">Newark<\/a> in\nthe Americas, <a href=\"http:\/\/farnell.com\">Farnell<\/a> in Europe).<\/p>\n<p>We have tested with STM32F0DISCOVERY and STM32F4DISCOVERY (both with ST-LINK\nv2.0) and NUCLEO-F411RE (with ST-LINK v2.1).<\/p>\n<h3>Connecting the ST-LINK programmer to the Alpha<\/h3>\n<p>On the STM board, remove the pair of ST-LINK jumpers (CN4 on the F4DISCO,\nCN2 on the F0DISCO and NUCLEO). Then locate the 6-pin SWD header (CN3 on\nthe F0DISCO, CN2 on the F4DISCO, CN4 on the NUCLEO), and connect it to J1\non the Alpha board (top, just left of center).<\/p>\n<p>This photo shows the correct orientation of the cables (both boards\noriented so that the logo is right-side up):<\/p>\n<p><img alt=\"IMG_20170512_205557_s.jpg\" src=\"https:\/\/wiki.cryptech.is\/UsingSTLink\/UsingSTLink\/IMG_20170512_205557_s.jpg\"><\/p>\n<p>NOTE: The STM boards have an unfortunate tendency to short unexpectedly, so\nI recommend putting them in an enclosure. In this case, I've cut holes in\nthe original packaging.<\/p>\n<h2>Install OpenOCD and the debugger<\/h2>\n<div class=\"highlight\"><pre><span><\/span><code>$<span class=\"w\"> <\/span>apt-get<span class=\"w\"> <\/span>install<span class=\"w\"> <\/span>gdb-arm-none-eabi<span class=\"w\"> <\/span>openocd\n<\/code><\/pre><\/div>\n\n<h2>Get the <code>debug<\/code> and <code>flash-target<\/code> scripts<\/h2>\n<p>If you don't already have a cryptech source tree somewhere, get the source distribution, e.g.<\/p>\n<div class=\"highlight\"><pre><span><\/span><code>$<span class=\"w\"> <\/span>apt-get<span class=\"w\"> <\/span><span class=\"nb\">source<\/span><span class=\"w\"> <\/span>cryptech-alpha\n<\/code><\/pre><\/div>\n\n<p>The scripts are in <code>sw\/stm32\/bin<\/code>.<\/p>\n<h2>Re-flashing the Alpha<\/h2>\n<h3>To reflash with our binary firmware<\/h3>\n<div class=\"highlight\"><pre><span><\/span><code>$<span class=\"w\"> <\/span>tar<span class=\"w\"> <\/span>xfz<span class=\"w\"> <\/span>\/usr\/share\/cryptech-alpha-firmware.tar.gz\n$<span class=\"w\"> <\/span>flash-target<span class=\"w\"> <\/span>hsm\n<\/code><\/pre><\/div>\n\n<p>What you should see is something like:<\/p>\n<div class=\"highlight\"><pre><span><\/span><code>** Programming Started **\nauto erase enabled\nInfo : device id = 0x20016419\nInfo : flash size = 2048kbytes\nInfo : Dual Bank 2048 kiB STM32F42x\/43x\/469\/479 found\ntarget halted due to breakpoint, current mode: Thread\nxPSR: 0x61000000 pc: 0x20000046 msp: 0x2002fffc\nwrote 524288 bytes from file projects\/hsm\/hsm.elf in 12.344705s (41.475 KiB\/s)\n** Programming Finished **\n** Verify Started **\ntarget halted due to breakpoint, current mode: Thread\nxPSR: 0x61000000 pc: 0x2000002e msp: 0x2002fffc\ntarget halted due to breakpoint, current mode: Thread\nxPSR: 0x61000000 pc: 0x2000002e msp: 0x2002fffc\nverified 509100 bytes in 0.953672s (521.320 KiB\/s)\n** Verified OK **\n** Resetting Target **\nInfo : Unable to match requested speed 2000 kHz, using 1800 kHz\nInfo : Unable to match requested speed 2000 kHz, using 1800 kHz\nadapter speed: 1800 kHz\nshutdown command invoked\n<\/code><\/pre><\/div>\n\n<h3>To reflash with firmware you built from source<\/h3>\n<p>See BuildingFromSource.<\/p>\n<h2>Debugging the Alpha<\/h2>\n<p>This site shows several ways to use various debuggers to debug the\nfirmware in an STM32:<\/p>\n<div class=\"highlight\"><pre><span><\/span><code>http:\/\/fun-tech.se\/stm32\/OpenOCD\/gdb.php\n<\/code><\/pre><\/div>\n\n<p>There is a shell script called 'bin\/debug' that starts an OpenOCD server\nand GDB:<\/p>\n<div class=\"highlight\"><pre><span><\/span><code>$<span class=\"w\"> <\/span>sw\/stm32\/bin\/debug<span class=\"w\"> <\/span>projects\/hsm\/hsm\n<\/code><\/pre><\/div>","category":{"@attributes":{"term":"AlphaBoard"}}},{"title":"Disaster Recovery on the Alpha Board","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/DisasterRecovery","rel":"alternate"}},"published":"2017-05-13T00:30:00+00:00","updated":"2017-05-13T00:30:00+00:00","author":{"name":"Paul Selkirk"},"id":"tag:wiki.cryptech.is,2017-05-13:\/DisasterRecovery","summary":"<p>This page covers a few likely (hopefully unlikely) oh-noes.<\/p>\n<h2>Oh no, I bricked my device<\/h2>\n<h3>Recovering from a bad firmware install<\/h3>\n<p>You can upload new firmware through the bootloader. On power-up or reset,\nthe bootloader flashes the blue LED for 10 seconds. During that time, start\n<code>cryptech_upload<\/code>:<\/p>\n<div class=\"highlight\"><pre><span><\/span><code><span class=\"o\">$<\/span><span class=\"w\"> <\/span><span class=\"n\">cryptech_upload<\/span><span class=\"w\"> <\/span><span class=\"o\">--<\/span><span class=\"n\">firmware<\/span><span class=\"w\"> <\/span><span class=\"o\">--<\/span><span class=\"n\">user \u2026<\/span><\/code><\/pre><\/div>","content":"<p>This page covers a few likely (hopefully unlikely) oh-noes.<\/p>\n<h2>Oh no, I bricked my device<\/h2>\n<h3>Recovering from a bad firmware install<\/h3>\n<p>You can upload new firmware through the bootloader. On power-up or reset,\nthe bootloader flashes the blue LED for 10 seconds. During that time, start\n<code>cryptech_upload<\/code>:<\/p>\n<div class=\"highlight\"><pre><span><\/span><code><span class=\"o\">$<\/span><span class=\"w\"> <\/span><span class=\"n\">cryptech_upload<\/span><span class=\"w\"> <\/span><span class=\"o\">--<\/span><span class=\"n\">firmware<\/span><span class=\"w\"> <\/span><span class=\"o\">--<\/span><span class=\"n\">user<\/span><span class=\"w\"> <\/span><span class=\"n\">wheel<\/span>\n<span class=\"n\">PIN<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"o\">&lt;<\/span><span class=\"n\">your<\/span><span class=\"o\">-<\/span><span class=\"n\">wheel<\/span><span class=\"o\">-<\/span><span class=\"n\">pin<\/span><span class=\"o\">&gt;<\/span>\n<\/code><\/pre><\/div>\n\n<h3>Recovering from a bad bootloader install<\/h3>\n<p>Well, now you've done it. You'll need to buy an ST-LINK programmer.\nSee <a href=\"https:\/\/wiki.cryptech.is\/UsingSTLink\">UsingSTLink<\/a>.<\/p>\n<h2>Oh no, I'm locked out of my device<\/h2>\n<p>If you're staring at this thing for the first time, or if you ran\n<code>keystore erase<\/code>, then you have no PIN. Believe it or not, this is the\nbest case scenario. Log in as wheel with the default PIN\n<code>YouReallyNeedToChangeThisPINRightNowWeAreNotKidding<\/code>, and you should be\nable to reset the PINs.<\/p>\n<p>If you forgot the PIN, I feel sorry for you. The only way out of this is\nvia <a href=\"https:\/\/wiki.cryptech.is\/UsingSTLink\">ST-LINK<\/a>. The easiest way is to debug with <code>gdb<\/code>, set a breakpoint on\n<code>hal_rpc_login<\/code>, and issue the gdb command <code>return 0<\/code>.<\/p>\n<h2>Oh no, I forgot (or reset) the master key<\/h2>\n<p>As shipped, the Alpha doesn't include a battery backup for the Master Key\nMemory. So if power is interrupted, the MKM is wiped. (Also, if we had\ntamper protection more sophisticated than a Panic Button, it would wipe\nthe MKM when you opened the case to install the ST-LINK cable.)<\/p>\n<p>Sorry, there's nothing that can be done about that. All your keys are\nstill in flash memory, but encrypted with the KEK, which is now gone.\n(Unless you used the <code>masterkey unsecure set<\/code> command to store the KEK in\nunprotected flash memory, but you wouldn't do that, would you?)<\/p>","category":{"@attributes":{"term":"AlphaBoard"}}},{"title":"Upgrading the Cryptech Alpha HSM","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/Upgrading","rel":"alternate"}},"published":"2017-05-12T23:15:00+00:00","updated":"2018-04-07T23:03:00+00:00","author":{"name":"Cryptech Core Team"},"id":"tag:wiki.cryptech.is,2017-05-12:\/Upgrading","summary":"<p>This page explains how to upgrade the Cryptech Alpha firmware, bootloader,\nand FPGA bitstream (as needed).<\/p>\n<p>All of the operations here use the Alpha's \"management\" (MGMT) port,\nso that cable must be connected to your Linux or OSX host machine.<\/p>\n<h2>Upgrading from the stock firmware (Berlin workshop or CrowdSupply)<\/h2>\n<p>The \u2026<\/p>","content":"<p>This page explains how to upgrade the Cryptech Alpha firmware, bootloader,\nand FPGA bitstream (as needed).<\/p>\n<p>All of the operations here use the Alpha's \"management\" (MGMT) port,\nso that cable must be connected to your Linux or OSX host machine.<\/p>\n<h2>Upgrading from the stock firmware (Berlin workshop or CrowdSupply)<\/h2>\n<p>The main feature of the 3.0 firmware release is a completely new HSM\nkeystore implementation, which makes better use of the Alpha's keystore\nflash, allows a much larger number of keys, and removes the need for an\nSQL database on the host. (See ReleaseNotes.)<\/p>\n<p>We did not attempt to provide any sort of backwards compatability to the\noriginal minimalistic keystore implementation, so this upgrade process\nwill wipe your keystore. Sorry. More importantly (from the limited\nviewpoint of the upgrade process), it will change how the HSM stores its\nPINs, which complicates the upgrade process.<\/p>\n<p>Because we use the bootloader to upgrade the firmware, and the firmware to\nupgrade the bootloader, both use the PINs stored in the keystore to login,\nso both need to understand the new keystore, so both need to be upgraded.<\/p>\n<p>Because of the tricky nature of this particular upgrade, you must\nperform these steps, in the specified order:<\/p>\n<ul>\n<li>Install the new host software package using APT or Homebrew.<\/li>\n<li>Wipe the HSM keystore to reset PINs back to the \"factory\" state.<\/li>\n<li>Upgrade the main HSM firmware.<\/li>\n<li>Upgrade the HSM bootloader.<\/li>\n<li>Log in to upgraded HSM to set PINs, etc.<\/li>\n<\/ul>\n<p><strong>Upgrading the bootloader before the main firmware will brick your\nAlpha.<\/strong>  So don't do that.<\/p>\n<p>If something goes horribly wrong and you do somehow manage to brick\nyour Alpha, see DisasterRecovery.<\/p>\n<h2>Upgrading from 'ksng'<\/h2>\n<p>A few intrepid users are already testing the 'ksng' development branch,\nusing the instructions at <a href=\"https:\/\/wiki.cryptech.is\/UpgradeToKSNG\">UpgradeToKSNG<\/a>. In this case, and with future\nupgrades, it it not necessary to either wipe the keystore or upgrade the\nbootloader.<\/p>\n<ul>\n<li>Install the new host software package using APT or Homebrew.<\/li>\n<li>Upgrade the main HSM firmware.<\/li>\n<\/ul>\n<h2>Install the cryptech-alpha package<\/h2>\n<h3>using apt-get on Debian or Ubuntu Linux<\/h3>\n<div class=\"highlight\"><pre><span><\/span><code>$<span class=\"w\"> <\/span>sudo<span class=\"w\"> <\/span>apt-get<span class=\"w\"> <\/span>update\n$<span class=\"w\"> <\/span>sudo<span class=\"w\"> <\/span>apt-get<span class=\"w\"> <\/span>install<span class=\"w\"> <\/span>cryptech-alpha\n<\/code><\/pre><\/div>\n\n<p>Yes, you have to install it even if you already had it installed, because\nAPT wants permission before accepting the new package dependencies.<\/p>\n<p>Or you could instead run:<\/p>\n<div class=\"highlight\"><pre><span><\/span><code>$<span class=\"w\"> <\/span>sudo<span class=\"w\"> <\/span>apt-get<span class=\"w\"> <\/span>upgrade<span class=\"w\"> <\/span>--with-new-pkgs\n<\/code><\/pre><\/div>\n\n<p>but that might upgrade unrelated stuff.<\/p>\n<p>If you had the '-ksng' package installed, you might then want to run:<\/p>\n<div class=\"highlight\"><pre><span><\/span><code>$<span class=\"w\"> <\/span>sudo<span class=\"w\"> <\/span>apt-get<span class=\"w\"> <\/span>remove<span class=\"w\"> <\/span>cryptech-alpha-ksng\n$<span class=\"w\"> <\/span>sudo<span class=\"w\"> <\/span>apt-get<span class=\"w\"> <\/span>autoclean\n<\/code><\/pre><\/div>\n\n<p>but nothing terrible is likely to happen if you omit those steps.<\/p>\n<p>If you're running on Debian Jessie, you may need to enable <a href=\"https:\/\/backports.debian.org\/Instructions\/\"><code>jessie-backports<\/code><\/a> and make sure you're getting the <code>python-serial<\/code> and <code>python-tornado<\/code> dependencies from the backports (the versions of those packages in the base Debian Jessie distribution are too old).<\/p>\n<h3>using Homebrew on OSX<\/h3>\n<p>If you're upgrading from the original firmware (have not installed the <code>-ksng<\/code> package), a normal Homebrew upgrade cycle\nshould suffice:<\/p>\n<div class=\"highlight\"><pre><span><\/span><code>$<span class=\"w\"> <\/span>brew<span class=\"w\"> <\/span>update\n$<span class=\"w\"> <\/span>brew<span class=\"w\"> <\/span>upgrade\n<\/code><\/pre><\/div>\n\n<p>If you have the <code>-ksng<\/code> package installed, you need to tell Homebrew that you want to switch back:<\/p>\n<div class=\"highlight\"><pre><span><\/span><code>$<span class=\"w\"> <\/span>brew<span class=\"w\"> <\/span>update\n$<span class=\"w\"> <\/span>brew<span class=\"w\"> <\/span>migrate<span class=\"w\"> <\/span>cryptech-alpha-ksng\n$<span class=\"w\"> <\/span>brew<span class=\"w\"> <\/span>update\n<\/code><\/pre><\/div>\n\n<p>In either case, you might then want to do something like:<\/p>\n<div class=\"highlight\"><pre><span><\/span><code>$<span class=\"w\"> <\/span>brew<span class=\"w\"> <\/span>cleanup\n<\/code><\/pre><\/div>\n\n<p>but nothing terrible is likely to happen if you omit that step.<\/p>\n<p>If you've tried doing this and nothing happens, you might be hitting a known old bug in Homebrew itself.  Make sure your copy of Homebrew is up to date, and if that still doesn't work, try deinstalling whichever <code>cryptech-alpha*<\/code> package you have installed and reinstalling <code>cryptech-alpha<\/code>.<\/p>\n<h2>Set usual CRYPTECH_* environment variables<\/h2>\n<p>The upgrade process uses the <code>CRYPTECH_CTY_CLIENT_SERIAL_DEVICE<\/code>\nenvironment variable.  The easiest way to set it is by using the\n<code>cryptech_probe<\/code> script, just as you would for other usage of the\nAlpha.<\/p>\n<div class=\"highlight\"><pre><span><\/span><code><span class=\"n\">$<\/span><span class=\"w\"> <\/span><span class=\"n\">eval<\/span><span class=\"w\"> <\/span><span class=\"n n-Quoted\">`cryptech_probe`<\/span>\n<\/code><\/pre><\/div>\n\n<p>(Note: you can use the new <code>cryptech_muxd<\/code> and <code>cryptech_console<\/code>, but\nthese instructions assume you are familiar with <code>cryptech_miniterm<\/code>. Or\nyou could be using <code>picocom<\/code> or <code>kermit<\/code> or something else. Doesn't matter\nto us.)<\/p>\n<h2>Clear the keystore flash<\/h2>\n<p>If you are upgrading from the original firmware, you will need to wipe the\nkeystore, to avoid confusing the new keystore code.<\/p>\n<p>The good news is that we have a utility to back up and restore the new\nkeystore. The bad news is that we don't have a way to back up the old\nkeystore.<\/p>\n<div class=\"highlight\"><pre><span><\/span><code>$<span class=\"w\"> <\/span>cryptech_miniterm\n\nUsername:<span class=\"w\"> <\/span>wheel\nPassword:<span class=\"w\"> <\/span>&lt;your-wheel-pin-goes-here&gt;\n\ncryptech&gt;<span class=\"w\"> <\/span>keystore<span class=\"w\"> <\/span>erase<span class=\"w\"> <\/span>YesIAmSure\n\n^<span class=\"o\">]<\/span>\n<\/code><\/pre><\/div>\n\n<h2>Upgrade the main HSM firmware<\/h2>\n<div class=\"highlight\"><pre><span><\/span><code><span class=\"o\">$<\/span><span class=\"w\"> <\/span><span class=\"n\">cryptech_upload<\/span><span class=\"w\"> <\/span><span class=\"o\">--<\/span><span class=\"n\">firmware<\/span><span class=\"w\"> <\/span><span class=\"o\">--<\/span><span class=\"n\">user<\/span><span class=\"w\"> <\/span><span class=\"n\">wheel<\/span>\n<span class=\"n\">PIN<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"n\">YouReallyNeedToChangeThisPINRightNowWeAreNotKidding<\/span>\n<\/code><\/pre><\/div>\n\n<h2>Upgrade the bootloader<\/h2>\n<div class=\"highlight\"><pre><span><\/span><code><span class=\"o\">$<\/span><span class=\"w\"> <\/span><span class=\"n\">cryptech_upload<\/span><span class=\"w\"> <\/span><span class=\"o\">--<\/span><span class=\"n\">bootloader<\/span><span class=\"w\"> <\/span><span class=\"o\">--<\/span><span class=\"n\">user<\/span><span class=\"w\"> <\/span><span class=\"n\">wheel<\/span><span class=\"w\"> <\/span><span class=\"o\">--<\/span><span class=\"n\">simon<\/span><span class=\"o\">-<\/span><span class=\"n\">says<\/span><span class=\"o\">-<\/span><span class=\"n\">whack<\/span><span class=\"o\">-<\/span><span class=\"n\">my<\/span><span class=\"o\">-<\/span><span class=\"n\">bootloader<\/span>\n<span class=\"n\">PIN<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"n\">YouReallyNeedToChangeThisPINRightNowWeAreNotKidding<\/span>\n<\/code><\/pre><\/div>\n\n<h2>(Optional) Upgrade the FPGA bitstream<\/h2>\n<p>This upgrade includes an experimental ECDSA point multiplier in hardware,\nwhich the firmware will use if present.<\/p>\n<div class=\"highlight\"><pre><span><\/span><code><span class=\"o\">$<\/span><span class=\"w\"> <\/span><span class=\"n\">cryptech_upload<\/span><span class=\"w\"> <\/span><span class=\"o\">--<\/span><span class=\"n\">fpga<\/span><span class=\"w\"> <\/span><span class=\"o\">--<\/span><span class=\"n\">user<\/span><span class=\"w\"> <\/span><span class=\"n\">wheel<\/span>\n<span class=\"n\">PIN<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"n\">YouReallyNeedToChangeThisPINRightNowWeAreNotKidding<\/span>\n<\/code><\/pre><\/div>\n\n<h2>Log in and set PINs, masterkey, etcetera<\/h2>\n<div class=\"highlight\"><pre><span><\/span><code>$<span class=\"w\"> <\/span>cryptech_miniterm\n\nUsername:<span class=\"w\"> <\/span>wheel\nPIN:<span class=\"w\"> <\/span>YouReallyNeedToChangeThisPINRightNowWeAreNotKidding\n\ncryptech&gt;<span class=\"w\"> <\/span>keystore<span class=\"w\"> <\/span><span class=\"nb\">set<\/span><span class=\"w\"> <\/span>pin<span class=\"w\"> <\/span>wheel<span class=\"w\"> <\/span>fnord\ncryptech&gt;<span class=\"w\"> <\/span>keystore<span class=\"w\"> <\/span><span class=\"nb\">set<\/span><span class=\"w\"> <\/span>pin<span class=\"w\"> <\/span>so<span class=\"w\">    <\/span>fnord\ncryptech&gt;<span class=\"w\"> <\/span>keystore<span class=\"w\"> <\/span><span class=\"nb\">set<\/span><span class=\"w\"> <\/span>pin<span class=\"w\"> <\/span>user<span class=\"w\">  <\/span>fnord\ncryptech&gt;<span class=\"w\"> <\/span>masterkey<span class=\"w\"> <\/span><span class=\"nb\">set<\/span>\n\n^<span class=\"o\">]<\/span>\n<\/code><\/pre><\/div>","category":{"@attributes":{"term":"Releases"}}},{"title":"Upgrading Cryptech Alpha HSM to \"ksng\" development package","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/UpgradeToKSNG","rel":"alternate"}},"published":"2016-12-22T22:33:00+00:00","updated":"2016-12-22T22:53:00+00:00","author":{"name":"Rob Austein"},"id":"tag:wiki.cryptech.is,2016-12-22:\/UpgradeToKSNG","summary":"<p>This page attempts to explain the upgrade procedure for testing out\nthe new \"ksng\" development branch of the Cryptech Alpha firmware.<\/p>\n<h2>Cavats<\/h2>\n<p>This particular upgrade is more complicated than we would have\npreferred, due to the interaction of two unrelated factors:<\/p>\n<ol>\n<li>As the name (obscurely) implies, the main feature in \u2026<\/li><\/ol>","content":"<p>This page attempts to explain the upgrade procedure for testing out\nthe new \"ksng\" development branch of the Cryptech Alpha firmware.<\/p>\n<h2>Cavats<\/h2>\n<p>This particular upgrade is more complicated than we would have\npreferred, due to the interaction of two unrelated factors:<\/p>\n<ol>\n<li>As the name (obscurely) implies, the main feature in the ksng\n   branch is a completely new HSM keystore implementation, which makes\n   better use of the Alpha's keystore flash, allows a much larger\n   number of keys, removes the need for an SQL database on the host,\n   gets your laundry 25% brighter, and leaves your breath alone.<\/li>\n<\/ol>\n<p>We did not attempt to provide any sort of backwards compatability\n   to the old minimalistic keystore implementation, so this upgrade\n   process will wipe your keystore.  Sorry.  More importantly (from\n   the limited viewpoint of the upgrade process), it will change how\n   the HSM stores its PINs, which complicates the upgrade process.<\/p>\n<ol>\n<li>The \"Device Field Upgrade\" (DFU) capability in the Alpha's firmware\n   was a last-minute addition before the Berlin workshop in July 2016,\n   and, as last minute additions often do, it turned out to be buggy.\n   There are three distinct pieces of software involved in the upgrade\n   process, and they were all slightly buggy, in different ways.\n   Because of this, one must perform the upgrade steps in a particular\n   order to avoid bricking the HSM.  The upgrade includes fixes for\n   all the (known) bugs in the DFU process, so we hope that this will\n   be a one-time annoyance (famous last words).<\/li>\n<\/ol>\n<p>If something goes horribly wrong and you do somehow manage to brick\nyour Alpha, don't give up, recovery is still possible, it just\nrequires an ST-LINK debugger and cable (more on this below).<\/p>\n<h2>Overview<\/h2>\n<p>Because of the tricky nature of this particular upgrade, you must\nperform these steps, in the specified order:<\/p>\n<ul>\n<li>Install the new host software package using APT or Homebrew.<\/li>\n<li>Wipe the HSM keystore to reset PINs back to the \"factory\" state.<\/li>\n<li>Upgrade the main HSM firmware.<\/li>\n<li>Upgrade the HSM bootloader.<\/li>\n<li>Log in to upgraded HSM to set PINs, etc.<\/li>\n<\/ul>\n<p><strong>Upgrading the bootloader before the main firmware will brick your\nAlpha.<\/strong>  So don't do that.<\/p>\n<p>All of the operations here use the Alpha's \"management\" (MGMT) port,\nso that cable must be connected to your Linux or OSX host machine.<\/p>\n<p>This upgrade procedure was tested on Debian Jessie, with an Alpha\nwhose firmware had been rolled back to the version from the Berlin\nworkshop (APT\/Homebrew package version 2.0.1468584175, commit\ncd445b69b2caa7205f4e1c368aa2c6bf8c2d7692 in repository\nhttps:\/\/git.cryptech.is\/releng\/alpha.git).<\/p>\n<h2>Install cryptech-alpha-ksng package using apt-get or Homebrew<\/h2>\n<p>Binaries for the \"ksng\" branch are available as a separate set of\n\"cryptech-alpha-ksng\" packages, which replace the \"cryptech-alpha\"\npackages for the master branch.  This seemed the simplest way of\nletting people experiment with the new code while falling back to the\nold if necessary.  The \"cryptech-alpha-ksng\" packages are declared to\nconflict with the \"cryptech-alpha\" packages, because they install\nprograms by the same name in the same places and you need the version\nof the host software which goes with the HSM firmware your running.<\/p>\n<p>APT handles package conflicts differently from the way that Homebrew\ndoes.  If you have \"cryptech-alpha\" installed and try to install\n\"cryptech-alpha-ksng\", APT assumes you meant what you said and will\njust replace the old package with the new one.  Homebrew, on the other\nhand, reports the conflict and refuses to proceed until you sort it out.<\/p>\n<p>The following assumes that you already had the Cryptech APT repository\nor Homebrew tap configured; if not, see  <a href=\"https:\/\/wiki.cryptech.is\/BinaryPackages\">BinaryPackages<\/a>.<\/p>\n<h3>Installing cryptech-alpha-ksng package using apt-get on Debian or Ubuntu Linux<\/h3>\n<div class=\"highlight\"><pre><span><\/span><code>$<span class=\"w\"> <\/span>sudo<span class=\"w\"> <\/span>apt-get<span class=\"w\"> <\/span>update\n$<span class=\"w\"> <\/span>sudo<span class=\"w\"> <\/span>apt-get<span class=\"w\"> <\/span>install<span class=\"w\"> <\/span>cryptech-alpha-ksng\n<\/code><\/pre><\/div>\n\n<h3>Installing cryptech-alpha-ksng package using Homebrew on OSX<\/h3>\n<div class=\"highlight\"><pre><span><\/span><code>$<span class=\"w\"> <\/span>brew<span class=\"w\"> <\/span>update\n$<span class=\"w\"> <\/span>brew<span class=\"w\"> <\/span>uninstall<span class=\"w\"> <\/span>cryptech-alpha\n$<span class=\"w\"> <\/span>brew<span class=\"w\"> <\/span>install<span class=\"w\"> <\/span>cryptech-alpha-ksng\n<\/code><\/pre><\/div>\n\n<h2>Set usual CRYPTECH_* environment variables<\/h2>\n<p>The upgrade process uses the <code>CRYPTECH_CTY_CLIENT_SERIAL_DEVICE<\/code>\nenvironment variable.  The easiest way to set it is by using the\n<code>cryptech_probe<\/code> script, just as you would for other usage of the\nAlpha.<\/p>\n<div class=\"highlight\"><pre><span><\/span><code>$<span class=\"w\"> <\/span><span class=\"nb\">eval<\/span><span class=\"w\"> <\/span><span class=\"sb\">`<\/span>cryptech_probe<span class=\"w\"> <\/span>-v<span class=\"sb\">`<\/span>\n<\/code><\/pre><\/div>\n\n<h2>Clear the keystore flash<\/h2>\n<p>Sorry about this.  Yes, we know we need backup and restore, we'll get\nthere.  But for this upgrade, it's safest to wipe the keystore.<\/p>\n<div class=\"highlight\"><pre><span><\/span><code>$<span class=\"w\"> <\/span>cryptech_miniterm\n\nUsername:<span class=\"w\"> <\/span>wheel\nPassword:<span class=\"w\"> <\/span>&lt;your-wheel-pin-goes-here&gt;\n\ncryptech&gt;<span class=\"w\"> <\/span>keystore<span class=\"w\"> <\/span>erase<span class=\"w\"> <\/span>YesIAmSure\n\n^<span class=\"o\">]<\/span>\n<\/code><\/pre><\/div>\n\n<h2>Upgrade the main HSM firmware<\/h2>\n<div class=\"highlight\"><pre><span><\/span><code><span class=\"o\">$<\/span><span class=\"w\"> <\/span><span class=\"n\">cryptech_upload<\/span><span class=\"w\"> <\/span><span class=\"o\">--<\/span><span class=\"n\">firmware<\/span><span class=\"w\"> <\/span><span class=\"o\">--<\/span><span class=\"n\">user<\/span><span class=\"w\"> <\/span><span class=\"n\">wheel<\/span>\n<span class=\"n\">PIN<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"n\">YouReallyNeedToChangeThisPINRightNowWeAreNotKidding<\/span>\n<\/code><\/pre><\/div>\n\n<h2>Upgrade the bootloader<\/h2>\n<div class=\"highlight\"><pre><span><\/span><code><span class=\"o\">$<\/span><span class=\"w\"> <\/span><span class=\"n\">cryptech_upload<\/span><span class=\"w\"> <\/span><span class=\"o\">--<\/span><span class=\"n\">bootloader<\/span><span class=\"w\"> <\/span><span class=\"o\">--<\/span><span class=\"n\">user<\/span><span class=\"w\"> <\/span><span class=\"n\">wheel<\/span><span class=\"w\"> <\/span><span class=\"o\">--<\/span><span class=\"n\">simon<\/span><span class=\"o\">-<\/span><span class=\"n\">says<\/span><span class=\"o\">-<\/span><span class=\"n\">whack<\/span><span class=\"o\">-<\/span><span class=\"n\">my<\/span><span class=\"o\">-<\/span><span class=\"n\">bootloader<\/span>\n<span class=\"n\">PIN<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"n\">YouReallyNeedToChangeThisPINRightNowWeAreNotKidding<\/span>\n<\/code><\/pre><\/div>\n\n<h2>Log in and set PINs, masterkey, etcetera<\/h2>\n<div class=\"highlight\"><pre><span><\/span><code>$<span class=\"w\"> <\/span>cryptech_miniterm\n\nUsername:<span class=\"w\"> <\/span>wheel\nPIN:<span class=\"w\"> <\/span>YouReallyNeedToChangeThisPINRightNowWeAreNotKidding\n\ncryptech&gt;<span class=\"w\"> <\/span>keystore<span class=\"w\"> <\/span><span class=\"nb\">set<\/span><span class=\"w\"> <\/span>pin<span class=\"w\"> <\/span>wheel<span class=\"w\"> <\/span>fnord\ncryptech&gt;<span class=\"w\"> <\/span>keystore<span class=\"w\"> <\/span><span class=\"nb\">set<\/span><span class=\"w\"> <\/span>pin<span class=\"w\"> <\/span>so<span class=\"w\">    <\/span>fnord\ncryptech&gt;<span class=\"w\"> <\/span>keystore<span class=\"w\"> <\/span><span class=\"nb\">set<\/span><span class=\"w\"> <\/span>pin<span class=\"w\"> <\/span>user<span class=\"w\">  <\/span>fnord\ncryptech&gt;<span class=\"w\"> <\/span>masterkey<span class=\"w\"> <\/span><span class=\"nb\">set<\/span>\n\n^<span class=\"o\">]<\/span>\n<\/code><\/pre><\/div>\n\n<h2>What to do if you manage to brick your Alpha<\/h2>\n<p>If the above procedure somehow goes horribly wrong and bricks your\nalpha, you can still recover, but you'll need an ST-LINK programmer.\nThere's some discussion of this at <a href=\"https:\/\/git.cryptech.is\/sw\/stm32.md\">sw\/stm32<\/a>.<\/p>\n<p>Possible sources for the ST-LINK programmer and a suitable cable:<\/p>\n<ul>\n<li>http:\/\/www.mouser.com\/search\/ProductDetail.aspx?R=0virtualkey0virtualkeyNUCLEO-F411RE<\/li>\n<li>https:\/\/www.sparkfun.com\/products\/10376<\/li>\n<\/ul>\n<p>These are relatively cheap, you'll probably pay as much for the\npostage as for the parts themselves.  If you have a better source, go\nfor it.<\/p>\n<p>The programmer is the important part, you can use any sort of cabling\nyou like so long as it connects the right pins of the programmer to\nthe corresponding pins on the Alpha; the SparkFun cable just happens\nto be a tidy package which matches the relevant SWD headers.<\/p>\n<p>We'll include a more detailed description of the recovery process here\nif anybody needs it, but the short version is:<\/p>\n<ul>\n<li>Install OpenOCD on your host machine.<\/li>\n<li>Open up the Alpha's case, take the board out.<\/li>\n<li>Connect the programmer and power the board back up.<\/li>\n<li>Use the <code>flash-target<\/code> script from the <code>sw\/stm32<\/code> repository to\n  stuff the <code>hsm.elf<\/code> and <code>bootloader.elf<\/code> files from the binary\n  firmware tarball into the HSM.<\/li>\n<li>Power down, disconnect the programmer, put the Alpha back in its\n  case, done.<\/li>\n<\/ul>","category":{"@attributes":{"term":"Releases"}}},{"title":"Alpha Sealed Bags","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/AlphaSealedBags","rel":"alternate"}},"published":"2016-12-16T14:09:00+00:00","updated":"2016-12-16T14:12:00+00:00","author":{"name":"Fredrik Thulin"},"id":"tag:wiki.cryptech.is,2016-12-16:\/AlphaSealedBags","summary":"<h2>Chain of custody<\/h2>\n<p>At present, we can't make any statements at all about the integrity of the hardware before it reached us - assembled and ready.<\/p>\n<p>We test and program the Alphas using a dedicated computer, but not in a secure facility by any means.\nA concerned user is advised to \u2026<\/p>","content":"<h2>Chain of custody<\/h2>\n<p>At present, we can't make any statements at all about the integrity of the hardware before it reached us - assembled and ready.<\/p>\n<p>We test and program the Alphas using a dedicated computer, but not in a secure facility by any means.\nA concerned user is advised to reprogram the firmware with binaries built from source.<\/p>\n<p>To provide some assurance the devices have not been tampered with after they have been programmed we put them in sealed bags with individual serial numbers.<\/p>\n<p>As the model of bags might change over time, we will publish photos of the bags used here as well as PGP signed statements for what serial numbers can be expected.\nAt this time, we do not keep records of which exact unit was sent to whom.<\/p>\n<p>This is a picture of the currently used bags:<\/p>\n<p><img alt=\"Alpha_tamper_bag_2016-12-16.png\" src=\"https:\/\/wiki.cryptech.is\/AlphaSealedBags\/AlphaSealedBags\/Alpha_tamper_bag_2016-12-16.png\"><\/p>\n<div class=\"highlight\"><pre><span><\/span><code><span class=\"gh\">-----BEGIN PGP SIGNED MESSAGE-----<\/span>\n<span class=\"na\">Hash<\/span><span class=\"o\">:<\/span><span class=\"w\"> <\/span><span class=\"s\">SHA512<\/span>\n\n<span class=\"s\">At<\/span><span class=\"w\"> <\/span><span class=\"s\">2016-12-16,<\/span><span class=\"w\"> <\/span><span class=\"s\">I<\/span><span class=\"w\"> <\/span><span class=\"s\">put<\/span><span class=\"w\"> <\/span><span class=\"s\">Cryptech<\/span><span class=\"w\"> <\/span><span class=\"s\">Alpha<\/span><span class=\"w\"> <\/span><span class=\"s\">units<\/span><span class=\"w\"> <\/span><span class=\"s\">into<\/span><span class=\"w\"> <\/span><span class=\"s\">sealed<\/span><span class=\"w\"> <\/span><span class=\"s\">bags<\/span><span class=\"w\"> <\/span><span class=\"s\">with<\/span><span class=\"w\"> <\/span><span class=\"s\">the<\/span>\n<span class=\"s\">following<\/span><span class=\"w\"> <\/span><span class=\"s\">serial<\/span><span class=\"w\"> <\/span><span class=\"s\">numbers:<\/span>\n\n<span class=\"w\">  <\/span><span class=\"s\">26<\/span><span class=\"w\"> <\/span><span class=\"s\">0<\/span><span class=\"w\"> <\/span><span class=\"s\">027<\/span><span class=\"w\"> <\/span><span class=\"s\">233<\/span><span class=\"w\"> <\/span><span class=\"s\">507<\/span>\n<span class=\"w\">  <\/span><span class=\"s\">26<\/span><span class=\"w\"> <\/span><span class=\"s\">0<\/span><span class=\"w\"> <\/span><span class=\"s\">027<\/span><span class=\"w\"> <\/span><span class=\"s\">233<\/span><span class=\"w\"> <\/span><span class=\"s\">508<\/span>\n<span class=\"w\">  <\/span><span class=\"s\">26<\/span><span class=\"w\"> <\/span><span class=\"s\">0<\/span><span class=\"w\"> <\/span><span class=\"s\">027<\/span><span class=\"w\"> <\/span><span class=\"s\">233<\/span><span class=\"w\"> <\/span><span class=\"s\">509<\/span>\n<span class=\"w\">  <\/span><span class=\"s\">26<\/span><span class=\"w\"> <\/span><span class=\"s\">0<\/span><span class=\"w\"> <\/span><span class=\"s\">027<\/span><span class=\"w\"> <\/span><span class=\"s\">233<\/span><span class=\"w\"> <\/span><span class=\"s\">510<\/span>\n<span class=\"w\">  <\/span><span class=\"s\">26<\/span><span class=\"w\"> <\/span><span class=\"s\">0<\/span><span class=\"w\"> <\/span><span class=\"s\">027<\/span><span class=\"w\"> <\/span><span class=\"s\">233<\/span><span class=\"w\"> <\/span><span class=\"s\">511<\/span>\n<span class=\"w\">  <\/span><span class=\"s\">26<\/span><span class=\"w\"> <\/span><span class=\"s\">0<\/span><span class=\"w\"> <\/span><span class=\"s\">027<\/span><span class=\"w\"> <\/span><span class=\"s\">233<\/span><span class=\"w\"> <\/span><span class=\"s\">512<\/span>\n<span class=\"w\">  <\/span><span class=\"s\">26<\/span><span class=\"w\"> <\/span><span class=\"s\">0<\/span><span class=\"w\"> <\/span><span class=\"s\">027<\/span><span class=\"w\"> <\/span><span class=\"s\">233<\/span><span class=\"w\"> <\/span><span class=\"s\">513<\/span>\n<span class=\"w\">  <\/span><span class=\"s\">26<\/span><span class=\"w\"> <\/span><span class=\"s\">0<\/span><span class=\"w\"> <\/span><span class=\"s\">027<\/span><span class=\"w\"> <\/span><span class=\"s\">233<\/span><span class=\"w\"> <\/span><span class=\"s\">514<\/span>\n<span class=\"w\">  <\/span><span class=\"s\">26<\/span><span class=\"w\"> <\/span><span class=\"s\">0<\/span><span class=\"w\"> <\/span><span class=\"s\">027<\/span><span class=\"w\"> <\/span><span class=\"s\">233<\/span><span class=\"w\"> <\/span><span class=\"s\">515<\/span>\n<span class=\"w\">  <\/span><span class=\"s\">26<\/span><span class=\"w\"> <\/span><span class=\"s\">0<\/span><span class=\"w\"> <\/span><span class=\"s\">027<\/span><span class=\"w\"> <\/span><span class=\"s\">233<\/span><span class=\"w\"> <\/span><span class=\"s\">516<\/span>\n<span class=\"w\">  <\/span><span class=\"s\">26<\/span><span class=\"w\"> <\/span><span class=\"s\">0<\/span><span class=\"w\"> <\/span><span class=\"s\">027<\/span><span class=\"w\"> <\/span><span class=\"s\">233<\/span><span class=\"w\"> <\/span><span class=\"s\">517<\/span>\n<span class=\"w\">  <\/span><span class=\"s\">26<\/span><span class=\"w\"> <\/span><span class=\"s\">0<\/span><span class=\"w\"> <\/span><span class=\"s\">027<\/span><span class=\"w\"> <\/span><span class=\"s\">233<\/span><span class=\"w\"> <\/span><span class=\"s\">518<\/span>\n<span class=\"w\">  <\/span><span class=\"s\">26<\/span><span class=\"w\"> <\/span><span class=\"s\">0<\/span><span class=\"w\"> <\/span><span class=\"s\">027<\/span><span class=\"w\"> <\/span><span class=\"s\">233<\/span><span class=\"w\"> <\/span><span class=\"s\">519<\/span>\n<span class=\"w\">  <\/span><span class=\"s\">26<\/span><span class=\"w\"> <\/span><span class=\"s\">0<\/span><span class=\"w\"> <\/span><span class=\"s\">027<\/span><span class=\"w\"> <\/span><span class=\"s\">233<\/span><span class=\"w\"> <\/span><span class=\"s\">520<\/span>\n<span class=\"w\">  <\/span><span class=\"s\">26<\/span><span class=\"w\"> <\/span><span class=\"s\">0<\/span><span class=\"w\"> <\/span><span class=\"s\">027<\/span><span class=\"w\"> <\/span><span class=\"s\">233<\/span><span class=\"w\"> <\/span><span class=\"s\">521<\/span>\n<span class=\"w\">  <\/span><span class=\"s\">26<\/span><span class=\"w\"> <\/span><span class=\"s\">0<\/span><span class=\"w\"> <\/span><span class=\"s\">027<\/span><span class=\"w\"> <\/span><span class=\"s\">233<\/span><span class=\"w\"> <\/span><span class=\"s\">522<\/span>\n<span class=\"w\">  <\/span><span class=\"s\">26<\/span><span class=\"w\"> <\/span><span class=\"s\">0<\/span><span class=\"w\"> <\/span><span class=\"s\">027<\/span><span class=\"w\"> <\/span><span class=\"s\">233<\/span><span class=\"w\"> <\/span><span class=\"s\">523<\/span>\n<span class=\"w\">  <\/span><span class=\"s\">26<\/span><span class=\"w\"> <\/span><span class=\"s\">0<\/span><span class=\"w\"> <\/span><span class=\"s\">027<\/span><span class=\"w\"> <\/span><span class=\"s\">233<\/span><span class=\"w\"> <\/span><span class=\"s\">524<\/span>\n<span class=\"w\">  <\/span><span class=\"s\">26<\/span><span class=\"w\"> <\/span><span class=\"s\">0<\/span><span class=\"w\"> <\/span><span class=\"s\">027<\/span><span class=\"w\"> <\/span><span class=\"s\">233<\/span><span class=\"w\"> <\/span><span class=\"s\">525<\/span>\n<span class=\"w\">  <\/span><span class=\"s\">26<\/span><span class=\"w\"> <\/span><span class=\"s\">0<\/span><span class=\"w\"> <\/span><span class=\"s\">027<\/span><span class=\"w\"> <\/span><span class=\"s\">233<\/span><span class=\"w\"> <\/span><span class=\"s\">526<\/span>\n\n<span class=\"na\">\/Fredrik<\/span>\n<span class=\"na\">-----BEGIN PGP SIGNATURE-----<\/span>\n<span class=\"na\">Version<\/span><span class=\"o\">:<\/span><span class=\"w\"> <\/span><span class=\"s\">GnuPG v2<\/span>\n\n<span class=\"s\">iQEcBAEBCgAGBQJYU\/MVAAoJEBmMGv1QUVLd+2gH\/jLZ7aUGlZ+Iwj6b746Hh6u1<\/span>\n<span class=\"s\">2JAZ+2tk5tRooTwNb4A5P3ewRcbjA0jPJQQlpVqZcxdt0DDjS16AR0LEaH2rWL++<\/span>\n<span class=\"s\">sj\/OtBm5rqAmVcf1NNvzpC8f8WWgRYhx4nNhWKnEcTBQXT9NbFQhQY0WH3ebupnn<\/span>\n<span class=\"s\">8PK0mX8PpfsjM\/3vxtVVLmi+vBsxv0hBcdl+t4IPw\/UbzozicF6jZpxRXxVujTE6<\/span>\n<span class=\"s\">WLGXaCnySS4T1zgtpewfgVMOMouGScUw5n2yHRZJpissGUVJtuPrOEmNFvDz7LRD<\/span>\n<span class=\"s\">i00Rc4i2emsKTgKrkMIKyQWSqFIQ1nBUQ5B5ES1Q50432cppbyEW2rJJZjAuxgM=<\/span>\n<span class=\"s\">=s2D5<\/span>\n<span class=\"gh\">-----END PGP SIGNATURE-----<\/span>\n<\/code><\/pre><\/div>","category":{"@attributes":{"term":"AlphaBoard"}}},{"title":"Joachim Str\u00f6mbergson","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/Joachim%20Str%C3%B6mbergson","rel":"alternate"}},"published":"2016-12-15T22:54:00+00:00","updated":"2016-12-15T22:54:00+00:00","author":{"name":"Joachim Str\u00f6mbergson"},"id":"tag:wiki.cryptech.is,2016-12-15:\/Joachim Str\u00f6mbergson","summary":"<h2>Bio<\/h2>\n<h2>Current activities<\/h2>\n<ul>\n<li>Developing coretest - a core testing framework for FPGAs.<\/li>\n<li>Implementation of UART<\/li>\n<li>Verification of SHA-256<\/li>\n<li>Verification of SHA-1<\/li>\n<li>Implementation of AES-128<\/li>\n<li>Design proposal for TRNG<\/li>\n<li>Design proposal for Curve25519 accelerator<\/li>\n<\/ul>\n<h2>Work Notes<\/h2>\n<h3>Presentations from meeting 2014-03-10 (updated and extended):<\/h3>\n<ul>\n<li><a href=\"https:\/\/git.cryptech.is\/doc\/presentations\/tree\/Cryptech_HW_status_2014-03-10.pdf\">Cryptech HW status 2014-03-10<\/a><\/li>\n<li><a href=\"https:\/\/git.cryptech.is\/doc\/presentations\/tree\/Cryptech_TRNG_Ideas_2014-03-17.pdf\">Cryptech TRNG Ideas 2014-03-17<\/a><\/li>\n<\/ul>\n<h3>Open \u2026<\/h3>","content":"<h2>Bio<\/h2>\n<h2>Current activities<\/h2>\n<ul>\n<li>Developing coretest - a core testing framework for FPGAs.<\/li>\n<li>Implementation of UART<\/li>\n<li>Verification of SHA-256<\/li>\n<li>Verification of SHA-1<\/li>\n<li>Implementation of AES-128<\/li>\n<li>Design proposal for TRNG<\/li>\n<li>Design proposal for Curve25519 accelerator<\/li>\n<\/ul>\n<h2>Work Notes<\/h2>\n<h3>Presentations from meeting 2014-03-10 (updated and extended):<\/h3>\n<ul>\n<li><a href=\"https:\/\/git.cryptech.is\/doc\/presentations\/tree\/Cryptech_HW_status_2014-03-10.pdf\">Cryptech HW status 2014-03-10<\/a><\/li>\n<li><a href=\"https:\/\/git.cryptech.is\/doc\/presentations\/tree\/Cryptech_TRNG_Ideas_2014-03-17.pdf\">Cryptech TRNG Ideas 2014-03-17<\/a><\/li>\n<\/ul>\n<h3>Open EDA Tools<\/h3>\n<ul>\n<li>http:\/\/torc-isi.sourceforge.net\/index.php - Torc is an open-source C++ infrastructure and tool set for reconfigurable computing<\/li>\n<\/ul>\n<h3>Curve25519<\/h3>\n<p>We need to create an accelerator or possibly a complete implementation of the Curve25519 EC based DH-excgange.  We should be able to look at some previous work:<\/p>\n<ul>\n<li>http:\/\/eprint.iacr.org\/2013\/375 - NaCl on 8-Bit AVR Microcontrollers. Includes an iterative implementation of Curve25519<\/li>\n<li>http:\/\/cryptojedi.org\/crypto\/index.shtml - The code to the implementation<\/li>\n<li>http:\/\/nacl.cr.yp.to\/ - The main NaCl library by DJB.<\/li>\n<li>http:\/\/cr.yp.to\/ecdh\/curve25519-20060209.pdf - The Curve25519 paper by DJB.<\/li>\n<\/ul>\n<h2>Pre meeting notes<\/h2>\n<h3>Stockholm 2013-12-05 - 2012-12-06<\/h3>\n<p>Preparation notes for the OpenHSM meeting 2013-12-05 --\n2013-12-06. The notes contains topics, questions and ideas\nI want to bring up, check and discuss on the meeting.<\/p>\n<h2>Philosophy<\/h2>\n<ul>\n<li>How to build trust in the project?<ul>\n<li>Total openess and transparency<\/li>\n<li>Traceability of decisions<\/li>\n<li>Focus on simple third party validation<\/li>\n<li>Partitioning of security functions<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2>Project goal<\/h2>\n<ul>\n<li>\n<p>Low cost vs high performance<\/p>\n<\/li>\n<li>\n<p>Scalability<\/p>\n<ul>\n<li>Functionality<\/li>\n<li>Performance<\/li>\n<li>Security<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Target system<\/p>\n<ul>\n<li>Performance<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Self contained, external<\/p>\n<ul>\n<li>USB,<\/li>\n<li>Ethernet<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Integrated<\/p>\n<ul>\n<li>PCIe<\/li>\n<li>Mem module<\/li>\n<li>SD card<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Target users<\/p>\n<ul>\n<li>Single user<\/li>\n<li>Enterprise<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Roadmap and development plan<\/p>\n<ul>\n<li>Prototyp - f\u00f6rsta m\u00e5lplattform<\/li>\n<li>Establish first Use cases<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Deliveries<\/p>\n<ul>\n<li>Proof of concept, prototype<\/li>\n<li>Self assembly and\/or finished product<\/li>\n<li>Source code for SW, HW<\/li>\n<li>PCB<\/li>\n<li>Enclosures<\/li>\n<li>Development environment<\/li>\n<li>Test, validation environment<\/li>\n<li>Tool development<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Time plan<\/p>\n<ul>\n<li>Start when<\/li>\n<li>Proto when<\/li>\n<li>v 1.0 when<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2>Project management<\/h2>\n<ul>\n<li>\n<p>Status financing<\/p>\n<\/li>\n<li>\n<p>Ownership<\/p>\n<\/li>\n<li>\n<p>Oveerseeing board<\/p>\n<ul>\n<li>IETF, ISOC,... ?<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Advisory board<\/p>\n<ul>\n<li>Reviewers, external experts<ul>\n<li>FPGA key extract dude<\/li>\n<li>DJB<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Team<\/p>\n<ul>\n<li>Addtiona competency needed?<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Project security<\/p>\n<ul>\n<li>Communication<\/li>\n<li>...<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2>Development general<\/h2>\n<ul>\n<li>\n<p>License(s)<\/p>\n<ul>\n<li>GPLv2, v3<\/li>\n<li>BSD<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Methodology<\/p>\n<ul>\n<li>Agile<\/li>\n<li>Minimal functionality in PoC<\/li>\n<li>Clear increments<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Repository<\/p>\n<ul>\n<li>Github<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2>Technology<\/h2>\n<ul>\n<li>\n<p>Target technologies<\/p>\n<ul>\n<li>FPGA (+ internal, external CPUs)<\/li>\n<li>ASIC<\/li>\n<li>Pure CPU based<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Target PoC board<\/p>\n<ul>\n<li>Select one early<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Toolchains and languages<\/p>\n<ul>\n<li>SW<\/li>\n<li>HW<ul>\n<li>Verilog 2001, 2005, SystemVerilog<\/li>\n<li>Icarus, gplcver<\/li>\n<li>Vendor specific<\/li>\n<li>Validation of bitstream<ul>\n<li>Edge of trust, dowm the Rabbit hole<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Security support in design<\/p>\n<ul>\n<li>JTAG<\/li>\n<li>BIST for functionality<\/li>\n<li>BIST for security<ul>\n<li>KATS<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>On-line self check<\/p>\n<ul>\n<li>RNG<ul>\n<li>Pathological problems<ul>\n<li>Stuck at fixed values<\/li>\n<li>variance<\/li>\n<li>bias<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Reuse of existing design, code?<\/p>\n<ul>\n<li>Cores - OpenCores<ul>\n<li>OpenRISC<\/li>\n<li>AES, SHA, RSA<\/li>\n<\/ul>\n<\/li>\n<li>SoftHSM - DNSSEC PKCS#11<\/li>\n<li>Nettle<\/li>\n<li>...<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>On chip 32-bit or 64 bit CPU core<\/p>\n<ul>\n<li>OpenRISC<ul>\n<li>LGPL<\/li>\n<li>http:\/\/openrisc.net\/<\/li>\n<li>http:\/\/opencores.org\/or1k\/Main_Page<\/li>\n<li>https:\/\/en.wikipedia.org\/wiki\/OpenRISC<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>RNG<\/p>\n<ul>\n<li>More than one entropy source<ul>\n<li>Just external sources<ul>\n<li>User\/vendor\/implemented supplied<\/li>\n<\/ul>\n<\/li>\n<li>One external, one internal<ul>\n<li>YubiHSM entropy source: https:\/\/www.yubico.com\/products\/yubihsm\/<\/li>\n<li>Haveged: http:\/\/www.issihosts.com\/haveged\/<\/li>\n<li>DakaRand: http:\/\/dankaminsky.com\/2012\/08\/15\/dakarand\/<\/li>\n<li>Jytter a userspace RNG: http:\/\/www.chronox.de\/<\/li>\n<li>CPU Jitter RNG: http:\/\/www.chronox.de\/<\/li>\n<\/ul>\n<\/li>\n<li>CSPRNG based on Linux, OpenBSD, Fortuna, NIST etc.<ul>\n<li>NIST SP 800-90. CTR_DRBG<\/li>\n<li>Fortuna https:\/\/en.wikipedia.org\/wiki\/Fortuna_PRNG<ul>\n<li>Schneier, Ferguson. No estimator needed.<\/li>\n<\/ul>\n<\/li>\n<li>OpenBSD arc4random: http:\/\/www.openbsd.org\/cgi-bin\/man.cgi?query=arc4random&amp;sektion=3<\/li>\n<\/ul>\n<\/li>\n<li>Raw read access in test mode to collected entropy pre whitening<\/li>\n<li>Write access in test mode to CSPRNG<\/li>\n<li>No key generation etc allowed during test mode.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2>Technical requirements<\/h2>\n<ul>\n<li>\n<p>Functional requirements<\/p>\n<ul>\n<li>TLS 1.x<\/li>\n<li>Need roadmap for functions<ul>\n<li>AES, SHA-256, DH, RSA first iteration<\/li>\n<\/ul>\n<\/li>\n<li>Why GOST?<\/li>\n<li>Why MD5?<\/li>\n<li>Curves supported?<ul>\n<li>Curve25519<\/li>\n<li>NIST, IEEE, RFC 4xxx<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>HW\/SW partitioning<\/p>\n<ul>\n<li>Modularity<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>API<\/p>\n<ul>\n<li>DMA, buffering, formats<\/li>\n<li>PKCS#11<\/li>\n<li>Observability and control<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Security requirements<\/p>\n<ul>\n<li>Common Criteria - EAL<\/li>\n<li>FIPS 140-2 level 3-4<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Performance<\/p>\n<ul>\n<li>Operations\/s<\/li>\n<li>Packets per second<\/li>\n<li>Latency<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2>Validaiton<\/h2>\n<ul>\n<li>\n<p>Methodology<\/p>\n<ul>\n<li>Unit tests, KATs<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Documentation<\/p>\n<ul>\n<li>What to document<\/li>\n<li>How<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Reviews<\/p>\n<ul>\n<li>Plan for them<\/li>\n<li>Who to ask<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Tools<\/p>\n<ul>\n<li>Valgrind, Purify, linters<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2>Documentation<\/h2>\n<ul>\n<li>\n<p>Meetings<\/p>\n<ul>\n<li>Discussions, MoMs<\/li>\n<li>Decisiona - motivation<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Design<\/p>\n<\/li>\n<li>Test and validation<\/li>\n<\/ul>","category":{"@attributes":{"term":"People"}}},{"title":"Development of a Cryptech ASIC Implementation","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/ASICImplementations","rel":"alternate"}},"published":"2016-12-15T22:44:00+00:00","updated":"2016-12-15T22:44:00+00:00","author":{"name":"Cryptech Core Team"},"id":"tag:wiki.cryptech.is,2016-12-15:\/ASICImplementations","summary":"<h2>Introduction<\/h2>\n<p>The aim of the Cryptech project is to develop an open, free, and\nauditable HSM.  The Cryptech HSM includes both SW and HW parts.  In at\nleast the first iteration of the Cryptech HSM, the HW parts are\nimplemented using FPGA devices.  However, the ability to implement the\nHW \u2026<\/p>","content":"<h2>Introduction<\/h2>\n<p>The aim of the Cryptech project is to develop an open, free, and\nauditable HSM.  The Cryptech HSM includes both SW and HW parts.  In at\nleast the first iteration of the Cryptech HSM, the HW parts are\nimplemented using FPGA devices.  However, the ability to implement the\nHW parts in a Cryptech ASIC device in a future iteration is anticipated\nin the design.  This text provides a short description of what the HW\npart of the Cryptech HSM contains, the design style used, and what would\nhave to change in order to implement the HW part in an ASIC.<\/p>\n<h2>General digital functions and internal memories<\/h2>\n<p>The Cryptech digital functionality cores, such as the SHA-256 core, are\nwritten in generic RTL (Register Transfer Level) Verilog code.  The code\nis written in a fairly conservative coding style and use language\nfeatures from IEEE 1364-2001 (aka Verilog 2001).<\/p>\n<p>All RTL code is divided into modules that contain one process for register updates and reset (<em>reg_update<\/em>), one or more combinational processes for datapath and support logic such as counters. Finally if needed, each module has a separate process that implements the logic for the final state machine that controls the behaviour of the module.<\/p>\n<p>All cores are divided into a core, for example <em>sha256_core.v<\/em> and a number of submodules the core instantiates. The core provides raw, wide ports (256 bit wide key for AES for example) that is not suitable to use in a stand alone system. Instead each core comes with a top level wrapper, for example <em>sha256.v<\/em>. This top level wrapper contains all registers and logic needed to provide all functionality of the core via a simple 32-bit memory like interface. If the core is going to be used as a tightly integrated submodule, the wrapper can be discarded. Similarly, if the core is going to be used in a bus system that use a specific bus standard such as AMBA AHB, CoreConnect or WISHBONE, only the top level wrapper will be needed to be replaced or modified to match the desired bus standard.<\/p>\n<p>The RTL code does not explicitly instantiate any hard macros such as\nmemories, multipliers, etc.  Instead all such functions are left to the\nsynthesis tool to infer based on the code. All memories are placed in separate modules to allow easy modification of the design. In an ASIC setting any memories not automatically mapped will be replaced by instantiation of specific macros.<\/p>\n<p>Some of the memories in the designs have combinational read (i.e the read\ndata is not locked by an output register, which infers a one cycle read\nlatency). For some FPGA technologies these memories are not compatible with the available physical memories. The synthesis tools therefor implement these memories\nusing separate registers rather than selecting a memory instance.  In an ASIC\nimplementation these memories would likely become real memory macros to allow for a faster and more compact implementation.<\/p>\n<h2>Interfaces<\/h2>\n<p>External interfaces such as GPIO, Ethernet GMII, UART, etc., will always\nrequire some modification for the Cryptech design to be implemented in a\ngiven technology, whether it is a specific FPGA type or an ASIC.  The\nimportant thing is that the Cryptech design does not use technology\nspecific macros to implement the interfaces.  But pin assignments,\ntiming, and electrical requirements will always require adjustment and\nwork.<\/p>\n<h2>Clocking and reset<\/h2>\n<p>The design style used in the Cryptech Verilog code currently follows the\nguidelines from the FPGA vendors Altera and Xilinx.  This means that we\nuse synchronous reset.  For an ASIC implementation this will also work,\neven though asynchronous reset is far more common in ASIC designs.  Changing\nto asynchronous reset is not a very big undertaking however, as the\nregister reset and update clocking are separated into easily\nidentifiable processes (<em>reg_update<\/em>) in the modules.<\/p>\n<p>Most if not all registers in the Cryptech Verilog code have a defined\nreset state.  Most registers also have a write enable signal that\ncontrols the update.  This corresponds well with the registers available\nin FPGA technologies from Altera and Xilinx and their recommended design strategy from the vendors. This is also in line with common\nand good design styles for ASICs, which allows for compact code and low\npower implementations. The design is currently not use any clock gating. In future revisions this might be added if power consumption needs to be reduced and does not add side channel issues.<\/p>\n<h2>External memories<\/h2>\n<p>The Cryptech hardware design will use external persistent memories for\nprotected key storage as well as external SRAM for protected master key\nstorage.  In an ASIC implementation the master key memory would probably\nbe integrated to further enhance security.<\/p>\n<p>Just like other external interfaces (see above), the interfaces for the\nexternal memories do not use any explicitly instantiated hard macros in\nthe FPGAs.<\/p>\n<h2>Entropy sources<\/h2>\n<p>The current Cryptech design contains two separate physical entropy\nsources.<\/p>\n<p>1: An avalanche noise based entropy source placed outside the FPGA.  The\nentropy source signal is sampled by the FPGA using a flank detection\nmechanism.<\/p>\n<p>An ASIC implementation would be able to use the external entropy source just like the FPGA. Furthermore, depending on the process options, it might be\npossible to have an internal avalanche diode based on ESD structures commonly used in I\/O pin implementations. In a power management capable process, functionality available in step-up converters might also be possible to use as internal avalanche noise source.<\/p>\n<p>Note that integrating the avalanche noise source does not mean that an off-chip noise source is excluded. The Cryptech RNG is modular and having both an internal and an external avalanche noise source is quite possible.<\/p>\n<p>2: A ring oscillator based entropy source placed inside the FPGA. The ring oscillator used in the FPGA is based on carry chain feedback through adders. An ASIC implementation of this ring oscillator should work and produce noise with similar characteristics. However the specific circuit will have to be characterized with explicit layout and qualified for the given process.<\/p>\n<h2>Toolchain<\/h2>\n<p>Crypech currently use Verilog simulators for functional verification and commercial FPGA tools for implementation including time analysis.<\/p>\n<p>An ASIC implementation will require several new tools including tools for synthesis, place &amp; route and static time analysis that is acceptable as sign-off tool by the chip process vendor.<\/p>\n<h2>Conclusions<\/h2>\n<p>The HW designed for the first iteration of Cryptech is not specifically\ndesigned for FPGA implementation, but is in fact designed in a generic\nway to allow for easy implementation using different technologies such\nas ASICs.<\/p>\n<p>There are however parts of the design that will have to be updated or\nmodified in order to create a good ASIC implementation.  The Cryptech\nproject is confident that we know what those parts are and what they\nwould entail.<\/p>\n<p>Developing an ASIC will however require new tools which will incur costs.<\/p>","category":{"@attributes":{"term":"FutureWork"}}},{"title":"High resolution pictures of the Alpha board","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/AlphaBoardPictures","rel":"alternate"}},"published":"2016-12-15T22:44:00+00:00","updated":"2017-05-19T17:49:00+00:00","author":{"name":"Rob Austein"},"id":"tag:wiki.cryptech.is,2016-12-15:\/AlphaBoardPictures","content":"<p>Attached to this page are high resolution pictures.<\/p>\n<p>The current revision of the Alpha board is rev03.<\/p>\n<p>rev01 was the board known as the 'dev-bridge'.<\/p>\n<p>rev02 was functionally the same as the rev03, but in another form factor.<\/p>\n<p><img alt=\"Alpha_rev03_top_med.jpg\" src=\"https:\/\/wiki.cryptech.is\/AlphaBoardPictures\/AlphaBoardPictures\/Alpha_rev03_top_med.jpg\"><\/p>\n<p><img alt=\"Alpha_rev03_bottom_med.jpg\" src=\"https:\/\/wiki.cryptech.is\/AlphaBoardPictures\/AlphaBoardPictures\/Alpha_rev03_bottom_med.jpg\"><\/p>","category":{"@attributes":{"term":"AlphaBoard"}}},{"title":"Issues of an Assured Tool-Chain","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/AssuredTooChain","rel":"alternate"}},"published":"2016-12-15T22:44:00+00:00","updated":"2016-12-15T22:44:00+00:00","author":{"name":"Cryptech Core Team"},"id":"tag:wiki.cryptech.is,2016-12-15:\/AssuredTooChain","summary":"<p>We do not have any assurance that our basic tools are not compromised.<\/p>\n<ul>\n<li>Compilers<\/li>\n<li>Operating Systems<\/li>\n<li>Hardware Platforms<\/li>\n<li>Verilog and Other Tools to Produce Chips<\/li>\n<\/ul>\n<p>At the base, is the compiler.  The fear was first formally expressed in\nKen Thompson's 1984 Turing Award Lecture\n<a href=\"http:\/\/www.ece.cmu.edu\/~ganger\/712.fall02\/papers\/p761-thompson.pdf\">Reflections on Trusting Trust<\/a>.<\/p>\n<p>David A \u2026<\/p>","content":"<p>We do not have any assurance that our basic tools are not compromised.<\/p>\n<ul>\n<li>Compilers<\/li>\n<li>Operating Systems<\/li>\n<li>Hardware Platforms<\/li>\n<li>Verilog and Other Tools to Produce Chips<\/li>\n<\/ul>\n<p>At the base, is the compiler.  The fear was first formally expressed in\nKen Thompson's 1984 Turing Award Lecture\n<a href=\"http:\/\/www.ece.cmu.edu\/~ganger\/712.fall02\/papers\/p761-thompson.pdf\">Reflections on Trusting Trust<\/a>.<\/p>\n<p>David A. Wheeler's PhD thesis, <a href=\"http:\/\/www.dwheeler.com\/trusting-trust\/\">Fully Countering Trusting Trust through Diverse Double-Compiling<\/a>\noutlines how we might deal with the compiler trust conundrum.<\/p>","category":{"@attributes":{"term":"FutureWork"}}},{"title":"Binary Packages for Cryptech Software and Firmware","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/BinaryPackages","rel":"alternate"}},"published":"2016-12-15T22:44:00+00:00","updated":"2019-09-03T15:23:00+00:00","author":{"name":"Rob Austein"},"id":"tag:wiki.cryptech.is,2016-12-15:\/BinaryPackages","summary":"<p>The Cryptech Project maintains APT and Homebrew repositories\ncontaining packaged software for the Cryptech Alpha board for Debian\nand Ubuntu Linux and for Mac OS X.  The binary packages also include\npre-compiled images for the Alpha Board's Artix-7 FPGA, Cortex M4 ARM\nCPU, and AVR ATtiny828 MCU.<\/p>\n<h2>How to get \u2026<\/h2>","content":"<p>The Cryptech Project maintains APT and Homebrew repositories\ncontaining packaged software for the Cryptech Alpha board for Debian\nand Ubuntu Linux and for Mac OS X.  The binary packages also include\npre-compiled images for the Alpha Board's Artix-7 FPGA, Cortex M4 ARM\nCPU, and AVR ATtiny828 MCU.<\/p>\n<h2>How to get APT packages for Debian Stretch, Debian Buster, Ubuntu Xenial, or Ubuntu Bionic<\/h2>\n<ul>\n<li>\n<p>Fetch and validate the repository key.  Presumably you're security\n    concious (otherwise, why are you installing this stuff?), so you may\n    want to pay attention to what <code>gpg --check-sig<\/code> says here.<\/p>\n<div class=\"highlight\"><pre><span><\/span><code>id=37A8E93F5D7E7B9A\nwget https:\/\/apt.cryptech.is\/apt-gpg-key.gpg\ngpg --recv-key $id\ngpg --check-sig $id\n<\/code><\/pre><\/div>\n\n<\/li>\n<li>\n<p>Install the repository key.  We used to use <code>apt-key(8)<\/code> for this,\n    these days the cool kids use the <code>\/etc\/apt\/trusted.gpg.d\/<\/code> directory:<\/p>\n<div class=\"highlight\"><pre><span><\/span><code>sudo chown root:root apt-gpg-key.gpg\nsudo mv apt-gpg-key.gpg \/etc\/apt\/trusted.gpg.d\/cryptech.gpg\n<\/code><\/pre><\/div>\n\n<\/li>\n<li>\n<p>Configure apt to use the repository.  You need to add a couple of\n    entries to <code>\/etc\/apt\/source.list.d\/<\/code>; which entries you need to add\n    depends on which distribution you're running.<\/p>\n<ul>\n<li>\n<p>For Debian Stretch, do:<\/p>\n<div class=\"highlight\"><pre><span><\/span><code>sudo wget -q -O \/etc\/apt\/sources.list.d\/cryptech.list https:\/\/apt.cryptech.is\/sources.stretch.list\n<\/code><\/pre><\/div>\n\n<\/li>\n<li>\n<p>For Debian Buster, do:<\/p>\n<div class=\"highlight\"><pre><span><\/span><code>sudo wget -q -O \/etc\/apt\/sources.list.d\/cryptech.list https:\/\/apt.cryptech.is\/sources.buster.list\n<\/code><\/pre><\/div>\n\n<\/li>\n<li>\n<p>For Ubuntu Xenial, do:<\/p>\n<div class=\"highlight\"><pre><span><\/span><code>sudo wget -q -O \/etc\/apt\/sources.list.d\/cryptech.list https:\/\/apt.cryptech.is\/sources.xenial.list\n<\/code><\/pre><\/div>\n\n<\/li>\n<li>\n<p>For Ubuntu Bionic, do:<\/p>\n<div class=\"highlight\"><pre><span><\/span><code>sudo wget -q -O \/etc\/apt\/sources.list.d\/cryptech.list https:\/\/apt.cryptech.is\/sources.bionic.list\n<\/code><\/pre><\/div>\n\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Update the package index.<\/p>\n<div class=\"highlight\"><pre><span><\/span><code>sudo apt-get update\n<\/code><\/pre><\/div>\n\n<\/li>\n<li>\n<p>Install the <code>cryptech-alpha<\/code> package.<\/p>\n<div class=\"highlight\"><pre><span><\/span><code>sudo apt-get install cryptech-alpha\n<\/code><\/pre><\/div>\n\n<\/li>\n<\/ul>\n<h2>Updating APT packages<\/h2>\n<p>Once you've performed the steps above you should be able to upgrade to newer\nversion of the code using the normal APT upgrade process:<\/p>\n<div class=\"highlight\"><pre><span><\/span><code>sudo apt-get update\nsudo apt-get upgrade\n<\/code><\/pre><\/div>\n\n<h2>How to get Homebrew packages for Mac OS X<\/h2>\n<ul>\n<li>\n<p>Fetch and validate the repository key.  Presumably you're security\n    concious (otherwise, why are you installing this stuff?), so you may\n    want to pay attention to what <code>gpg --check-sig<\/code> says here.<\/p>\n<div class=\"highlight\"><pre><span><\/span><code>id=37A8E93F5D7E7B9A\ngpg --recv-key $id\ngpg --check-sig $id\n<\/code><\/pre><\/div>\n\n<\/li>\n<li>\n<p>Configure Homebrew to use the repository.<\/p>\n<div class=\"highlight\"><pre><span><\/span><code>brew tap cryptech\/sw https:\/\/brew.cryptech.is\/tap\n<\/code><\/pre><\/div>\n\n<\/li>\n<li>\n<p>Update the package index.<\/p>\n<div class=\"highlight\"><pre><span><\/span><code>brew update\n<\/code><\/pre><\/div>\n\n<\/li>\n<li>\n<p>Check the commit signature on the cryptech-alpha package formula.\n    This is optional (Homebrew doesn't care whether you do this), but if\n    you want to know whether the formula was signed by the Cryptech\n    project, this is how to check.<\/p>\n<div class=\"highlight\"><pre><span><\/span><code><span class=\"nv\">brew<\/span><span class=\"w\"> <\/span><span class=\"nv\">log<\/span><span class=\"w\"> <\/span><span class=\"o\">--<\/span><span class=\"nv\">max<\/span><span class=\"o\">-<\/span><span class=\"nv\">count<\/span><span class=\"o\">=<\/span><span class=\"mi\">1<\/span><span class=\"w\"> <\/span><span class=\"o\">--<\/span><span class=\"k\">show<\/span><span class=\"o\">-<\/span><span class=\"nv\">signature<\/span><span class=\"w\"> <\/span><span class=\"nv\">cryptech<\/span><span class=\"o\">-<\/span><span class=\"nv\">alpha<\/span>\n<\/code><\/pre><\/div>\n\n<\/li>\n<li>\n<p>Install the <code>cryptech-alpha<\/code> package.  At the moment, this is only\n    available as a Homebrew source package due to licensing issues in\n    the MacOS Xcode SDK, so the installation will probably take several\n    minutes, as some of the libraries are a bit slow to compile (sorry...).<\/p>\n<div class=\"highlight\"><pre><span><\/span><code>brew install cryptech-alpha\n<\/code><\/pre><\/div>\n\n<\/li>\n<\/ul>\n<h2>Updating Homebrew packages<\/h2>\n<p>Once you've performed the steps above you should be able to upgrade to newer\nversion of the code using the normal Homebrew upgrade process:<\/p>\n<div class=\"highlight\"><pre><span><\/span><code>brew update\nbrew upgrade\nbrew cleanup\n<\/code><\/pre><\/div>","category":{"@attributes":{"term":"Releases"}}},{"title":"How to start using coretest_hashes on the Novena PVT1","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/CoretestHashesNovena","rel":"alternate"}},"published":"2016-12-15T22:44:00+00:00","updated":"2016-12-15T22:44:00+00:00","author":{"name":"Cryptech Core Team"},"id":"tag:wiki.cryptech.is,2016-12-15:\/CoretestHashesNovena","summary":"<p>This is a writeup on how to setup, build and testrun the coretest_hashes\nCryptech subsystem on a Novena PVT1 development board.<\/p>\n<h2>Getting started with Novena<\/h2>\n<p><a href=\"http:\/\/www.kosagi.com\/w\/index.php?title=Novena_Main_Page\">Novena<\/a> is an open hardware and F\/OSS-friendly computing platform.<\/p>\n<p><img src=\"http:\/\/bunniefoo.com\/novena\/pvt1_release\/novena_pvt1e_top_sm.jpg\"><\/p>\n<p>It is a small single-board Linux PC, which happens to include a Xilinx <a href=\"http:\/\/www.xilinx.com\/products\/silicon-devices\/fpga\/spartan-6\/lx.html\">Spartan-6 FPGA \u2026<\/a><\/p>","content":"<p>This is a writeup on how to setup, build and testrun the coretest_hashes\nCryptech subsystem on a Novena PVT1 development board.<\/p>\n<h2>Getting started with Novena<\/h2>\n<p><a href=\"http:\/\/www.kosagi.com\/w\/index.php?title=Novena_Main_Page\">Novena<\/a> is an open hardware and F\/OSS-friendly computing platform.<\/p>\n<p><img src=\"http:\/\/bunniefoo.com\/novena\/pvt1_release\/novena_pvt1e_top_sm.jpg\"><\/p>\n<p>It is a small single-board Linux PC, which happens to include a Xilinx <a href=\"http:\/\/www.xilinx.com\/products\/silicon-devices\/fpga\/spartan-6\/lx.html\">Spartan-6 FPGA<\/a>. This, together with the TerasIC <a href=\"https:\/\/wiki.cryptech.is\/CoretestHashesC5G\">Cyclone 5 GX<\/a>, is what we are using to develop and test the Cryptech cores.<\/p>\n<p>The Novena includes an HDMI adapter and two USB ports, so you can plug in a monitor, keyboard, and mouse, and have a graphical desktop environment. However, I prefer to run it headless, and ssh to it. To ssh to the Novena, you need to know its IP address, which means you need to either statically configure it, or you need to assign it an address in your DHCP server.<\/p>\n<p>If you go the DHCP route, be aware that Novena doesn't used a fixed hardware address, so you'll have to statically configure <strong>that<\/strong>.\nOpen <code>\/etc\/network\/interfaces<\/code>, and add something like the following lines:<\/p>\n<div class=\"highlight\"><pre><span><\/span><code><span class=\"nx\">allow<\/span><span class=\"o\">-<\/span><span class=\"nx\">hotplug<\/span><span class=\"w\"> <\/span><span class=\"nx\">eth0<\/span>\n<span class=\"nx\">iface<\/span><span class=\"w\"> <\/span><span class=\"nx\">eth0<\/span><span class=\"w\"> <\/span><span class=\"nx\">inet<\/span><span class=\"w\"> <\/span><span class=\"nx\">dhcp<\/span>\n<span class=\"w\">  <\/span><span class=\"nx\">hwaddress<\/span><span class=\"w\"> <\/span><span class=\"nx\">ether<\/span><span class=\"w\"> <\/span><span class=\"mi\">00<\/span><span class=\"p\">:<\/span><span class=\"mi\">0<\/span><span class=\"nx\">e<\/span><span class=\"p\">:<\/span><span class=\"nx\">c6<\/span><span class=\"p\">:<\/span><span class=\"mi\">87<\/span><span class=\"p\">:<\/span><span class=\"mi\">72<\/span><span class=\"p\">:<\/span><span class=\"mi\">01<\/span>\n<\/code><\/pre><\/div>\n\n<ul>\n<li>The specific CPU on the Novena is the Freescale i.MX6 MCIMX6Q5EYM12AC device. A quad core, ARM A9 device running at 1.2 GHz.<\/li>\n<li>The specific FPGA on the Novena is the Xilinx Spartan-6 XC6SLX45-3CSG324C device.<\/li>\n<li>Here are <a href=\"http:\/\/bunniefoo.com\/novena\/pvt2_release\/novena_pvt2.PDF\">the schematics for the Novena PVT2 board<\/a>.<\/li>\n<\/ul>\n<h3>Coretest_hashes<\/h3>\n<p>The coretest_hashes is a subsystem that is a FPGA design that contains\nCryptech application cores as well as support cores used to run tests\nof the SHA-1 and SHA-2 hash functions from the host computer via an\nI2C serial bus. The subsystem consists of:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/git.cryptech.is\/core\/sha1\">sha1<\/a>: A HW implementation of the SHA-1 hash function.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/git.cryptech.is\/core\/sha256\">sha256<\/a>: A HW implementation of the SHA-256 hash\n  function.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/git.cryptech.is\/core\/sha512\">sha512<\/a>: A HW implementation of the SHA-512 hash\n  function.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/git.cryptech.is\/core\/coretest\">coretest<\/a>: A command parser that accepts read\/write\n  commands from a host, executes the commands and sends the response.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/git.cryptech.is\/core\/i2c\">i2c<\/a>: A serial interface that connects coretest to the\n  host.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/git.cryptech.is\/core\/novena\">novena<\/a>: A top-level wrapper that connects all<\/p>\n<\/li>\n<\/ul>\n<p>the cores, and connects i2c to external pins as well as clk and\n reset. This repo also contains userland software that talks to\n coretest and performs tests of the sha1, sha256, and sha512 cores.<\/p>\n<h2>Software and system requirements<\/h2>\n<p>You need to download and install the Xilinx\n<a href=\"http:\/\/www.xilinx.com\/support\/download\/index.html\/content\/xilinx\/en\/downloadNav\/design-tools.html\">ISE Design Suite<\/a>.<\/p>\n<p>Note: this software runs on a Windows or x86 Linux host, <strong>not<\/strong> on the Novena.<\/p>\n<h3>Installing on Linux<\/h3>\n<p>The Windows install is pretty straight-forward. So is the Linux\ninstall, but with a few extra notes:<\/p>\n<ul>\n<li>\n<p>Xilinx only supports specific versions of Red Hat and Suse Linux, but it does run on Ubuntu, with the following caveat: Ubuntu symlinks <code>\/bin\/sh<\/code> to <code>dash<\/code>, which can't handle <code>if [ ]<\/code> syntax in shell scripts, so I symlinked <code>\/bin\/sh<\/code> to <code>bash<\/code> instead.<\/p>\n<\/li>\n<li>\n<p>ISE Design Suite uses a graphical installer, so has to be installed\n  on a desktop edition, not a server edition.<\/p>\n<\/li>\n<li>\n<p>Although the software can be installed as user or root, by default\n  it wants to install into <code>\/opt\/Xilinx<\/code>, so you need to install as root\n  if you want to do that.<\/p>\n<\/li>\n<li>\n<p>The Xilinx tools are disk hogs, so if you're building a VM for this, you'll probably want to give it at least 30-40 GB of disk space.<\/p>\n<\/li>\n<\/ul>\n<p>Step-by-step installation:\n1. Unpack Xilinx_ISE_DS_Lin_14.7_1015_1.tar (or whatever version you have).\n2. <code>cd<\/code> to Xilinx_ISE_DS_Lin_14.7_1015_1, and run <code>sudo .\/xsetup<\/code>\n3. Click through two screens of license agreements.\n4. Select <code>ISE WebPACK<\/code>.\n5. Unselect (or leave unselected) <code>Install Cable Drivers<\/code>.\n6. Go!<\/p>\n<p>Well, not quite.  You will need to convince the ISE that you have a license.<\/p>\n<p>On the page <a href=\"http:\/\/www.xilinx.com\/products\/design-tools\/ise-design-suite\/ise-webpack.htm\">http:\/\/www.xilinx.com\/products\/design-tools\/ise-design-suite\/ise-webpack.htm<\/a> click on the <code>Licensing Solutions<\/code> link.  On the resulting page, expand the section <code>Obtain a license for Free or Evaluation product<\/code>.  To download the ISE Webpack, you should have created an account, so now you can go to the Licensing Site and use that account to create a Certificate Based License.<\/p>\n<p>You do not need to go through the HostID dance, just say Do It.  You will then receive a certificate in email (not an X.509 certificate) which you will be able to use.  Then start the ISE Webpack by issuing the command <code>ise<\/code>.  Go to the Help menu and <code>Manage Licenses<\/code>.  Use the resulting new License Manager window to install the .lic file.  This process is complex and flakey.<\/p>\n<p>Here is a more detailed description of <a href=\"http:\/\/www.armadeus.com\/wiki\/index.php?title=ISE_WebPack_installation_on_Linux\">installing ISE in Ubuntu.<\/a><\/p>\n<p>Platforms on which at least one person has done this succesfully:<\/p>\n<ul>\n<li>ISE 14.7 on a 32-bit Debian Wheezy VM running under VirtualBox on MacOSX.<\/li>\n<li>ISE 14.7 on a 64-bit Debian Jessie VM running under virsh\/kvm.<\/li>\n<li>ISE 14.7 on 32-bit Debian Jessie on a Shuttle XS36V.<\/li>\n<\/ul>\n<h2>Downloading the cores<\/h2>\n<p>Create a project directory, e.g. <code>coretest\/core<\/code>.<\/p>\n<p>The cores we need to build the subsystem must be downloaded from the\nCryptech server. Check them out one by one:<\/p>\n<div class=\"highlight\"><pre><span><\/span><code><span class=\"ch\">#!sh<\/span>\ngit<span class=\"w\"> <\/span>clone<span class=\"w\"> <\/span>http:\/\/git.cryptech.is\/core\/sha1.git\ngit<span class=\"w\"> <\/span>clone<span class=\"w\"> <\/span>http:\/\/git.cryptech.is\/core\/sha256.git\ngit<span class=\"w\"> <\/span>clone<span class=\"w\"> <\/span>http:\/\/git.cryptech.is\/core\/sha512.git\ngit<span class=\"w\"> <\/span>clone<span class=\"w\"> <\/span>http:\/\/git.cryptech.is\/core\/i2c.git\ngit<span class=\"w\"> <\/span>clone<span class=\"w\"> <\/span>http:\/\/git.cryptech.is\/core\/coretest.git\ngit<span class=\"w\"> <\/span>clone<span class=\"w\"> <\/span>http:\/\/git.cryptech.is\/core\/novena.git\n<\/code><\/pre><\/div>\n\n<p>If you are a cryptech core member, use the ssh method, e.g.<\/p>\n<div class=\"highlight\"><pre><span><\/span><code><span class=\"n\">git<\/span><span class=\"w\"> <\/span><span class=\"n\">clone<\/span><span class=\"w\"> <\/span><span class=\"n\">git<\/span><span class=\"nv\">@git<\/span><span class=\"p\">.<\/span><span class=\"n\">cryptech<\/span><span class=\"p\">.<\/span><span class=\"k\">is<\/span><span class=\"err\">:<\/span><span class=\"n\">core<\/span><span class=\"o\">\/<\/span><span class=\"n\">sha1<\/span><span class=\"p\">.<\/span><span class=\"n\">git<\/span>\n<\/code><\/pre><\/div>\n\n<h2>Building the cores<\/h2>\n<h3>Building in Linux command-line<\/h3>\n<p>Go to <code>novena\/synth<\/code> and run <code>make<\/code>.<\/p>\n<p>Depending on your version of ISE Design Suite, where you installed it,\nand whether you're running it on 32-bit or 64-bit hardware, you may\nhave to change the <code>isedir<\/code> and <code>xil_env<\/code> values in <code>Makefile<\/code>.<\/p>\n<h3>Building in the ISE application<\/h3>\n<p>On Windows, open the Project Navigator link.<\/p>\n<p>On Linux, run e.g. <code>\/opt\/Xilinx\/14.7\/ISE_DS\/ISE\/bin\/lin64\/ise<\/code><\/p>\n<p>a. Create the project:\n   Select <code>File<\/code> &gt; <code>New Project<\/code><\/p>\n<ul>\n<li>Name: novena<\/li>\n<li>Location: ...\/toolruns (automatically appends \"novena\")<\/li>\n<li>Family: Spartan6<\/li>\n<li>Device: XC6SLX45<\/li>\n<li>Package: CSG324<\/li>\n<li>Speed: -3<\/li>\n<\/ul>\n<p>b. Add files to the project:<\/p>\n<ul>\n<li>coretest\/src\/rtl\/coretest.v<\/li>\n<li>coretest_test_core\/src\/rtl\/coretest_test_core.v<\/li>\n<li>i2c\/src\/rtl\/i2c.v<\/li>\n<li>i2c\/src\/rtl\/i2c_core.v<\/li>\n<li>novena\/src\/rtl\/coretest_hashes.v<\/li>\n<li>novena\/src\/rtl\/novena_fpga.v<\/li>\n<li>novena\/synth\/coretest-novena.ucf<\/li>\n<li>sha1\/src\/rtl\/sha1.v<\/li>\n<li>sha1\/src\/rtl\/sha1_core.v<\/li>\n<li>sha1\/src\/rtl\/sha1_w_mem.v<\/li>\n<li>sha256\/src\/rtl\/sha256.v<\/li>\n<li>sha256\/src\/rtl\/sha256_core.v<\/li>\n<li>sha256\/src\/rtl\/sha256_k_constants.v<\/li>\n<li>sha256\/src\/rtl\/sha256_w_mem.v<\/li>\n<li>sha512\/src\/rtl\/sha512.v<\/li>\n<li>sha512\/src\/rtl\/sha512_core.v<\/li>\n<li>sha512\/src\/rtl\/sha512_h_constants.v<\/li>\n<li>sha512\/src\/rtl\/sha512_k_constants.v<\/li>\n<li>sha512\/src\/rtl\/sha512_w_mem.v<\/li>\n<\/ul>\n<p>c. Set some non-default options:<\/p>\n<p><em>Note: these are derived from other Novena projects, and I'm not sure\n   what they mean, but they don't make things blow up.<\/em><\/p>\n<ul>\n<li>In the <code>Process<\/code> window, right-click on <code>Generate Programming File<\/code>, select <code>Process Properties...<\/code>.<ul>\n<li>In <code>Configuration Options<\/code>, find <code>-g UnusedPin<\/code>, and change it from <code>Pull Down<\/code> to <code>Float<\/code>.<\/li>\n<li>In <code>Startup Options<\/code>, find <code>-g DriveDone<\/code>, and check the box.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>d. Build the project<\/p>\n<p>Select <code>Process<\/code> &gt; <code>Implement Top Module<\/code><\/p>\n<p>The expected build time should be something like 5 and 10 minutes, depending on the computer used.\nSome measured build times for the design:<\/p>\n<ul>\n<li>5,30 minutes on MacbookPro 2013 with tools in 64-bit SUSE Linux in VM<\/li>\n<li>9,20 minutes on AMD A10-6800K with tools in Windows 7 in Virtualbox VM with one CPU core and 4 GByte RAM.<\/li>\n<\/ul>\n<h2>Running coretest on the Novena<\/h2>\n<p><code>scp<\/code> the built <code>coretest-novena.bit<\/code> to the Novena.<\/p>\n<p>Fetch\n<a href=\"https:\/\/github.com\/xobs\/novena-scope-drivers\/blob\/master\/userspace\/devmem2.c\">devmem2.c<\/a>\nand compile it on the Novena.<\/p>\n<p><code>scp<\/code> the following files from <code>novena\/src\/sw<\/code> to the Novena:<\/p>\n<ul>\n<li>configure.sh<\/li>\n<li>hash_tester.py<\/li>\n<\/ul>\n<p>To configure the coretest image into the FPGA, run<\/p>\n<div class=\"highlight\"><pre><span><\/span><code><span class=\"ch\">#!sh<\/span>\n.\/configure.sh<span class=\"w\"> <\/span>coretest-novena.bit\n<\/code><\/pre><\/div>\n\n<p>This should light a small green LED (labeled \"fpga\") next to the high-speed\nexpansion connector. The console log should be:<\/p>\n<div class=\"highlight\"><pre><span><\/span><code><span class=\"n\">Setting<\/span><span class=\"w\"> <\/span><span class=\"k\">export<\/span><span class=\"w\"> <\/span><span class=\"n\">of<\/span><span class=\"w\"> <\/span><span class=\"n\">reset<\/span><span class=\"w\"> <\/span><span class=\"n\">pin<\/span>\n<span class=\"n\">setting<\/span><span class=\"w\"> <\/span><span class=\"n\">reset<\/span><span class=\"w\"> <\/span><span class=\"n\">pin<\/span><span class=\"w\"> <\/span><span class=\"n\">to<\/span><span class=\"w\"> <\/span><span class=\"n\">out<\/span>\n<span class=\"n\">flipping<\/span><span class=\"w\"> <\/span><span class=\"n\">reset<\/span>\n<span class=\"n\">configuring<\/span><span class=\"w\"> <\/span><span class=\"n\">FPGA<\/span>\n<span class=\"mi\">11597<\/span><span class=\"o\">+<\/span><span class=\"mi\">1<\/span><span class=\"w\"> <\/span><span class=\"n\">records<\/span><span class=\"w\"> <\/span><span class=\"ow\">in<\/span>\n<span class=\"mi\">11597<\/span><span class=\"o\">+<\/span><span class=\"mi\">1<\/span><span class=\"w\"> <\/span><span class=\"n\">records<\/span><span class=\"w\"> <\/span><span class=\"n\">out<\/span>\n<span class=\"mi\">1484509<\/span><span class=\"w\"> <\/span><span class=\"n\">bytes<\/span><span class=\"w\"> <\/span><span class=\"p\">(<\/span><span class=\"mf\">1.5<\/span><span class=\"w\"> <\/span><span class=\"n\">MB<\/span><span class=\"p\">)<\/span><span class=\"w\"> <\/span><span class=\"n\">copied<\/span><span class=\"p\">,<\/span><span class=\"w\"> <\/span><span class=\"mf\">2.34345<\/span><span class=\"w\"> <\/span><span class=\"n\">s<\/span><span class=\"p\">,<\/span><span class=\"w\"> <\/span><span class=\"mi\">633<\/span><span class=\"w\"> <\/span><span class=\"n\">kB<\/span><span class=\"o\">\/<\/span><span class=\"n\">s<\/span>\n<span class=\"n\">turning<\/span><span class=\"w\"> <\/span><span class=\"n\">on<\/span><span class=\"w\"> <\/span><span class=\"n\">clock<\/span><span class=\"w\"> <\/span><span class=\"n\">to<\/span><span class=\"w\"> <\/span><span class=\"n\">FPGA<\/span>\n<span class=\"o\">\/<\/span><span class=\"n\">dev<\/span><span class=\"o\">\/<\/span><span class=\"n\">mem<\/span><span class=\"w\"> <\/span><span class=\"n\">opened<\/span><span class=\"o\">.<\/span>\n<span class=\"n\">Memory<\/span><span class=\"w\"> <\/span><span class=\"n\">mapped<\/span><span class=\"w\"> <\/span><span class=\"n\">at<\/span><span class=\"w\"> <\/span><span class=\"n\">address<\/span><span class=\"w\"> <\/span><span class=\"mh\">0x76f51000<\/span><span class=\"o\">.<\/span>\n<span class=\"n\">Value<\/span><span class=\"w\"> <\/span><span class=\"n\">at<\/span><span class=\"w\"> <\/span><span class=\"n\">address<\/span><span class=\"w\"> <\/span><span class=\"mh\">0x20C8160<\/span><span class=\"w\"> <\/span><span class=\"p\">(<\/span><span class=\"mh\">0x76f51160<\/span><span class=\"p\">):<\/span><span class=\"w\"> <\/span><span class=\"mh\">0x40B<\/span>\n<span class=\"n\">Written<\/span><span class=\"w\"> <\/span><span class=\"mh\">0xD2B<\/span><span class=\"p\">;<\/span><span class=\"w\"> <\/span><span class=\"n\">readback<\/span><span class=\"w\"> <\/span><span class=\"mh\">0xD2B<\/span>\n<\/code><\/pre><\/div>\n\n<p>Run <code>hash_tester.py<\/code> to go through the full test suite.<\/p>","category":{"@attributes":{"term":"Novena"}}},{"title":"DNSSEC\/Requirements","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/DNSSEC-Requirements","rel":"alternate"}},"published":"2016-12-15T22:44:00+00:00","updated":"2016-12-15T22:44:00+00:00","author":{"name":"Cryptech Core Team"},"id":"tag:wiki.cryptech.is,2016-12-15:\/DNSSEC-Requirements","summary":"<h1>DNSSEC Requirements<\/h1>\n<h2>Questions<\/h2>\n<ul>\n<li>Should we even support SHA-1?<\/li>\n<li>GOST?<\/li>\n<\/ul>\n<h2>Must implement<\/h2>\n<p>Target DNSSEC Algorithms:<\/p>\n<ul>\n<li>RSA\/SHA-256 (RFC 5702)<\/li>\n<li>RSA\/SHA-512 (RFC 5702)<\/li>\n<\/ul>\n<p>Algorithms:<\/p>\n<ul>\n<li>Hash: SHA-256<\/li>\n<li>Hash: SHA-512<\/li>\n<li>Sign: RSA<\/li>\n<\/ul>\n<p>Required PKCS11 Mechs:<\/p>\n<ul>\n<li>CKM_RSA_PKCS_KEY_PAIR_GEN<\/li>\n<li>CKM_SHA256_RSA_PKCS<\/li>\n<li>CKM_SHA512_RSA_PKCS<\/li>\n<li>CKM_RSA_PKCS (possible cross-check hash with CKM_SHA256 and CKM_SHA512 before signing)<\/li>\n<li>CKM_SHA256<\/li>\n<li>CKM_SHA512<\/li>\n<\/ul>\n<h2>Should implement<\/h2>\n<p>Target \u2026<\/p>","content":"<h1>DNSSEC Requirements<\/h1>\n<h2>Questions<\/h2>\n<ul>\n<li>Should we even support SHA-1?<\/li>\n<li>GOST?<\/li>\n<\/ul>\n<h2>Must implement<\/h2>\n<p>Target DNSSEC Algorithms:<\/p>\n<ul>\n<li>RSA\/SHA-256 (RFC 5702)<\/li>\n<li>RSA\/SHA-512 (RFC 5702)<\/li>\n<\/ul>\n<p>Algorithms:<\/p>\n<ul>\n<li>Hash: SHA-256<\/li>\n<li>Hash: SHA-512<\/li>\n<li>Sign: RSA<\/li>\n<\/ul>\n<p>Required PKCS11 Mechs:<\/p>\n<ul>\n<li>CKM_RSA_PKCS_KEY_PAIR_GEN<\/li>\n<li>CKM_SHA256_RSA_PKCS<\/li>\n<li>CKM_SHA512_RSA_PKCS<\/li>\n<li>CKM_RSA_PKCS (possible cross-check hash with CKM_SHA256 and CKM_SHA512 before signing)<\/li>\n<li>CKM_SHA256<\/li>\n<li>CKM_SHA512<\/li>\n<\/ul>\n<h2>Should implement<\/h2>\n<p>Target DNSSEC Algorithms:<\/p>\n<ul>\n<li>ECDSA\/P-256\/SHA-256 (RFC 6605)<\/li>\n<li>ECDSA\/P-384\/SHA-384 (RFC 6605)<\/li>\n<\/ul>\n<p>Algorithms:<\/p>\n<ul>\n<li>Hash: SHA-256<\/li>\n<li>Hash: SHA-384<\/li>\n<li>Sign: P-256<\/li>\n<li>Sign: P-384<\/li>\n<\/ul>\n<p>Required PKCS11 Mechs:<\/p>\n<ul>\n<li>CKM_EC_KEY_PAIR_GEN<\/li>\n<li>CKM_ECDSA_SHA256<\/li>\n<li>CKM_ECDSA_SHA384<\/li>\n<li>CKM_ECDSA (possible cross-check hash with CKM_SHA256 and CKM_SHA512 before signing)<\/li>\n<li>CKM_SHA256<\/li>\n<li>CKM_SHA384<\/li>\n<\/ul>\n<h2>May implement<\/h2>\n<p>Target DNSSEC Algorithms:<\/p>\n<ul>\n<li>RSA\/SHA-1 (RFC 3110)<\/li>\n<li>GOST (RFC 5933)<\/li>\n<\/ul>\n<p>Algorithms:<\/p>\n<ul>\n<li>Hash: SHA-1<\/li>\n<li>\n<p>Sign: RSA<\/p>\n<\/li>\n<li>\n<p>Hash: GOST R 34.11-94 (RFC5831)<\/p>\n<\/li>\n<li>Sign: GOST R 34.10-2001 (RFC5832)<\/li>\n<\/ul>\n<p>Required PKCS11 Mechs:<\/p>\n<ul>\n<li>CKM_RSA_PKCS_KEY_PAIR_GEN<\/li>\n<li>CKM_RSA_PKCS (possible cross-check hash with CKM_SHA_1)<\/li>\n<li>CKM_SHA1_RSA_PKCS<\/li>\n<li>\n<p>CKM_SHA_1<\/p>\n<\/li>\n<li>\n<p>CKM_GOSTR3410_KEY_PAIR_GEN<\/p>\n<\/li>\n<li>CKM_GOSTR3410_WITH_GOSTR3411<\/li>\n<\/ul>","category":{"@attributes":{"term":"DNSSEC"}}},{"title":"Project Status Dashboard","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/Dashboard","rel":"alternate"}},"published":"2016-12-15T22:44:00+00:00","updated":"2016-12-15T22:44:00+00:00","author":{"name":"Cryptech Core Team"},"id":"tag:wiki.cryptech.is,2016-12-15:\/Dashboard","summary":"<h2>Product Component Requirements<\/h2>\n<table>\n<thead>\n<tr>\n<th>State<\/th>\n<th>Component<\/th>\n<th>DNSsec Signing<\/th>\n<th>Let's Encrypt<\/th>\n<th>Tor Consensus<\/th>\n<th>Internal<\/th>\n<th>Ticket<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Done<\/td>\n<td>AES \/ KEY WRAP<\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td>Wrap\/Bkup<\/td>\n<td>#17<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>ECDSA p256<\/td>\n<td>secondary<\/td>\n<td>Yes<\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>ECDSA p384<\/td>\n<td>secondary<\/td>\n<td>?<\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Testing<\/td>\n<td>PKCS#11<\/td>\n<td>Yes<\/td>\n<td>Yes<\/td>\n<td>Yes<\/td>\n<td>Yes<\/td>\n<td>#14<\/td>\n<\/tr>\n<tr>\n<td>Done<\/td>\n<td>RSA<\/td>\n<td>Yes<\/td>\n<td>Yes<\/td>\n<td>Yes<\/td>\n<td><\/td>\n<td>#16<\/td>\n<\/tr>\n<tr>\n<td>Done<\/td>\n<td>SHA-1<\/td>\n<td><\/td>\n<td><\/td>\n<td>Yes<\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Done<\/td>\n<td>SHA-256<\/td>\n<td>Yes<\/td>\n<td>Yes<\/td>\n<td>Yes<\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Done \u2026<\/td><\/tr><\/tbody><\/table>","content":"<h2>Product Component Requirements<\/h2>\n<table>\n<thead>\n<tr>\n<th>State<\/th>\n<th>Component<\/th>\n<th>DNSsec Signing<\/th>\n<th>Let's Encrypt<\/th>\n<th>Tor Consensus<\/th>\n<th>Internal<\/th>\n<th>Ticket<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Done<\/td>\n<td>AES \/ KEY WRAP<\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td>Wrap\/Bkup<\/td>\n<td>#17<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>ECDSA p256<\/td>\n<td>secondary<\/td>\n<td>Yes<\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>ECDSA p384<\/td>\n<td>secondary<\/td>\n<td>?<\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Testing<\/td>\n<td>PKCS#11<\/td>\n<td>Yes<\/td>\n<td>Yes<\/td>\n<td>Yes<\/td>\n<td>Yes<\/td>\n<td>#14<\/td>\n<\/tr>\n<tr>\n<td>Done<\/td>\n<td>RSA<\/td>\n<td>Yes<\/td>\n<td>Yes<\/td>\n<td>Yes<\/td>\n<td><\/td>\n<td>#16<\/td>\n<\/tr>\n<tr>\n<td>Done<\/td>\n<td>SHA-1<\/td>\n<td><\/td>\n<td><\/td>\n<td>Yes<\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Done<\/td>\n<td>SHA-256<\/td>\n<td>Yes<\/td>\n<td>Yes<\/td>\n<td>Yes<\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Done<\/td>\n<td>SHA-384<\/td>\n<td>Yes<\/td>\n<td>?<\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Done<\/td>\n<td>TRNG<\/td>\n<td>padding<\/td>\n<td>padding<\/td>\n<td>padding<\/td>\n<td>KeyGen<\/td>\n<td>#15<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Novena Alpha - DNSsec Only<\/h2>\n<table>\n<thead>\n<tr>\n<th>Component<\/th>\n<th>Who<\/th>\n<th>About When<\/th>\n<th>Ticket<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>RSA<\/td>\n<td>Pavel, Rob<\/td>\n<td>Done<\/td>\n<td>#16<\/td>\n<\/tr>\n<tr>\n<td>AES\/KEY WRAP<\/td>\n<td>Rob<\/td>\n<td>Done<\/td>\n<td>#17<\/td>\n<\/tr>\n<tr>\n<td>SHA-256<\/td>\n<td>Joachim<\/td>\n<td>Done<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>TRNG<\/td>\n<td>FT<\/td>\n<td>Done<\/td>\n<td>#15<\/td>\n<\/tr>\n<tr>\n<td>PKCS#11<\/td>\n<td>Rob<\/td>\n<td>Late May<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>PKCS#11 PIN<\/td>\n<td>Rob<\/td>\n<td>Mid June<\/td>\n<td>#14<\/td>\n<\/tr>\n<tr>\n<td>Packaging<\/td>\n<td>Paul, Rob<\/td>\n<td>Done<\/td>\n<td><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Hardware cores<\/h2>\n<h3>Hash Functions<\/h3>\n<table>\n<thead>\n<tr>\n<th>Component<\/th>\n<th>Status<\/th>\n<th>Repository<\/th>\n<th>Comment<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>SHA-1<\/td>\n<td>Done<\/td>\n<td><a href=\"https:\/\/git.cryptech.is\/core\/hash\/sha1\/about\">core\/hash\/sha1<\/a><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>SHA-256<\/td>\n<td>Done<\/td>\n<td><a href=\"https:\/\/git.cryptech.is\/core\/hash\/sha256\/about\">core\/hash\/sha256<\/a><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>SHA-512<\/td>\n<td>Done<\/td>\n<td><a href=\"https:\/\/git.cryptech.is\/core\/hash\/sha512\/about\">core\/hash\/sha512<\/a><\/td>\n<td>Support all four SHA-512\/x modes defined in FIPS 180-4.<\/td>\n<\/tr>\n<tr>\n<td>SHA-3 (Keccak )<\/td>\n<td>Started<\/td>\n<td><a href=\"https:\/\/git.cryptech.is\/core\/hash\/sha3\/about\">core\/hash\/sha3<\/a><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>GOST R 34.11-2012<\/td>\n<td>Started<\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Symmetric Crypto<\/h3>\n<table>\n<thead>\n<tr>\n<th>Component<\/th>\n<th>Status<\/th>\n<th>Repository<\/th>\n<th>Comment<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>AES<\/td>\n<td>Done<\/td>\n<td><a href=\"https:\/\/git.cryptech.is\/core\/cipher\/aes\/about\">core\/cipher\/aes<\/a><\/td>\n<td>AES cipher core with support for 128 and 256 bit keys.<\/td>\n<\/tr>\n<tr>\n<td>ChaCha<\/td>\n<td>Done<\/td>\n<td><a href=\"https:\/\/git.cryptech.is\/core\/cipher\/chacha\/about\">core\/cipher\/chacha<\/a><\/td>\n<td>High speed stream cipher. Based on the Salsa20 stream cipher.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Asymmetric Crypto<\/h3>\n<table>\n<thead>\n<tr>\n<th>Component<\/th>\n<th>Status<\/th>\n<th>Repository<\/th>\n<th>Comment<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>ModExp -8192 (RSA)<\/td>\n<td>Done<\/td>\n<td><a href=\"https:\/\/git.cryptech.is\/core\/math\/modexps6\/about\">core\/math\/modexps6<\/a><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Curve25519<\/td>\n<td>Started<\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Ed25519<\/td>\n<td>Not started<\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>P-256, P-384 ECDSA<\/td>\n<td>Started<\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>GOST R 34.10-2001<\/td>\n<td>Started<\/td>\n<td><a href=\"https:\/\/git.cryptech.is\/user\/shatov\/gost\/streebog\">https:\/\/git.cryptech.is\/user\/shatov\/gost\/streebog<\/a><\/td>\n<td>Core in provisional repo. Will be moved to the the hash core section.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Random Number Generators<\/h3>\n<table>\n<thead>\n<tr>\n<th>Component<\/th>\n<th>Status<\/th>\n<th>Repository<\/th>\n<th>Comment<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>TRNG<\/td>\n<td>Done<\/td>\n<td><a href=\"https:\/\/git.cryptech.is\/core\/rng\/trng\/about\">core\/rng\/trng<\/a><\/td>\n<td>Depends on SHA-512 and ChaCha<\/td>\n<\/tr>\n<tr>\n<td>External Avalanche Entropy<\/td>\n<td>Done<\/td>\n<td><a href=\"https:\/\/git.cryptech.is\/core\/rng\/avalanche_entropy\/about\">core\/rng\/avalanche_entropy<\/a><\/td>\n<td><a href=\"https:\/\/git.cryptech.is\/user\/ft\/stm32-avalanche-noise\/about\">Hardware<\/a> and stand-alone PoC<\/td>\n<\/tr>\n<tr>\n<td>Internal Ring Oscillator<\/td>\n<td>Done<\/td>\n<td><a href=\"https:\/\/git.cryptech.is\/core\/rng\/rosc_entropy\/about\">core\/rng\/rosc_entropy<\/a><\/td>\n<td><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Key wrapping and Cipher Modes<\/h3>\n<table>\n<thead>\n<tr>\n<th>Component<\/th>\n<th>Status<\/th>\n<th>Repository<\/th>\n<th>Comment<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>KEY WRAP<\/td>\n<td>Done<\/td>\n<td><\/td>\n<td>Key wrapping mode. Will be used for key storage. See <a href=\"https:\/\/tools.ietf.org\/html\/rfc3394\">rfc 3394<\/a>. #17<\/td>\n<\/tr>\n<tr>\n<td>GCM<\/td>\n<td>Not started<\/td>\n<td><\/td>\n<td>Galois Counter Mode. AEAD cipher.<\/td>\n<\/tr>\n<tr>\n<td>CTR and CBC<\/td>\n<td>Not started<\/td>\n<td><\/td>\n<td>Basic block cipher modes.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Support Functionality<\/h3>\n<table>\n<thead>\n<tr>\n<th>Component<\/th>\n<th>Status<\/th>\n<th>Repository<\/th>\n<th>Comment<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Coretest<\/td>\n<td>Done<\/td>\n<td><a href=\"https:\/\/git.cryptech.is\/core\/comm\/coretest\/about\">core\/comm\/coretest<\/a><\/td>\n<td>Command-response based core tester for HW accelerated core verification.<\/td>\n<\/tr>\n<tr>\n<td>UART<\/td>\n<td>Done<\/td>\n<td><a href=\"https:\/\/git.cryptech.is\/core\/comm\/uart\/about\">core\/comm\/uart<\/a><\/td>\n<td>Serial interface module used on the TerasIC C5G development board.<\/td>\n<\/tr>\n<tr>\n<td>I2C<\/td>\n<td>Done<\/td>\n<td><a href=\"https:\/\/git.cryptech.is\/core\/comm\/i2c\/about\">core\/comm\/i2c<\/a><\/td>\n<td>I2C interface module used on the Novena board.<\/td>\n<\/tr>\n<tr>\n<td>EIM<\/td>\n<td>Done<\/td>\n<td><a href=\"https:\/\/git.cryptech.is\/core\/comm\/eim\/about\">core\/comm\/eim<\/a><\/td>\n<td>Interface for the Freescale EIM memory interface used on the Novena board.<\/td>\n<\/tr>\n<tr>\n<td>FMC<\/td>\n<td>Done<\/td>\n<td><a href=\"https:\/\/git.cryptech.is\/core\/comm\/fmc\/about\">core\/comm\/fmc<\/a><\/td>\n<td>Interface for the STM32 FMC memory interface used on the dev-bridge and Alpha boards.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>","category":{"@attributes":{"term":"misc"}}},{"title":"Getting Started on the Novena","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/GettingStartedNovena","rel":"alternate"}},"published":"2016-12-15T22:44:00+00:00","updated":"2016-12-15T22:44:00+00:00","author":{"name":"Cryptech Core Team"},"id":"tag:wiki.cryptech.is,2016-12-15:\/GettingStartedNovena","summary":"<h2>The Novena Board<\/h2>\n<p><img src=\"http:\/\/bunniefoo.com\/novena\/pvt1_release\/novena_pvt1e_top_sm.jpg\"><\/p>\n<p><a href=\"http:\/\/www.kosagi.com\/w\/index.php?title=Novena_Main_Page\">Novena<\/a> is an open hardware and F\/OSS-friendly computing platform. It is a small single-board Linux PC, with a Freescale i.MX6 (ARM\nCortex-A9) CPU and a Xilinx Spartan-6 LX45 FPGA.<\/p>\n<p>It is available in limited quantities through <a href=\"https:\/\/www.crowdsupply.com\/sutajio-kosagi\/novena\">crowd supply<\/a>.<\/p>\n<h3>Setting up the Novena<\/h3>\n<p>The Novena PVT-2 \u2026<\/p>","content":"<h2>The Novena Board<\/h2>\n<p><img src=\"http:\/\/bunniefoo.com\/novena\/pvt1_release\/novena_pvt1e_top_sm.jpg\"><\/p>\n<p><a href=\"http:\/\/www.kosagi.com\/w\/index.php?title=Novena_Main_Page\">Novena<\/a> is an open hardware and F\/OSS-friendly computing platform. It is a small single-board Linux PC, with a Freescale i.MX6 (ARM\nCortex-A9) CPU and a Xilinx Spartan-6 LX45 FPGA.<\/p>\n<p>It is available in limited quantities through <a href=\"https:\/\/www.crowdsupply.com\/sutajio-kosagi\/novena\">crowd supply<\/a>.<\/p>\n<h3>Setting up the Novena<\/h3>\n<p>The Novena PVT-2 requires some initial setup. You will need to attach a USB keyboard and HDMI monitor.<\/p>\n<p>Once this is done, most of us prefer to run it headless, and ssh in.<\/p>\n<p>You may also want to bring the packages up to date:<\/p>\n<div class=\"highlight\"><pre><span><\/span><code>$<span class=\"w\"> <\/span>sudo<span class=\"w\"> <\/span>apt-get<span class=\"w\"> <\/span>update\n$<span class=\"w\"> <\/span>sudo<span class=\"w\"> <\/span>apt-get<span class=\"w\"> <\/span>upgrade\n<\/code><\/pre><\/div>\n\n<h2>The Avalanche Noise Board<\/h2>\n<p><img alt=\"rev03-on-novena.jpg\" src=\"https:\/\/wiki.cryptech.is\/GettingStartedNovena\/GettingStartedNovena\/rev03-on-novena.jpg\"><\/p>\n<p>The avalanche noise board is a Novena daughter board that contains a zener-diode noise circuit that can be read directly by the FPGA.<\/p>\n<p><em>(More information from FT: block diagram, schematics, ...)<\/em><\/p>\n<p>It is available in limited quantities directly from Fredrik Thulin, and will be distributed at the PrahaWorkshop.<\/p>\n<h2>Binary Packages<\/h2>\n<p>Cryptech maintains an <code>apt<\/code> repository, with two binary packages for the Novena:<\/p>\n<ul>\n<li>a bitstream, to be configured into the FPGA<\/li>\n<li>software, to run on the CPU<\/li>\n<\/ul>\n<h3>How to get them<\/h3>\n<p>All commands are run on the Novena.<\/p>\n<ol>\n<li>First, get the hactrn CA certificate:<\/li>\n<\/ol>\n<div class=\"highlight\"><pre><span><\/span><code>$<span class=\"w\"> <\/span>wget<span class=\"w\"> <\/span>http:\/\/www.hactrn.net\/cacert.asc\n<\/code><\/pre><\/div>\n\n<p>Get the key used to sign the CA certificate.<\/p>\n<div class=\"highlight\"><pre><span><\/span><code>$<span class=\"w\"> <\/span>gpg<span class=\"w\"> <\/span>--recv-keys<span class=\"w\"> <\/span>2DC6FF82\n<\/code><\/pre><\/div>\n\n<p>Validate the CA certificate<\/p>\n<div class=\"highlight\"><pre><span><\/span><code>$<span class=\"w\"> <\/span>gpg<span class=\"w\"> <\/span>cacert.asc\n<\/code><\/pre><\/div>\n\n<p>Install the CA certficiate.<\/p>\n<div class=\"highlight\"><pre><span><\/span><code>$<span class=\"w\"> <\/span>sudo<span class=\"w\"> <\/span>mkdir<span class=\"w\"> <\/span>\/usr\/share\/ca-certificates\/hactrn.org\n$<span class=\"w\"> <\/span>sudo<span class=\"w\"> <\/span>mv<span class=\"w\"> <\/span>cacert<span class=\"w\"> <\/span>\/usr\/share\/ca-certificates\/hactrn.org\/cacert.crt\n$<span class=\"w\"> <\/span>sudo<span class=\"w\"> <\/span>dpkg-reconfigure<span class=\"w\"> <\/span>ca-certificates\n<\/code><\/pre><\/div>\n\n<ol>\n<li>Get the repository key.<\/li>\n<\/ol>\n<div class=\"highlight\"><pre><span><\/span><code>$<span class=\"w\"> <\/span>wget<span class=\"w\"> <\/span>https:\/\/apt.cryptech.is\/novena\/apt-gpg-key.asc\n<\/code><\/pre><\/div>\n\n<p>Validate the key.<\/p>\n<div class=\"highlight\"><pre><span><\/span><code>$<span class=\"w\"> <\/span><span class=\"nv\">id<\/span><span class=\"o\">=<\/span>37A8E93F5D7E7B9A\n$<span class=\"w\"> <\/span>gpg<span class=\"w\"> <\/span>--recv-key<span class=\"w\"> <\/span><span class=\"nv\">$id<\/span>\n$<span class=\"w\"> <\/span>gpg<span class=\"w\"> <\/span>--check-sig<span class=\"w\"> <\/span><span class=\"nv\">$id<\/span>\n$<span class=\"w\"> <\/span>gpg<span class=\"w\"> <\/span>--export<span class=\"w\"> <\/span><span class=\"nv\">$id<\/span><span class=\"w\"> <\/span><span class=\"p\">|<\/span><span class=\"w\"> <\/span>sudo<span class=\"w\"> <\/span>apt-key<span class=\"w\"> <\/span>add<span class=\"w\"> <\/span>-\n<\/code><\/pre><\/div>\n\n<p>See the apt-key(8) manual page for more information about the APT key database, including how to remove keys you don't want anymore.<\/p>\n<p>Install the key.<\/p>\n<div class=\"highlight\"><pre><span><\/span><code>$<span class=\"w\"> <\/span>sudo<span class=\"w\"> <\/span>apt-key<span class=\"w\"> <\/span>add<span class=\"w\"> <\/span>apt-gpg-key.asc\n<\/code><\/pre><\/div>\n\n<ol>\n<li>Get the packages<\/li>\n<\/ol>\n<p>Configure apt to use the repository.<\/p>\n<div class=\"highlight\"><pre><span><\/span><code>$<span class=\"w\"> <\/span>sudo<span class=\"w\"> <\/span>wget<span class=\"w\"> <\/span>-q<span class=\"w\"> <\/span>-O<span class=\"w\"> <\/span>\/etc\/apt\/sources.list.d\/novena.list<span class=\"w\"> <\/span>https:\/\/apt.cryptech.is\/novena\/sources.list\n<\/code><\/pre><\/div>\n\n<p>Update the package index file.<\/p>\n<div class=\"highlight\"><pre><span><\/span><code>$<span class=\"w\"> <\/span>sudo<span class=\"w\"> <\/span>apt-get<span class=\"w\"> <\/span>update\n<\/code><\/pre><\/div>\n\n<p>Get the cryptech meta-package.<\/p>\n<div class=\"highlight\"><pre><span><\/span><code>$<span class=\"w\"> <\/span>sudo<span class=\"w\"> <\/span>apt-get<span class=\"w\"> <\/span>install<span class=\"w\"> <\/span>cryptech-novena\n<\/code><\/pre><\/div>\n\n<p>This installs the <code>cryptech-novena-rtl<\/code> and <code>cryptech-novena-sw<\/code> packages.<\/p>\n<p>The <code>cryptech-novena-rtl<\/code> package includes an <code>init.d<\/code> script that configures the FPGA on system startup. This script should run automatically as part of the install process.<\/p>\n<h3>Updating the packages<\/h3>\n<p>Once you've performed the steps above you should be able to upgrade to newer\nversion of the code using the normal APT upgrade process, eg:<\/p>\n<div class=\"highlight\"><pre><span><\/span><code>$<span class=\"w\"> <\/span>sudo<span class=\"w\"> <\/span>apt-get<span class=\"w\"> <\/span>update\n$<span class=\"w\"> <\/span>sudo<span class=\"w\"> <\/span>apt-get<span class=\"w\"> <\/span>upgrade\n<\/code><\/pre><\/div>\n\n<h2>Setting up PKCS#11<\/h2>\n<p>The PKCS11 token is in \/usr\/lib\/libpkcs11.so. In order to start using it you need to set a pin and an SO pin. This you do with p11util thus:<\/p>\n<div class=\"highlight\"><pre><span><\/span><code>(echo 12345678;echo 1234) | sudo p11util --set-so-pin --set-user-pin --pin-from-stdin\n<\/code><\/pre><\/div>\n\n<p>It is strongly suggested to change the so pin and pin (in that order above) to something sensible. Now your token is ready to use. Your favorite PKCS11-client may or may not work depending on the state of support for PKCS11 function calls - please open tickets for whatever is missing. If you want\/need to talk PKCS11 from another host, you could install and configure <a href=\"https:\/\/wiki.cryptech.is\/PKCS11Proxy\">PKCS11Proxy<\/a> on both the novena and your host. Note that currently pkcs11-proxy doesn't handle differing word-lengths so your client-side will have to be 32bit (since the novena is).<\/p>\n<h2>Setting up the lab signer<\/h2>\n<p>The lab DNSSEC signer MUST, at this point, be running on a 32-bit system in order to work with the 32-bit Novena.<\/p>\n<p><a href=\"https:\/\/www.dropbox.com\/s\/f8b4s9vic7hsqyb\/cryptech-proxy-lab-20150718r2.pdf\">https:\/\/www.dropbox.com\/s\/f8b4s9vic7hsqyb\/cryptech-proxy-lab-20150718r2.pdf<\/a><\/p>","category":{"@attributes":{"term":"Novena"}}},{"title":"Comparison of On-Chip Bus Standards","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/InterconnectStandards","rel":"alternate"}},"published":"2016-12-15T22:44:00+00:00","updated":"2016-12-15T22:44:00+00:00","author":{"name":"Cryptech Core Team"},"id":"tag:wiki.cryptech.is,2016-12-15:\/InterconnectStandards","summary":"<h2>Introduction<\/h2>\n<p>This document contains a brief summary of different on-chip bus\nstandards. The standards are described and compared based on license and\navailability, technical specifications and general usage.<\/p>\n<p>The purpose of the document is to provide a basis for selecting the\nprimary bus standard for the Cryptech Open HSM project \u2026<\/p>","content":"<h2>Introduction<\/h2>\n<p>This document contains a brief summary of different on-chip bus\nstandards. The standards are described and compared based on license and\navailability, technical specifications and general usage.<\/p>\n<p>The purpose of the document is to provide a basis for selecting the\nprimary bus standard for the Cryptech Open HSM project.<\/p>\n<h2>Overview<\/h2>\n<p>System on Chip (SoC) designs require some sort of connectivity between\nthe different components (called cores or IP-cores, as in Intellectual\nProperty) that are placed onto the same die.<\/p>\n<p>There are several standards for on-chip interconnect, standards that\nprovide technical diversity that might be required by the\nsystem. Typical differences are:<\/p>\n<ul>\n<li>\n<p>Performance. The capacity as well as latency.<\/p>\n<\/li>\n<li>\n<p>Intelligence. Simple master-slave read\/write access or DMA-transfers,\n   coherence support etc.<\/p>\n<\/li>\n<li>\n<p>point to point or point to multipoint. Basically bus based or switch\n   fabric.<\/p>\n<\/li>\n<\/ul>\n<p>There are also non-technical differences:<\/p>\n<ul>\n<li>\n<p>Licensing and pricing. Does using a standard add monetary cost and\n   does using the standard infer restrictions in sharing, disclosure of\n   source code?<\/p>\n<\/li>\n<li>\n<p>Market share. The market share is primarily interesting as basis for\n   the availability of other cores that could be integrated.<\/p>\n<\/li>\n<\/ul>\n<h2>Description of Standards<\/h2>\n<h3>AMBA<\/h3>\n<p>AMBA (Advanced Microcontroller Bus Architecture) <a href=\"#fn1\">(1)<\/a>, <a href=\"#fn2\">(2)<\/a> is a family of\ninterconnect standards from ARM Ltd. AMBA is widely used in systems\nimplemented in ASICs (for example mobile phone platforms), but are also\nused in FPGAs. AMBA is for example used by the LEON <a href=\"#fn3\">(3)<\/a> processor\ncores and subsystem GRLIB.<\/p>\n<p>AMBA currently contains four main interconnect types:<\/p>\n<ul>\n<li>\n<p>APB. A simple register read\/write bus used to connect simpler\n    devices such as timers, IRQ handlers, slow serial I\/O such as UARTS\n    and GPIO interfaces. The peripherals are connected to a common bus\n    with a single master.<\/p>\n<\/li>\n<li>\n<p>AHB. A more advanced bus based interconnect. Supports more complex\n    data transfers of up to 1 kByte data. Supports multiple masters.<\/p>\n<\/li>\n<li>\n<p>AXI. A switch fabric based interconnect that supports multiple\n    parallel transfers, multiple masters etc.<\/p>\n<\/li>\n<li>\n<p>ACE. A low latency interconnect that supports cache coherency to\n    allow the design of multicore, multiprocessor systems on-chip.<\/p>\n<\/li>\n<\/ul>\n<p>(There are also additional protocols in the AMBA specification for\nthings like tracing etc.)<\/p>\n<p>The license model for AMBA is <em>Open<\/em> according to ARM. This seems to\nmean that one can use AMBA to build a system. But at the same time, ARM\nhas intellectual properties to parts of the technology as well as\ntrademarks. For more information on ARM licensing, see <a href=\"#fn4\">(4)<\/a>.<\/p>\n<p>The OpenCores project <a href=\"#fn7\">(7)<\/a> lists several cores as well as tools for\ndifferent AMBA interconnect types.<\/p>\n<p>Pros:<\/p>\n<ul>\n<li>\n<p>Technically advanced and covers a wide range of system\n    requirements.<\/p>\n<\/li>\n<li>\n<p>A huge user base.<\/p>\n<\/li>\n<li>\n<p>A huge selection of third party support in terms of tools as well as\n    cores. Most of these cores and tools are commercial and proprietary,\n    closed source.<\/p>\n<\/li>\n<\/ul>\n<p>Cons:<\/p>\n<ul>\n<li>\n<p>Licensing. Would Cryptech need to get a license?<\/p>\n<\/li>\n<li>\n<p>Availability of open cores<\/p>\n<\/li>\n<\/ul>\n<h3>Avalon<\/h3>\n<p>Avalon <a href=\"#fn5\">(5)<\/a> is a proprietary switch fabric interconnect from Altera\ncorporation. It is used in systems developed using the Altera Nios-II\n<a href=\"#fn6\">(6)<\/a> family of soft processor cores and related peripherals.<\/p>\n<p>According to Altera, the license for Avalon is open: \"Avalon interfaces\nare an open standard. No license or royalty is required to develop and\nsell products that use, or are based on Avalon interfaces.\"<\/p>\n<p>As far as we can discern, Avalon is not generally used outside of Altera\nbased designs and not supported by a large group of third party\nvendors. The OpenCores project lists only a few cores that uses Avalon\nas interface standard.<\/p>\n<p>=\nPros:<\/p>\n<ul>\n<li>\n<p>Good technical features.<\/p>\n<\/li>\n<li>\n<p>Easy integration in Nios-II based systems.<\/p>\n<\/li>\n<\/ul>\n<p>Cons:<\/p>\n<ul>\n<li>\n<p>Limited to Altera based FPGA designs.<\/p>\n<\/li>\n<li>\n<p>Low support from open and proprietary third party suppliers of tools\n    and cores.<\/p>\n<\/li>\n<\/ul>\n<h3>CoreConnect<\/h3>\n<p>CoreConnect <a href=\"#fn8\">(8)<\/a> is an interconnect standard initially developed by\nIBM. The standard is now used by several vendors, for example the\nFPGA-vendor Xilinx<a href=\"#fn9\">(9)<\/a>.<\/p>\n<p>Similarly to AMBA, CoreConnect contains several types of buses providing\nsimple peripheral access (DCR), high speed access for processor based\nsystems (OPB), as well as multicore solutions (PLB).<\/p>\n<p>The license for CoreConnect is granted by IBM <a href=\"#fn10\">(10)<\/a>. The license seems to be\nan AS IS-license, but contains a lot of other regulations. IBM holds a\nnumber of patents related to CoreConnect (see the license agreement).<\/p>\n<p>Pros:<\/p>\n<ul>\n<li>Good support on for systems implemented on Xilinx FPGAs.<\/li>\n<\/ul>\n<p>Cons:<\/p>\n<ul>\n<li>Low support by open cores and tools.<\/li>\n<li>License agreement.<\/li>\n<\/ul>\n<h3>OCP<\/h3>\n<p>The Open Core Protocol <a href=\"#fn11\">(11)<\/a> is a vendor neutral open interconnect standard\nbeing developed by the EDA standards organisation Accellera <a href=\"#fn12\">(12)<\/a>. The\nstandards was previously developed by the vendor organisation OCP-IP <a href=\"#fn13\">(13)<\/a>,\nbut were transferred to Accellera in October 2013.<\/p>\n<p>Like AMBA, OCP contains a wide range of interconnect types from simple\nregister read\/write access over a common bus to point to\npoint-interconnect and coherency support.<\/p>\n<p>There are quite a few commercial cores using OCP, but there seem to be\nvery few open cores using OCP. OpenCores only lists a few cores and\nthey are all bridges used to connect OCP to AMBA or Wishbone.<\/p>\n<p>The license for accessing the specification itself is an amended AS\nIS-type license<a href=\"#fn14\">(14)<\/a>. The license for the interconnect seems to be rather\nopen.<\/p>\n<p>Pros:<\/p>\n<ul>\n<li>Good technical features.<\/li>\n<\/ul>\n<p>Cons:<\/p>\n<ul>\n<li>Not very common in use by open cores.<\/li>\n<\/ul>\n<h3>Wishbone<\/h3>\n<p>Wishbone <a href=\"#fn15\">(15)<\/a><a href=\"#fn16\">(16)<\/a> (often written WISHBONE) is an open interconnect\nstandard developed by members of the OpenCore project as an alternative\nto commercial solutions - primarily AMBA.<\/p>\n<p>Wishbone supports bus based as well as switch fabric interconnect\nsolutions of Wishbone cores. There are cores and tools to create CPU\nbased systems with buses and fabrics. Technically Wishbone is simpler\nthat AMBA and CoreConnect, but provides multimasters, point to point\nswitch fabrics, etc.<\/p>\n<p>There are tools available to generate Wishbone interfaces for a core as\nwell as creating a Wishbone connected system with different types of\ninterconnect solutions.<\/p>\n<p>The main use is related to the OpenRISC CPU core platform\n<a href=\"#fn17\">(17)<\/a><a href=\"#fn18\">(18)<\/a>. OpenCores lists a huge selection of cores with Wishbone\nsupport. The majority of these cores have LGPL and GPL licenses. There\nare also third party commercial vendors that support Wishbone cores and\nsystems.<\/p>\n<p>The license for the Wishbone standard is public domain and dos not\nimpose any restrictions on usage in cores and systems. The\nspecification document itself is close to Creative Commons CC-BY.<\/p>\n<p>Pros:<\/p>\n<ul>\n<li>Fairly good technical support.<\/li>\n<li>Good support from open tools and cores.<\/li>\n<li>Public domain license.<\/li>\n<\/ul>\n<p>Cons:<\/p>\n<ul>\n<li>Not as advanced. No good coherency support for example.<\/li>\n<\/ul>\n<h2>Conclusions<\/h2>\n<p>OF the different standards, only two standards are really interesting\nfor Cryptech - AMBA and Wishbone.<\/p>\n<p>From a technical point of view, selecting AMBA would be the proper\nchoice. AMBA provides all types of interconnect that a Cryptech\nimplementation might need. Also, building a Cryptech implementation\nusing third party cores (CPU cores for example) would be easier with\nAMBA than the other standards. Wher AMBA falls short is the questions\nrelated to licensing as well as the a bit less common support from open\ncores and tools.<\/p>\n<p>Based on ease of licensing, openness and availability of open cores,\nWishbone is an easy choice. Wishbone would quite probably meet all\nperformance and functionality requirements a Cryptech implementation\nmight have. Integration with and support from commercial cores, tools\nand vendors will however not be as good. Choosing Wishbone will quite\nprobably mean more work for the Cryptech project to deliver cores and\ntools. And for the users of Cryptech Wishbone may also require more work\nand thus reduce the interest Cryptech as a HSM solution.<\/p>\n<h2>References<\/h2>\n<ol>\n<li>\n<p>https:\/\/en.wikipedia.org\/wiki\/Advanced_Microcontroller_Bus_Architecture<\/p>\n<\/li>\n<li>\n<p>http:\/\/www.arm.com\/products\/system-ip\/amba\/amba-open-specifications.php<\/p>\n<\/li>\n<li>\n<p>https:\/\/en.wikipedia.org\/wiki\/LEON<\/p>\n<\/li>\n<li>\n<p>http:\/\/www.arm.com\/products\/system-ip\/amba\/index.php?tab=AMBA+Trademark+Guidelines<\/p>\n<\/li>\n<li>\n<p>http:\/\/www.altera.com\/literature\/manual\/mnl_avalon_spec.pdf<\/p>\n<\/li>\n<li>\n<p>http:\/\/www.altera.com\/devices\/processor\/nios2\/ni2-index.html<\/p>\n<\/li>\n<li>\n<p>http:\/\/opencores.org\/<\/p>\n<\/li>\n<li>\n<p>https:\/\/en.wikipedia.org\/wiki\/CoreConnect<\/p>\n<\/li>\n<li>\n<p>http:\/\/www.xilinx.com\/products\/intellectual-property\/dr_pcentral_coreconnect.htm<\/p>\n<\/li>\n<li>\n<p>http:\/\/www.xilinx.com\/ipcenter\/doc\/ibm_click_core_connect_license.pdf<\/p>\n<\/li>\n<li>\n<p>https:\/\/en.wikipedia.org\/wiki\/Open_Core_Protocol<\/p>\n<\/li>\n<li>\n<p>https:\/\/en.wikipedia.org\/wiki\/Accellera<\/p>\n<\/li>\n<li>\n<p>http:\/\/www.ocpip.org\/<\/p>\n<\/li>\n<li>\n<p>http:\/\/www.ocpip.org\/license_signup.php<\/p>\n<\/li>\n<li>\n<p>http:\/\/opencores.org\/opencores,wishbone<\/p>\n<\/li>\n<li>\n<p>https:\/\/en.wikipedia.org\/wiki\/Wishbone_(computer_bus)<\/p>\n<\/li>\n<li>\n<p>http:\/\/openrisc.net\/<\/p>\n<\/li>\n<li>\n<p>http:\/\/opencores.org\/or1k\/Main_Page<\/p>\n<\/li>\n<\/ol>\n<h2>Copyright and License<\/h2>\n<p>This document has been written by Joachim Str\u00f6mbergson.<\/p>\n<p>(c) 2014 SUNET - The Swedish University Network<\/p>\n<p>This document is licensed under a Creative Commons license (CC BY 3.0).\nFor more information, see:<\/p>\n<p>https:\/\/creativecommons.org\/licenses\/by\/3.0\/<\/p>","category":{"@attributes":{"term":"misc"}}},{"title":"Noisy Diode entropy source","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/NoisyDiode","rel":"alternate"}},"published":"2016-12-15T22:44:00+00:00","updated":"2016-12-15T22:44:00+00:00","author":{"name":"Cryptech Core Team"},"id":"tag:wiki.cryptech.is,2016-12-15:\/NoisyDiode","summary":"<p>The Cryptech project is using Avalanche Noise as a physical entropy source connected to the FPGA.<\/p>\n<p>Avalanche breakdown is a physical process that occurs when current is forced backwards through a diode until it cannot hold back anymore. The diode will then begin conducting for a brief time until the \u2026<\/p>","content":"<p>The Cryptech project is using Avalanche Noise as a physical entropy source connected to the FPGA.<\/p>\n<p>Avalanche breakdown is a physical process that occurs when current is forced backwards through a diode until it cannot hold back anymore. The diode will then begin conducting for a brief time until the voltage drops to a point where the diode recovers. The breakdown and recovery points are not deterministic, and can thus be used as a source of real physical entropy.<\/p>\n<p>The unamplified noise looks like this:<\/p>\n<p><img alt=\"noise1.jpg\" src=\"https:\/\/wiki.cryptech.is\/NoisyDiode\/NoisyDiode\/noise1.jpg\"><\/p>\n<p>After amplification, details are lost but the signal is now 3.3V (blue is noise before amplification, yellow is amplified)<\/p>\n<p><img alt=\"noise2.jpg\" src=\"https:\/\/wiki.cryptech.is\/NoisyDiode\/NoisyDiode\/noise2.jpg\"><\/p>\n<p>Many implementations on the Internet feed a similar signal into an ADC (Analog Digital converter) and use the resulting data value at the time of the sampling as entropy. The Cryptech project believes a more robust way of extracting entropy is to instead feed the noise to a Schmitt trigger and then measure the time between rising edges. This would be more robust since any analog reading of the noise (such as with an ADC) will be sensitive to changes in temperature, supplied voltage and component aging.<\/p>\n<p>After beeing fed through a Schmitt trigger, the noise looks like this (yellow signal, blue is just a 4 MHz clock):<\/p>\n<p><img alt=\"noise-schmitt.jpg\" src=\"https:\/\/wiki.cryptech.is\/NoisyDiode\/NoisyDiode\/noise-schmitt.jpg\"><\/p>\n<p>The Cryptech project has to date made a couple of different hardware entropy source boards, but they all share the same design for the avalanche noise source. The core parts of the circuit are shown below. Git repository with full schematics and source code is linked at the bottom of this page.<\/p>\n<p><img alt=\"noise-schematics.png\" src=\"https:\/\/wiki.cryptech.is\/NoisyDiode\/NoisyDiode\/noise-schematics.png\"><\/p>\n<p>Links:<\/p>\n<p><a href=\"https:\/\/git.cryptech.is\/user\/ft\/stm32-avalanche-noise\/about\">Raspberry-Pi \/ USB entropy source<\/a><\/p>","category":{"@attributes":{"term":"TRNG"}}},{"title":"An Open Crypto Chip","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/OpenCryptoChip","rel":"alternate"}},"published":"2016-12-15T22:44:00+00:00","updated":"2016-12-15T22:44:00+00:00","author":{"name":"Cryptech Core Team"},"id":"tag:wiki.cryptech.is,2016-12-15:\/OpenCryptoChip","summary":"<h2>The Layer Cake Architecture Picture<\/h2>\n<p><br\/>\n<img alt=\"layer-cake.jpg\" src=\"https:\/\/wiki.cryptech.is\/OpenCryptoChip\/OpenCryptoChip\/layer-cake.jpg\"><\/p>\n<p><br\/>\n<br\/><\/p>\n<h2>Use Cases<\/h2>\n<ul>\n<li>RPKI\/DNSSEC Signing<\/li>\n<li>Transport VPNs<\/li>\n<li>Routers and TCP\/AO<\/li>\n<li>Email<\/li>\n<li>Federations, Identity Systems, SSO etc<\/li>\n<li>Password Stretching &amp; HMAC:ing<\/li>\n<li>PGP and SSH Keys on a Stick<\/li>\n<li>High Quality Entropy Randomness<\/li>\n<li>A Communications Terminal Doing One Thing Well, Like Jabber w\/o X11<\/li>\n<li>HSM \u2026<\/li><\/ul>","content":"<h2>The Layer Cake Architecture Picture<\/h2>\n<p><br\/>\n<img alt=\"layer-cake.jpg\" src=\"https:\/\/wiki.cryptech.is\/OpenCryptoChip\/OpenCryptoChip\/layer-cake.jpg\"><\/p>\n<p><br\/>\n<br\/><\/p>\n<h2>Use Cases<\/h2>\n<ul>\n<li>RPKI\/DNSSEC Signing<\/li>\n<li>Transport VPNs<\/li>\n<li>Routers and TCP\/AO<\/li>\n<li>Email<\/li>\n<li>Federations, Identity Systems, SSO etc<\/li>\n<li>Password Stretching &amp; HMAC:ing<\/li>\n<li>PGP and SSH Keys on a Stick<\/li>\n<li>High Quality Entropy Randomness<\/li>\n<li>A Communications Terminal Doing One Thing Well, Like Jabber w\/o X11<\/li>\n<li>HSM for Pond, OTR identity keys, ssh private keys, etc. (i.e. key gen, store, import\/export non X.509 packages)<\/li>\n<li>Password management<\/li>\n<\/ul>\n<p><img alt=\"cryptech venn.png\" src=\"https:\/\/wiki.cryptech.is\/OpenCryptoChip\/OpenCryptoChip\/cryptech venn.png\"><\/p>\n<h2>Basic Functions of Crypto Chip<\/h2>\n<ul>\n<li>Key Generation<\/li>\n<li>Key Storage<\/li>\n<li>Key Wrap<\/li>\n<li>Key Unwrap<\/li>\n<li>Hash<\/li>\n<li>Sign<\/li>\n<li>M of N Sign<\/li>\n<li>Verify Signature<\/li>\n<li>Encrypt<\/li>\n<li>Decrypt<\/li>\n<li>KDFs, e.g. Password Stretching (a la PBKDF2)<\/li>\n<li>Random (RO + noisy diode?)<\/li>\n<\/ul>\n<h2>Key wrapping<\/h2>\n<p>We need to support key wrapping. Some pointers:<\/p>\n<ul>\n<li>https:\/\/en.wikipedia.org\/wiki\/Key_Wrap<\/li>\n<li>http:\/\/tools.ietf.org\/html\/rfc5297<\/li>\n<li>http:\/\/csrc.nist.gov\/groups\/ST\/toolkit\/documents\/kms\/key-wrap.pdf<\/li>\n<li>https:\/\/tools.ietf.org\/html\/rfc3394<\/li>\n<li>https:\/\/tools.ietf.org\/html\/rfc5649<\/li>\n<\/ul>\n<h2>Things we Should Try To Do, Even if we Can't Do Them Perfectly<\/h2>\n<ul>\n<li>Tamper Protection (wipe on signal, suggest detectors, suggest potting features)<\/li>\n<li>Side Channel Attack Reduction<\/li>\n<\/ul>\n<h1>Rough Cut at v0.01 Proof of Concept Feature Set<\/h1>\n<p>As a proof of concept, to validate as much as possible the assurance of the tools and methods, and as a demonstration of the project tools, team, and architecture, we have a <a href=\"https:\/\/wiki.cryptech.is\/RoughV1\">proposed version 0.01 product<\/a> as a proof of concept and a demonstration of the project tools, team, and architecture\n<br\/>\n<br\/><\/p>\n<h1>Ongoing Decisions and Research<\/h1>\n<ul>\n<li>Security Target Description<\/li>\n<li>Performance Target(s)<\/li>\n<li>Tool-Chain Investigation<\/li>\n<li>Prototype Design<\/li>\n<li>Testing \/ Assurance Methods for all Components<\/li>\n<li>Verilog\/RTL assurance, with open source and with proprietary<\/li>\n<li>Prototyping Platform(s)<\/li>\n<li>Documentation, Decision History, &amp; Transparency<\/li>\n<\/ul>\n<p><br\/>\n<br\/><\/p>\n<h1>Ongoing Development<\/h1>\n<ul>\n<li><a href=\"https:\/\/wiki.cryptech.is\/SunetInitialDevelopment\">SUNET is sponsoring the first two development steps<\/a> currently being done.<\/li>\n<li><a href=\"https:\/\/wiki.cryptech.is\/TRNGDevelopment\"> Investigation and planning of a TRNG with entropy sources<\/a><\/li>\n<li><a href=\"https:\/\/wiki.cryptech.is\/EDAToolchainSurvey\">Investigation of possible EDA tools and ways to do open and assured HW development\"<\/a><\/li>\n<li><a href=\"https:\/\/wiki.cryptech.is\/SideChannel\">Collection about side-channel attacks and detection, mitigation methods<\/a><\/li>\n<\/ul>\n<h1>v0.1 Major Sub-Projects<\/h1>\n<h2>Security Goals and Documentation<\/h2>\n<ul>\n<li>Agreement<\/li>\n<li>Specification<\/li>\n<\/ul>\n<h2>Development Platform<\/h2>\n<ul>\n<li>\n<p>The Bunnie laptop Novena. Includes a Xilinx Spartan 6 LX45 FPGHA. The specs, drivers, source for Novena can be found here: http:\/\/www.kosagi.com\/w\/index.php?title=Novena_Main_Page<\/p>\n<\/li>\n<li>\n<p>TerasIC C5G Cyclone 5 GX Starter Kit. Includes an Altera C5GX FPGA. This board is used for core, subsystem development and verification. Info, documentation and ordering of the TerasIC board can be found here: http:\/\/www.terasic.com.tw\/cgi-bin\/page\/archive.pl?Language=English&amp;CategoryNo=167&amp;No=830<\/p>\n<\/li>\n<\/ul>\n<p>Here is a writeup on how to <a href=\"https:\/\/wiki.cryptech.is\/CoretestHashesC5G\">setup and run coretest_hashes on the C5G board<\/a>.<\/p>\n<ul>\n<li>TerasIC DE0-Nano board. This tiny, USB powered board is used for core development and verification. Info, documentation, resources, ordering of the TerasIC board can be found here: http:\/\/www.terasic.com.tw\/cgi-bin\/page\/archive.pl?Language=English&amp;CategoryNo=139&amp;No=593<\/li>\n<\/ul>\n<h2>Hardware Development Tools<\/h2>\n<h2>Component Libraries<\/h2>\n<ul>\n<li>Research<\/li>\n<li>Select<\/li>\n<li><a href=\"https:\/\/wiki.cryptech.is\/InterconnectStandards\">On-chip Interconnect Standards<\/a> to use.<\/li>\n<\/ul>\n<h2>Methods and Validation<\/h2>\n<ul>\n<li>Overall Strategy<\/li>\n<li>Following the Tool-Chain<\/li>\n<\/ul>\n<h2>Detailed Specification<\/h2>\n<ul>\n<li>Feature Set<\/li>\n<\/ul>\n<h2>QA &amp; Documentation<\/h2>\n<h2>Green\/Yellow Software Support<\/h2>\n<ul>\n<li>Spec \/ ABI<\/li>\n<li>Development<\/li>\n<li>Documentationa and Testing<\/li>\n<\/ul>\n<h2>Assured Linux Platform<\/h2>\n<ul>\n<li>DDC Compiler<\/li>\n<li>System Build<\/li>\n<li>Minimal Component Set<\/li>\n<\/ul>\n<h1>v0.1 Project Timeline<\/h1>\n<h2>February 2014<\/h2>\n<ul>\n<li>Specification of v0.1 Goals and Feature Set<\/li>\n<li>Security Goals &amp; Documentation Outline<\/li>\n<\/ul>\n<h2>July 2014<\/h2>\n<ul>\n<li>SHA &amp; AES<\/li>\n<\/ul>\n<h2>September 2014<\/h2>\n<ul>\n<li>TRNG<\/li>\n<li>Assured Linux Platform - Initial Report<\/li>\n<\/ul>\n<h2>November 2014<\/h2>\n<ul>\n<li>Security Goals &amp; Documentation Overall and v0.1<\/li>\n<li>RSA Signing on Bunnie Board<\/li>\n<li>Assured Linux Platform - Compiler<\/li>\n<\/ul>\n<h2>March 2015<\/h2>\n<ul>\n<li>v0.1 Protoype<\/li>\n<\/ul>\n<h1>Future Development<\/h1>\n<p>The v0.1 version of CrypTech is not the last version nor the only possible version. The project for example consider possible <a href=\"https:\/\/wiki.cryptech.is\/ASICImplementations\">ASIC Implementations<\/a>.<\/p>","category":{"@attributes":{"term":"misc"}}},{"title":"PKCS11 Proxy","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/PKCS11Proxy","rel":"alternate"}},"published":"2016-12-15T22:44:00+00:00","updated":"2016-12-15T22:44:00+00:00","author":{"name":"Cryptech Core Team"},"id":"tag:wiki.cryptech.is,2016-12-15:\/PKCS11Proxy","summary":"<p>The pkcs11-proxy is a way to tunnel PKCS11 over TCP (TLS). This page explains how to build and install PKCS11 proxy on the novena. There are various forks of this on github. We're going to use the SUNET fork since it support TLS-PSK for authentication out of the box. The \u2026<\/p>","content":"<p>The pkcs11-proxy is a way to tunnel PKCS11 over TCP (TLS). This page explains how to build and install PKCS11 proxy on the novena. There are various forks of this on github. We're going to use the SUNET fork since it support TLS-PSK for authentication out of the box. The proxy does not currently support different word length on each side of the tunnel so to use it with the novena platform your PKCS11 client must be 32 bit.<\/p>\n<h2>Why would you want this?<\/h2>\n<p>Not all applications will run on the arm-based novena. For instance not all parts of opendnssec is not fully ported to arm (and probably never will be).<\/p>\n<h2>Building PKCS11 proxy<\/h2>\n<div class=\"highlight\"><pre><span><\/span><code># apt-get -y install git cmake libssl-dev\n# git clone https:\/\/github.com\/SUNET\/pkcs11-proxy\n# cd pkcs11-proxy\n# mkdir build\n# cd build\n# cmake ..\n# make\n# make install\n<\/code><\/pre><\/div>\n\n<h2>Setting up pkcs11 proxy on the novena<\/h2>\n<p>Next create a pre-shared secret for TLS authentication...<\/p>\n<div class=\"highlight\"><pre><span><\/span><code><span class=\"err\">#<\/span><span class=\"w\"> <\/span><span class=\"o\">(<\/span><span class=\"nt\">echo<\/span><span class=\"w\"> <\/span><span class=\"nt\">-n<\/span><span class=\"w\"> <\/span><span class=\"s2\">&quot;psk:&quot;<\/span><span class=\"err\">`<\/span><span class=\"nt\">xxd<\/span><span class=\"w\"> <\/span><span class=\"nt\">-l<\/span><span class=\"w\"> <\/span><span class=\"nt\">16<\/span><span class=\"w\"> <\/span><span class=\"nt\">-p<\/span><span class=\"w\"> <\/span><span class=\"o\">\/<\/span><span class=\"nt\">dev<\/span><span class=\"o\">\/<\/span><span class=\"nt\">random<\/span><span class=\"err\">`<\/span><span class=\"o\">;<\/span><span class=\"w\"> <\/span><span class=\"nt\">echo<\/span><span class=\"o\">)<\/span><span class=\"w\"> <\/span><span class=\"o\">&gt;<\/span><span class=\"w\"> <\/span><span class=\"nt\">psk<\/span><span class=\"p\">.<\/span><span class=\"nc\">txt<\/span>\n<\/code><\/pre><\/div>\n\n<p>The resulting file (psk.txt) needs to be present both on the server and client side of the PKCS11 tunnel so copy it (or its one-line content) to the client side of your proxy.<\/p>\n<p>Now start a pkcs11 proxy daemon:<\/p>\n<div class=\"highlight\"><pre><span><\/span><code><span class=\"gh\">#<\/span> env PKCS11_PROXY_TLS_PSK_FILE=&quot;psk.txt&quot; PKCS11_DAEMON_SOCKET=&quot;tls:\/\/&lt;your ip&gt;:4444&quot; pkcs11-daemon \/usr\/lib\/libpkcs11.so\n<\/code><\/pre><\/div>\n\n<p>Now on another machine (where pkcs11-proxy has been installed) access the remote token via<\/p>\n<div class=\"highlight\"><pre><span><\/span><code><span class=\"c1\"># env PKCS11_PROXY_TLS_PSK_FILE=&quot;psk.txt&quot; PKCS11_PROXY_SOCKET=&quot;tls:\/\/&lt;your ip&gt;:4444&quot; pkcs11-tool --module \/usr\/local\/lib\/libpkcs11-proxy.so -I<\/span>\n<\/code><\/pre><\/div>\n\n<h2>Tracing PKCS11 calls<\/h2>\n<p>If you want to trace the PKCS11 calls you can use pkcs11spy from the opensc package. If you install opensc look for an SO called pkcs11-spy.so. On the novena it is in \/usr\/lib\/arm-linux-gnueabihf\/pkcs11-spy.so. To use it set your environment variable PKCS11SPY to your real PKCS11 library and use pkcs11-spy.so instead. For instance to use PCKCS11 spy on the server side of the PKCS11 proxy start the pkcs11-daemon thus:<\/p>\n<div class=\"highlight\"><pre><span><\/span><code><span class=\"gh\">#<\/span> env PKCS11_PROXY_TLS_PSK_FILE=&quot;psk.txt&quot; PKCS11SPY=&quot;\/usr\/lib\/libpkcs11.so&quot; PKCS11_DAEMON_SOCKET=&quot;tls:\/\/&lt;your ip&gt;:4444&quot; pkcs11-daemon \/usr\/lib\/arm-linux-gnueabihf\/pkcs11-spy.so\n<\/code><\/pre><\/div>\n\n<p>This should now generate lots of output when you run PKCS11 calls over the tunnel.<\/p>","category":{"@attributes":{"term":"Novena"}}},{"title":"Post Alpha Plan","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/PostAlphaPlan","rel":"alternate"}},"published":"2016-12-15T22:44:00+00:00","updated":"2017-05-16T14:53:00+00:00","author":{"name":"Paul Selkirk"},"id":"tag:wiki.cryptech.is,2016-12-15:\/PostAlphaPlan","summary":"<p>The core dev team had a design meeting in Berlin after the alpha workshop. We came up with a plan for the hardware and the software work for the next few months:<\/p>\n<h2>Hardware<\/h2>\n<h3>Revision 04<\/h3>\n<p>This is targeted for the mid-flight revision in the 50 board order from propoint. For \u2026<\/p>","content":"<p>The core dev team had a design meeting in Berlin after the alpha workshop. We came up with a plan for the hardware and the software work for the next few months:<\/p>\n<h2>Hardware<\/h2>\n<h3>Revision 04<\/h3>\n<p>This is targeted for the mid-flight revision in the 50 board order from propoint. For practical reasons, we should limit ourselves to bugfixes and other \"low risk\" changes for this release.<\/p>\n<ul>\n<li>On-board battery (super-cap, long battery life etc, battery outside the tamper boundary etc)<\/li>\n<li>Next generation USB based on Stuges daughter board work<\/li>\n<li>Support higher clock speeds<\/li>\n<li>Proposed: pull out 2 more UARTS from the STM32 to support memory-card readers and pin-entry devices<\/li>\n<\/ul>\n<h3>Revision 05<\/h3>\n<ul>\n<li>Power instrumentation<\/li>\n<li>EMC<\/li>\n<li>Tamper revisions??<\/li>\n<\/ul>\n<h2>Software<\/h2>\n<p>The software plan is divided into 3 parts: \"now\", \"next week\" and \"next month\". These are labels, not a time frame. The \"now\" list represents stuff that is currently seeing active work. We move stuff from \"next week\" to \"now\" and from \"next month\" to \"next week\" as part of our planning process (at the engineering calls).<\/p>\n<h3>Now<\/h3>\n<ul>\n<li>CLI updates [Done, but waiting on a BSD-friendly license]<\/li>\n<li>rewrite keystore code to support larger keysizes and more slots [Done]<\/li>\n<li>multi-core resource management [Done]<\/li>\n<li>finish verilog EC point multiplier [Done]<\/li>\n<li>increase clock speed<\/li>\n<li>openssl engine [Done]<\/li>\n<li>debug log [Mechanism done, nothing using it yet]<\/li>\n<li>usb driver matching rev04 usb updates<\/li>\n<\/ul>\n<h3>Next Week<\/h3>\n<ul>\n<li>GOST drivers<\/li>\n<li>key backup [Done]<\/li>\n<li>SHA3<\/li>\n<li>ECDSA verilog [Done]<\/li>\n<li>build system configuration management<\/li>\n<li>real documentation: user, admin and dev manuals<\/li>\n<li>Python RPC client [Done]<\/li>\n<li>set time and date from CLI<\/li>\n<\/ul>\n<h3>Next Month<\/h3>\n<ul>\n<li>25519 verilog<\/li>\n<li>design papers<\/li>\n<li>doxygen<\/li>\n<li>m of n<\/li>\n<li>notify ARM and FPGA of tamper events<\/li>\n<li>secure channel<\/li>\n<li>ECDH<\/li>\n<li>AES drivers<\/li>\n<li>audit logging<\/li>\n<\/ul>\n<h3>Eventually<\/h3>\n<ul>\n<li>Profiling [Mechanism done]<\/li>\n<\/ul>","category":{"@attributes":{"term":"misc"}}},{"title":"CrypTech Workshop, Praha, 18 July 2015","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/PrahaWorkshop","rel":"alternate"}},"published":"2016-12-15T22:44:00+00:00","updated":"2016-12-15T22:44:00+00:00","author":{"name":"Cryptech Core Team"},"id":"tag:wiki.cryptech.is,2016-12-15:\/PrahaWorkshop","summary":"<h2>Logistics<\/h2>\n<ul>\n<li>Hilton Hotel, the IETF venue<\/li>\n<li>Amsterdam Room (this is a change)<\/li>\n<li>09:00 - 17:00<\/li>\n<\/ul>\n<h2>Introductions<\/h2>\n<ul>\n<li>The CrypTech Team<\/li>\n<li>Others Who Have Contributed<\/li>\n<li>Other Folk at the Meeting<\/li>\n<\/ul>\n<h2>Workshop Goals<\/h2>\n<ul>\n<li>Get an understanding of the project status and roadmap<\/li>\n<li>Discus your requirements and expectations with the team<\/li>\n<li>Get hands-on \u2026<\/li><\/ul>","content":"<h2>Logistics<\/h2>\n<ul>\n<li>Hilton Hotel, the IETF venue<\/li>\n<li>Amsterdam Room (this is a change)<\/li>\n<li>09:00 - 17:00<\/li>\n<\/ul>\n<h2>Introductions<\/h2>\n<ul>\n<li>The CrypTech Team<\/li>\n<li>Others Who Have Contributed<\/li>\n<li>Other Folk at the Meeting<\/li>\n<\/ul>\n<h2>Workshop Goals<\/h2>\n<ul>\n<li>Get an understanding of the project status and roadmap<\/li>\n<li>Discus your requirements and expectations with the team<\/li>\n<li>Get hands-on experience with the cryptech code on the novena dev board<\/li>\n<li>Procrastinate finding a new name for the project<\/li>\n<li>NON-GOAL: you don't get to go home with hardware<\/li>\n<\/ul>\n<h2>Overview of Project<\/h2>\n<ul>\n<li>Overall Goals<ul>\n<li>A Set of Designs, not a product<\/li>\n<li>Save the World, Securely :)<\/li>\n<\/ul>\n<\/li>\n<li>Short Term Goals<ul>\n<li>Sign a DNSSEC Zone<\/li>\n<li>Sign RPKI Data<\/li>\n<\/ul>\n<\/li>\n<li>Roadmap<ul>\n<li>Novena Dev Platform<\/li>\n<li>Noise Board<\/li>\n<li>Bridge Board<\/li>\n<li>Alpha Board<\/li>\n<li>Better\/Beta Board :)<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2>Status<\/h2>\n<ul>\n<li>Novena, Bridge, and Alpha Hardware<\/li>\n<li>Verilog Cores<\/li>\n<li>Software<\/li>\n<li>APIs<\/li>\n<li>Current Build and Work Packaging<\/li>\n<\/ul>\n<h2>User Feedback So Far<\/h2>\n<h2>Workshop 0<\/h2>\n<ul>\n<li>Unpack Novenas<\/li>\n<li>Install Noise Board<\/li>\n<li>Build Bitstream and Download<\/li>\n<li>Build Software and Install<\/li>\n<li>Install DNSSEC Signware on Your Laptop<\/li>\n<li>Sign a Zone<\/li>\n<\/ul>\n<h2>User Feedback So Far<\/h2>\n<h2>Workshop 1<\/h2>\n<ul>\n<li>Unpack and Install Bridge Boards<\/li>\n<li>Build Software and Install<\/li>\n<li>Install DNSSEC Signware on Your Laptop<\/li>\n<li>Sign a Zone<\/li>\n<\/ul>\n<h2>User Feedback<\/h2>\n<h2>Morning coffee break :)<\/h2>\n<h2>You Should Bring<\/h2>\n<ul>\n<li>Laptop<\/li>\n<li>MacOSX, Linux, or ?  (if you want to build FPGAware, debian 64-bit, and it needs a desktop, VM OK)<\/li>\n<li>Micro-SD card if you want to take images and\/or data home<\/li>\n<li>Logic Analyzer (optional, for hardware geeks)<\/li>\n<li>JTAG Interface (optional, for hardware geeks)<\/li>\n<li>Cookies or Equivalent to Share<\/li>\n<\/ul>","category":{"@attributes":{"term":"Workshops"}}},{"title":"Project Archive and Far Future Planning","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/ProjectArchive","rel":"alternate"}},"published":"2016-12-15T22:44:00+00:00","updated":"2016-12-15T22:44:00+00:00","author":{"name":"Cryptech Core Team"},"id":"tag:wiki.cryptech.is,2016-12-15:\/ProjectArchive","content":"<p><em>Page Under Construction<\/em><\/p>\n<h2><a href=\"https:\/\/wiki.cryptech.is\/AssuredTooChain\">Assured Tool Chain<\/a><\/h2>","category":{"@attributes":{"term":"misc"}}},{"title":"Project Management","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/ProjectManagement","rel":"alternate"}},"published":"2016-12-15T22:44:00+00:00","updated":"2016-12-15T22:44:00+00:00","author":{"name":"Cryptech Core Team"},"id":"tag:wiki.cryptech.is,2016-12-15:\/ProjectManagement","summary":"<h1>v0.1 Resources<\/h1>\n<h2>Human - 4-5 FTE<\/h2>\n<ul>\n<li>0.5 Specifications<\/li>\n<li>1.0 FPGA Tools and Core<\/li>\n<li>1.0 Core Libraries and Interfaces<\/li>\n<li>0.5 QA &amp; Docs<\/li>\n<li>0.5 Assured Linux Platform<\/li>\n<li>1.0 Coordination<\/li>\n<\/ul>\n<h2>Hardware<\/h2>\n<ul>\n<li>4 Bunnie Boards<\/li>\n<li>2 Altera Eval Systems<\/li>\n<li>Linux Platform<\/li>\n<\/ul>\n<h2>Travel &amp; Overhead<\/h2>\n<ul>\n<li>Travel $5k\/mo<\/li>\n<li>Communications $1k \u2026<\/li><\/ul>","content":"<h1>v0.1 Resources<\/h1>\n<h2>Human - 4-5 FTE<\/h2>\n<ul>\n<li>0.5 Specifications<\/li>\n<li>1.0 FPGA Tools and Core<\/li>\n<li>1.0 Core Libraries and Interfaces<\/li>\n<li>0.5 QA &amp; Docs<\/li>\n<li>0.5 Assured Linux Platform<\/li>\n<li>1.0 Coordination<\/li>\n<\/ul>\n<h2>Hardware<\/h2>\n<ul>\n<li>4 Bunnie Boards<\/li>\n<li>2 Altera Eval Systems<\/li>\n<li>Linux Platform<\/li>\n<\/ul>\n<h2>Travel &amp; Overhead<\/h2>\n<ul>\n<li>Travel $5k\/mo<\/li>\n<li>Communications $1k\/mo<\/li>\n<li>Administrative $1k\/mo<\/li>\n<\/ul>","category":{"@attributes":{"term":"misc"}}},{"title":"Project Status","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/ProjectStatus","rel":"alternate"}},"published":"2016-12-15T22:44:00+00:00","updated":"2016-12-15T22:44:00+00:00","author":{"name":"Cryptech Core Team"},"id":"tag:wiki.cryptech.is,2016-12-15:\/ProjectStatus","content":"<p><em>Page Under Development<\/em><\/p>\n<h2><a href=\"https:\/\/wiki.cryptech.is\/Dashboard\">Project Dashboard<\/a><\/h2>\n<h2>Crypto Chip Design and Prototype<\/h2>\n<ul>\n<li><a href=\"https:\/\/wiki.cryptech.is\/PostAlphaPlan\">PostAlphaPlan<\/a><\/li>\n<li><a href=\"https:\/\/wiki.cryptech.is\/AlphaBoardStrategy\">AlphaBoardStrategy<\/a><\/li>\n<li><a href=\"https:\/\/wiki.cryptech.is\/AlphaBoardComponents\">AlphaBoardComponents<\/a><\/li>\n<li><a href=\"https:\/\/git.cryptech.is\/\">Core Git Repository<\/a><\/li>\n<li><a href=\"https:\/\/wiki.cryptech.is\/Hardware\">Hardware<\/a><\/li>\n<li><a href=\"https:\/\/wiki.cryptech.is\/DevBridgeBoard\">DevBridgeBoard<\/a><\/li>\n<\/ul>\n<h2>Pilot Project<\/h2>\n<ul>\n<li><a href=\"https:\/\/wiki.cryptech.is\/DNSSEC\">Requirements<\/a><\/li>\n<\/ul>","category":{"@attributes":{"term":"misc"}}},{"title":"Related Work","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/RelatedWork","rel":"alternate"}},"published":"2016-12-15T22:44:00+00:00","updated":"2016-12-15T22:44:00+00:00","author":{"name":"Cryptech Core Team"},"id":"tag:wiki.cryptech.is,2016-12-15:\/RelatedWork","summary":"<h2>Richard Lamb \/ ICANN<\/h2>\n<p><a href=\"http:\/\/ccnso.icann.org\/file\/32383\/download\/37379\">Presentation at ICANN<\/a><br\/>\n<a href=\"http:\/\/ccnso.icann.org\/file\/40211\/download\/52359\">Presentation at ICANN<\/a><br\/>\n\"I wrote pkcs11 libraries and also have modified BIND that offloads full\nRRSIG calculation (including time) to board.  Clearly can use anything\nother than TPM to do RSA calculations.\"<\/p>\n<h2>SoftHSM<\/h2>\n<ul>\n<li><a href=\"https:\/\/www.opendnssec.org\/softhsm\/\">SoftHSM<\/a> - part of OpenDNSSEC<\/li>\n<li><a href=\"http:\/\/wiki.cacert.org\/Possum\">Possum<\/a> - an earlier attempt att an Open \u2026<\/li><\/ul>","content":"<h2>Richard Lamb \/ ICANN<\/h2>\n<p><a href=\"http:\/\/ccnso.icann.org\/file\/32383\/download\/37379\">Presentation at ICANN<\/a><br\/>\n<a href=\"http:\/\/ccnso.icann.org\/file\/40211\/download\/52359\">Presentation at ICANN<\/a><br\/>\n\"I wrote pkcs11 libraries and also have modified BIND that offloads full\nRRSIG calculation (including time) to board.  Clearly can use anything\nother than TPM to do RSA calculations.\"<\/p>\n<h2>SoftHSM<\/h2>\n<ul>\n<li><a href=\"https:\/\/www.opendnssec.org\/softhsm\/\">SoftHSM<\/a> - part of OpenDNSSEC<\/li>\n<li><a href=\"http:\/\/wiki.cacert.org\/Possum\">Possum<\/a> - an earlier attempt att an Open Source HSM.<\/li>\n<\/ul>\n<h2>Project Turris - CZNIC<\/h2>\n<p><a href=\"http:\/\/www.turris.cz\/en\/\">Project Thuris Web Pages<\/a><br\/>\nProject Turris is a service helping to protect its user's home network\nwith the help of a special router. It is a not-for-profit research\nproject of CZ.NIC, z. s. p. o., the registry of the Czech national top\nlevel domain .CZ.<\/p>","category":{"@attributes":{"term":"misc"}}},{"title":"Side Channel Attacks","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/SideChannel","rel":"alternate"}},"published":"2016-12-15T22:44:00+00:00","updated":"2016-12-15T22:44:00+00:00","author":{"name":"Cryptech Core Team"},"id":"tag:wiki.cryptech.is,2016-12-15:\/SideChannel","summary":"<p>Side Channel attacks on hardware are hard to avoid, detect and mitigate. But this should not stop us from trying. The CrypTech platform should be developed with side channel issues in mind. This page tries to collect information about relevant side channel attacks, mitigation strategies, side channel resistant design methods \u2026<\/p>","content":"<p>Side Channel attacks on hardware are hard to avoid, detect and mitigate. But this should not stop us from trying. The CrypTech platform should be developed with side channel issues in mind. This page tries to collect information about relevant side channel attacks, mitigation strategies, side channel resistant design methods (blinding for example) and detection.<\/p>\n<ul>\n<li>http:\/\/eprint.iacr.org\/2013\/579 \"On Measurable Side-Channel Leaks inside ASIC Design Primitives\"<\/li>\n<li>http:\/\/people.umass.edu\/gbecker\/BeckerChes13.pdf \"Stealthy Dopant-Level Hardware Trojans\"<\/li>\n<\/ul>","category":{"@attributes":{"term":"misc"}}},{"title":"TRNG Development","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/TRNGDevelopment","rel":"alternate"}},"published":"2016-12-15T22:44:00+00:00","updated":"2016-12-15T22:44:00+00:00","author":{"name":"Cryptech Core Team"},"id":"tag:wiki.cryptech.is,2016-12-15:\/TRNGDevelopment","summary":"<p>One, if not THE key functionality in the Cryptech system is the True Random Number Generator (TRNG). We therefore need to discuss, investigate and test to find a TRNG that we and the users of Cryptech can trust and can verify to be trusted.<\/p>\n<h2>Information collected<\/h2>\n<ul>\n<li><a href=\"http:\/\/digirep.rhul.ac.uk\/file\/315c7a7e-4963-4a62-189f-4ad198a79f30\/5\/Paper.pdf\">http:\/\/digirep.rhul.ac \u2026<\/a><\/li><\/ul>","content":"<p>One, if not THE key functionality in the Cryptech system is the True Random Number Generator (TRNG). We therefore need to discuss, investigate and test to find a TRNG that we and the users of Cryptech can trust and can verify to be trusted.<\/p>\n<h2>Information collected<\/h2>\n<ul>\n<li><a href=\"http:\/\/digirep.rhul.ac.uk\/file\/315c7a7e-4963-4a62-189f-4ad198a79f30\/5\/Paper.pdf\">http:\/\/digirep.rhul.ac.uk\/file\/315c7a7e-4963-4a62-189f-4ad198a79f30\/5\/Paper.pdf<\/a> (pdf) Pseudorandom Number Generation in Smart Cards:<\/li>\n<\/ul>\n<p>An Implementation, Performance and Randomness Analysis. A paper that uses Javacard to implement different TRNGs and evluates them.<\/p>","category":{"@attributes":{"term":"TRNG"}}},{"title":"Alpha Board Strategy","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/AlphaBoardStrategy","rel":"alternate"}},"published":"2016-12-15T22:43:00+00:00","updated":"2016-12-15T22:43:00+00:00","author":{"name":"Cryptech Core Team"},"id":"tag:wiki.cryptech.is,2016-12-15:\/AlphaBoardStrategy","summary":"<h1>The Cryptech Alpha Board<\/h1>\n<h2>Goal<\/h2>\n<p>Develop a first, custom HSM board that can be used to support a first set of applications as well as being used for further development of new functionality as well as security mechanisms such as tamper detection and protection, key storage etc. Deadline is to \u2026<\/p>","content":"<h1>The Cryptech Alpha Board<\/h1>\n<h2>Goal<\/h2>\n<p>Develop a first, custom HSM board that can be used to support a first set of applications as well as being used for further development of new functionality as well as security mechanisms such as tamper detection and protection, key storage etc. Deadline is to produce palpable results before summer, 2015.<\/p>\n<ul>\n<li>The use cases and requirements for the alpha board are specified on the <a href=\"https:\/\/wiki.cryptech.is\/wiki\/Dashboard\">Dashboard<\/a>.<\/li>\n<li>The basic blocks of the Alpha board is <a href=\"https:\/\/wiki.cryptech.is\/Hardware\">shown here<\/a>.<\/li>\n<li>The <a href=\"https:\/\/wiki.cryptech.is\/AlphaBoardComponents\">BOM and component requirements<\/a>.<\/li>\n<li>The detailed <a href=\"https:\/\/wiki.cryptech.is\/browser\/doc\/design\/Alpha_board_drawing.pdf\">Alpha board functional drawing<\/a>.<\/li>\n<\/ul>\n<h2>Plan<\/h2>\n<ol>\n<li>Choose FPGA and ARM (done)<\/li>\n<li>Develop BOM, requirements and functional diagram (done-ish).<\/li>\n<li>Develop complete <a href=\"https:\/\/wiki.cryptech.is\/AlphaSchematics\">schematics<\/a> (almost done).<\/li>\n<li>Develop dev-board ouorselves to connect chosen ARM to FPGA on Novena, to do some early development and testing in parallell with step 5.<\/li>\n<li>Get professional designer to do many-layer PCB from schematics.<\/li>\n<li>Manufacture a couple of boards (~10).<\/li>\n<li>Bug fix hardware+software.<\/li>\n<li>Make beta design.<\/li>\n<li>Manufacture more boards (~50).<\/li>\n<\/ol>\n<h2>Way forward<\/h2>\n<p>We currently use the Novena as a dev-board. It has a <a href=\"http:\/\/www.freescale.com\/webapp\/sps\/site\/prod_summary.jsp?code=i.MX6Q&amp;tab=Documentation_Tab&amp;pspll=1&amp;SelectedAsset=Documentation&amp;ProdMetaId=PID\/DC\/i.MX6Q&amp;fromPSP=true&amp;assetLockedForNavigation=true&amp;componentId=2&amp;leftNavCode=1&amp;pageSize=25&amp;Documentation=Documentation\/00610Ksd1nd%60%60Data%20Sheets&amp;fpsp=1&amp;linkline=Data%20Sheets\">Freescale i.MX6 CPU (ARM Cortex A9)<\/a>, and a Xilinx Spartan-6 LX45 CSG324-packaged FPGA.<br\/><\/p>\n<p>We want to over-size rather than under-size the FPGA on the Alpha board. The biggest FPGA from Xilinx\/Altera that does not require tools with a commercial license that we've found is the \u200bXilinx Artix-7 XC7A200T FBG484.<\/p>\n<p>We've only considered ARM CPUs. Either about the size of Cortex M3 \/ M4 (or future M7) or Cortex A8 \/ A9.<br\/>\nA design with an A8\/A9 turned out to be unattractive from a complexity and price point of view, so we're going to use one of the biggest M4 we could find. STM32F429.<\/p>\n<p>We are currently using a Freescale proprietary interface called EIM between the ARM and the FPGA on the Novena. EIM is not available with microcontrollers from ST, so we will use a similar interface made for connecting the ARM to external memory (called FMC). This interface runs at speeds up to 90 MHz, which is more than we are going to be using with our current FPGA cores.<\/p>\n<h2>Risks at this point<\/h2>\n<ol>\n<li>Taking too long deciding on what the Alpha board should contain.<\/li>\n<li>Ordering PCB design and manufacturing boards that just does not work for our purposes.<\/li>\n<li>Getting Alpha boards that require too much time to get working.<\/li>\n<\/ol>\n<h2>Conclusion<\/h2>\n<p>Use a high-end Cortex-M4 ARM.<br\/>\nThere is a huge difference in complexity between M4 and A9, mainly because of the DDR3 memory used with A9. An M4 design will both be easier to design, cheaper to both design and build and will be fast enough for all our early use cases anyways.<\/p>\n<p>Do not use the exact same FPGA, as it is too small to fit everything we need.<br\/><\/p>\n<p>Develop full schematics in-house.<br\/>\nIt turned out to be hard, costly or both, to outsource this part. We will probably spend less time developing the schematics ourselves than we would spend explaining what to develop to a third party.<\/p>","category":{"@attributes":{"term":"AlphaBoard"}}},{"title":"Review feedback of the Alpha schematics","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/AlphaReviewLog","rel":"alternate"}},"published":"2016-12-15T22:43:00+00:00","updated":"2016-12-15T22:43:00+00:00","author":{"name":"Cryptech Core Team"},"id":"tag:wiki.cryptech.is,2016-12-15:\/AlphaReviewLog","summary":"<h2>Power subsystem<\/h2>\n<table>\n<thead>\n<tr>\n<th>Comment<\/th>\n<th>Who<\/th>\n<th>Resolution<\/th>\n<th>Status<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>The LTS3060ITS8 is a 8-lead device but the symbol shows only 6 (there are 3 GND leads).<\/td>\n<td>Kent<\/td>\n<td>ft to correct mapping of pins between symbol and package<\/td>\n<td>Done<\/td>\n<\/tr>\n<tr>\n<td>The output capacitor C13 can have higher capacitance. The 2.2 uF is the lowest \u2026<\/td><\/tr><\/tbody><\/table>","content":"<h2>Power subsystem<\/h2>\n<table>\n<thead>\n<tr>\n<th>Comment<\/th>\n<th>Who<\/th>\n<th>Resolution<\/th>\n<th>Status<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>The LTS3060ITS8 is a 8-lead device but the symbol shows only 6 (there are 3 GND leads).<\/td>\n<td>Kent<\/td>\n<td>ft to correct mapping of pins between symbol and package<\/td>\n<td>Done<\/td>\n<\/tr>\n<tr>\n<td>The output capacitor C13 can have higher capacitance. The 2.2 uF is the lowest recommended value and since this is a X7R\/25V type it may well fall below that. I recommend 4.7uF to add some margin. C7 may also be changed to 4.7uF.<\/td>\n<td>Kent<\/td>\n<td>Updated schematics<\/td>\n<td>Done<\/td>\n<\/tr>\n<tr>\n<td>LMZ13608 has 11 pins plus an exposed pad (must be connected to pin 5) but only 9 pins are shown in the schematic symbol.<\/td>\n<td>Kent<\/td>\n<td>Will change symbol to show both name and pin number(s)<\/td>\n<td>Done<\/td>\n<\/tr>\n<tr>\n<td>The output voltage for LMZ13608 is calculated as 0.795 V * (1 + R8\/R9) which is 4.93 V. It is a bit low for a 5.0 V supply.<\/td>\n<td>Kent<\/td>\n<td>5 volts not used, just an intermediate voltage. No change required.<\/td>\n<td>Done<\/td>\n<\/tr>\n<tr>\n<td>I don't see any SH pin in the datasheet for the LMZ13608 device. Is it the one called NC?<\/td>\n<td>Kent<\/td>\n<td>ft check symbol, then ask Pavel to review<\/td>\n<td>ft done, pavel<\/td>\n<\/tr>\n<tr>\n<td>What form factor and main power supply should we use for the Alpha?<\/td>\n<td>ft<\/td>\n<td>Try to find drawing with dimensions for NUC computers, to see if we can use that form factor and power supplies<\/td>\n<td>Pavel<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Entropy source<\/h2>\n<table>\n<thead>\n<tr>\n<th>Comment<\/th>\n<th>Who<\/th>\n<th>Resolution<\/th>\n<th>Status<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Add optocoupler as per Jacob's suggestion on tech@ 2015-07-24? The suggestion is to add a fast optocoupler to really isolate AGND from GND.<\/td>\n<td>Jacob W<\/td>\n<td>As this appears to require a bigger digitizer, which in turn might require another 3V3 regulator, we don't want to add that to this otherwise quite well tested part of the circuitry for the Alpha.<\/td>\n<td>Done<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>STM32<\/h2>\n<table>\n<thead>\n<tr>\n<th>Comment<\/th>\n<th>Who<\/th>\n<th>Resolution<\/th>\n<th>Status<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>The JTAG port is not connected. For debug puposes, it could be good to have access to the JTAG port, at least at the prototype board.<\/td>\n<td>Kent<\/td>\n<td>We don't know of a reason to add the full JTAG, when we have SWD. At least not if we keep the LQFP package because then we don't think we need to be able to do boundary scan.<\/td>\n<td>Done<\/td>\n<\/tr>\n<tr>\n<td>The capacitors C22-C25 are connected between VCAP1\/2 and VCCO_3V3. According to the datasheet as well as AN4488 they shall be connected to GND. It should be enough with one 2.2uF capacitor for each pin.<\/td>\n<td>Kent<\/td>\n<td>Yes, change to GND instead of 3V3. Our interpretation is that we actually should have 2x2.2 for both VCAP1 and VCAP2. We also prefer 2x2.2 over  1x4.7 so not changing that.<\/td>\n<td>Done<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>2x512 Mbit SDRAM for the ARM<\/h2>\n<table>\n<thead>\n<tr>\n<th>Comment<\/th>\n<th>Who<\/th>\n<th>Resolution<\/th>\n<th>Status<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>U6 has no speed grade specified. TSOP-II package is selected. The BGA package is much smaller and easier to handle in production.<\/td>\n<td>Kent<\/td>\n<td>We will investigate packages and speed<\/td>\n<td>Pavel<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Keystore memory, 128 Mbit<\/h2>\n<table>\n<thead>\n<tr>\n<th>Comment<\/th>\n<th>Who<\/th>\n<th>Resolution<\/th>\n<th>Status<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Hard to see which resistor is R17 and R18. What is R17 (the left one) intended for?<\/td>\n<td>Kent<\/td>\n<td>Fixed the resistors. CS should be connected to ARM, default is \"not enabled\" through pull-up.<\/td>\n<td>Done<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>RTC<\/h2>\n<table>\n<thead>\n<tr>\n<th>Comment<\/th>\n<th>Who<\/th>\n<th>Resolution<\/th>\n<th>Status<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>From where is 3V3_BATT supplied? Is it an external power source from connector JP3? Or the JP4 jumper?<\/td>\n<td>Kent<\/td>\n<td>Yes, external power source connected to JP4.<\/td>\n<td>Done<\/td>\n<\/tr>\n<tr>\n<td>Do we need a separate RTC chip at all?<\/td>\n<td>Jacob W<\/td>\n<td>Keeping it for the Alpha since it is already there.<\/td>\n<td>Done<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Micro SD card<\/h2>\n<table>\n<thead>\n<tr>\n<th>Comment<\/th>\n<th>Who<\/th>\n<th>Resolution<\/th>\n<th>Status<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Which connector to use? Haven't found a good one with Eagle symbol. Some different kinds available.<\/td>\n<td>ft<\/td>\n<td>Remove SD card.<\/td>\n<td>Done<\/td>\n<\/tr>\n<tr>\n<td>Novena seems to have card reset capability (power control from MCU). Do we want the same?<\/td>\n<td>ft<\/td>\n<td>Remove SD card.<\/td>\n<td>Done<\/td>\n<\/tr>\n<tr>\n<td>Novena has two SD slots, and list power at 200mA. Do we need a separate power regulator for the SD card, or can we use VCCO_3V3?<\/td>\n<td>ft<\/td>\n<td>Remove SD card.<\/td>\n<td>Done<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>2x USB UARTs for management and application access<\/h2>\n<table>\n<thead>\n<tr>\n<th>Comment<\/th>\n<th>Who<\/th>\n<th>Resolution<\/th>\n<th>Status<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Should we add an EEPROM for FTDI USB related settings or not?<\/td>\n<td>ft<\/td>\n<td>Not adding anything not strictly necessary to the schematics.<\/td>\n<td>Done<\/td>\n<\/tr>\n<tr>\n<td>LED6 is the same type as LED1 at page 4 but they have different values at their resistors (220\/330 ohm).<\/td>\n<td>Kent<\/td>\n<td>Went with 330 for consistency.<\/td>\n<td>Done<\/td>\n<\/tr>\n<tr>\n<td>The recommended protection devices on D+ and D- are missing.<\/td>\n<td>Kent<\/td>\n<td>Pavel to look for reference<\/td>\n<td>pavel<\/td>\n<\/tr>\n<tr>\n<td>Hard to see what reference designators that belong to which component in some places.<\/td>\n<td>Kent<\/td>\n<td>Fredrik will improve clarity<\/td>\n<td>Done<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>AVR Tiny Tamper Detect MCU<\/h2>\n<p>Fredrik to verify if Kent had comments about AVR\n| Comment | Who | Resolution | Status | \n| --- | --- | --- | --- | \n| | | | <\/p>\n<h2>Analog switch controlling access to the MKM<\/h2>\n<table>\n<thead>\n<tr>\n<th>Comment<\/th>\n<th>Who<\/th>\n<th>Resolution<\/th>\n<th>Status<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Suggest changing this chip to an 74AC244 like the one used for the FPGA config memory.<\/td>\n<td>Pavel<\/td>\n<td>Will change.<\/td>\n<td>Done<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>FPGA configuration<\/h2>\n<table>\n<thead>\n<tr>\n<th>Comment<\/th>\n<th>Who<\/th>\n<th>Resolution<\/th>\n<th>Status<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>The mode signals are fixed to SPI Master mode. If more flexibility is needed, see next comment, jumpers may be added.<\/td>\n<td>Kent<\/td>\n<td>This is intentional.<\/td>\n<td>Done<\/td>\n<\/tr>\n<tr>\n<td>One-bit data us for the configuration memory makes the configuration rather slow. If higher speed is preferable the SPI memory supports 4-bit data.<\/td>\n<td>Kent<\/td>\n<td>Bitstream is around 65 MBit, takes 4-5 seconds to load using single bit (@ 15MHz). We think that should be good enough.<\/td>\n<td>Done<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>FPGA I\/O<\/h2>\n<table>\n<thead>\n<tr>\n<th>Comment<\/th>\n<th>Who<\/th>\n<th>Resolution<\/th>\n<th>Status<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>A lot of the FPGA I\/Os are unused. For debug purposes some of these can be made available by connecting them to a pin header. Unconnected BGA balls are very hard to use.<\/td>\n<td>Kent<\/td>\n<td>Added two more GPIOs from AVR to FPGA and two more from AVR to ARM. Remaining question is how many we should add from FPGA to ARM.<\/td>\n<td>Pavel<\/td>\n<\/tr>\n<tr>\n<td>A zero ohm resistor at the oscillator output can simplify debug.<\/td>\n<td>Kent<\/td>\n<td>Fredrik will add zero ohm resistor<\/td>\n<td>Done<\/td>\n<\/tr>\n<tr>\n<td>Joachim suggests, that we may want to have some high-speed extension interface for debugging and dumping large amounts of data. For example, we can implement GMII or RGMII using external GbE PHY and GPIO header(s). In that sense, at least one of the GPIO header pins should be connected to clock-capable (MRCC) FPGA pin.<\/td>\n<td>Pavel<\/td>\n<td>Pavel will finalize notes in schematics to enable this.<\/td>\n<td>pavel<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>FPGA voltage regulators<\/h2>\n<table>\n<thead>\n<tr>\n<th>Comment<\/th>\n<th>Who<\/th>\n<th>Resolution<\/th>\n<th>Status<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>U14 and U15 have 38 pins but only 11 are visible in the schematic symbol. No pin numbers are visible. The NC pins must not be connected which should be shown.<\/td>\n<td>Kent<\/td>\n<td>Fredrik will update symbol to show pins.<\/td>\n<td>Done<\/td>\n<\/tr>\n<tr>\n<td>I am not familiar with the EN6347Q device so I would add ferrite cores on the outputs, for debug and measurement. Maybe that's what the zero ohm resistors are intended for?<\/td>\n<td>Kent<\/td>\n<td>Will change 0-ohm to ferrites. Pavel will look up part number, Fredrik will update schematics.<\/td>\n<td>pavel, ft<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>FPGA power regulators<\/h2>\n<table>\n<thead>\n<tr>\n<th>Comment<\/th>\n<th>Who<\/th>\n<th>Resolution<\/th>\n<th>Status<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>The EN5364 device has 68 pins and 2 exposed pads but the symbol only shows 19 pins, without pin number.<\/td>\n<td>Kent<\/td>\n<td>Fredrik will update symbol to show pins<\/td>\n<td>Done<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Additional comments from Kent<\/h3>\n<p>I have reviewed the schematic drawings for 'Cryptech Alpha board', rev 02\n(12\/28\/15), together with the block diagram, rev 0.010 (2015-05-27). I\nhave spent 8 hours on this review.<\/p>\n<h4>General<\/h4>\n<p>The block diagram does not comply with the schematics:<\/p>\n<table>\n<thead>\n<tr>\n<th>Comment<\/th>\n<th>Who<\/th>\n<th>Resolution<\/th>\n<th>Status<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Analog switch replaced by line driver (IC2)<\/td>\n<td>Kent<\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>There is no reset block to the Tamper Detect CPU (U10) in the schematics<\/td>\n<td>Kent<\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>I can't find any Reset_n signal to the FPGA (U13) nor any FPGA reset block (maybe it is supposed to indicate the FPGA configuration?).<\/td>\n<td>Kent<\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Interfaces for Smart Card and display\/control seems to be missing in the schematics JTAG port for the ARM (U4) is not present in the schematics<\/td>\n<td>Kent<\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>JTAG port for the Tamper Detect CPU (U10) is not present in the schematics<\/td>\n<td>Kent<\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Master Key Memory (U12) type is different (23A640 vs 23K640)<\/td>\n<td>Kent<\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Power supply voltages does not comply with the schematics<\/td>\n<td>Kent<\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>The battery near the RTC on the block diagram is not present in the schematics<\/td>\n<td>Kent<\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Minor differences in component names (suggestion: remove details from block diagram)<\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>The header information should be updated with design name\/ID and author.<\/td>\n<td>Kent<\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Some components in the schematic (U1, U2, U14, U15, Q3) doesn't show pin numbers which make it harder to review<\/td>\n<td>Kent<\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>The sheets seems to have different sizes (1-13 differs from 14-26) and origo is placed in different positions in different pages. Not important but looks a bit odd.<\/td>\n<td>Kent<\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Eagle doesn't seem to have a symbol for unconnected pins. If nothing else, a comment would be good so it is obvious that the pin shall be unconnected and is not forgotten.<\/td>\n<td>Kent<\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>On prototype boards it can sometimes be beneficial to insert zero ohm resistances on certain nets, typical clock and reset signals, to simplify debug. Typical places can be voltage regulator outputs and signals that are buried in the PCB.<\/td>\n<td>Kent<\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>The selected package for the CPU (U4) is LQFP208. The size is 30x30 mm compared to the TFBGA216 package that is only 13x13 mm. Also, the pitch is 0.5 mm for the LQFP208 while the TFBGA216 package has a ball pitch of 0.8 mm.<\/td>\n<td>Kent<\/td>\n<td>Joachim and ft thinks LQFP package makes sense for the Alpha - gives 208 \"test points\" and physical size not that important<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>For debug purposes it is recommended to place test points for signals that are hard to reach, to simplify measurement.<\/td>\n<td>Kent<\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>Not Reviewed<\/h4>\n<p>A one day review doesn't allow a thorough design review. Some\nprioritizations are necessary. I have not reviewed:<\/p>\n<table>\n<thead>\n<tr>\n<th>Comment<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>FPGA pinout. The FPGA vendor tool (Vivado) does some of the checks. It checks that clock signals are placed at clock pins, that selected I\/O types are compatible with the bank structure. Vivado can also check that not to much I\/O switching power per bank is used and can also calculate power consumption (with correct user input).<\/td>\n<\/tr>\n<tr>\n<td>Power calculations. The FPGA power is heavily dependent on how it is used. This can be estimated with the Vivado tool.<\/td>\n<\/tr>\n<tr>\n<td>Supply voltage quality. This requires simulations that are out of scope for this review.<\/td>\n<\/tr>\n<tr>\n<td>Power sequencing.<\/td>\n<\/tr>\n<tr>\n<td>Physical properties like PCB symbols, layout issues, thermal design and board area use.<\/td>\n<\/tr>\n<tr>\n<td>Production test or optimization for production.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>","category":{"@attributes":{"term":"AlphaBoard"}}},{"title":"Cryptech Workshop Agenda, Berlin, 15-16 July 2016","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/BerlinWorkshop","rel":"alternate"}},"published":"2016-12-15T22:43:00+00:00","updated":"2016-12-15T22:43:00+00:00","author":{"name":"Cryptech Core Team"},"id":"tag:wiki.cryptech.is,2016-12-15:\/BerlinWorkshop","summary":"<h2>Overview<\/h2>\n<p>Intercontinental Berlin\nBudapest Str. 2\n10787 Berlin, Germany<\/p>\n<p>Meeting Room: K\u00f6penick III<\/p>\n<p>Cost of attendance: None<\/p>\n<p>Alpha Board cost: if you are an alpha tester and plan to take an alpha board home with you, we would like to recover cost for these boards from you. We are asking \u2026<\/p>","content":"<h2>Overview<\/h2>\n<p>Intercontinental Berlin\nBudapest Str. 2\n10787 Berlin, Germany<\/p>\n<p>Meeting Room: K\u00f6penick III<\/p>\n<p>Cost of attendance: None<\/p>\n<p>Alpha Board cost: if you are an alpha tester and plan to take an alpha board home with you, we would like to recover cost for these boards from you. We are asking for 800USD. We plan to collect the money through <a href=\"https:\/\/www.crowdsupply.com\/cryptech\/open-hardware-security-module\">crowdsupply<\/a>.<\/p>\n<h2>Draft Agenda<\/h2>\n<h3>Friday 15 July<\/h3>\n<table>\n<thead>\n<tr>\n<th>When<\/th>\n<th>What<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>0830<\/td>\n<td>Coffee<\/td>\n<\/tr>\n<tr>\n<td>0930<\/td>\n<td>Introductions, setup<\/td>\n<\/tr>\n<tr>\n<td>1000<\/td>\n<td>Presentation of the cryptech alpha device<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>- cryptech overview (attachment:2016-07-15-berlin-main.pdf)<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>- overall hardware architecture (attachment:2016-07-15-berlin-hw.pdf)<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>- the FPGA (attachment:2016-07-15-berlin-fpga.pdf)<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>- HSM software architecture, CLI, and RPC mechanism (attachment:2016-07-15-berlin-sw.pdf)<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>- PKCS11, client-side software, how to configure the board (attachment:2016-07-15-berlin-fw.pdf)<\/td>\n<\/tr>\n<tr>\n<td>1100<\/td>\n<td>Break<\/td>\n<\/tr>\n<tr>\n<td>1130<\/td>\n<td>Hands-on testing<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>- get binary packages running on participants' own laptops (<a href=\"https:\/\/wiki.cryptech.is\/BinaryPackages\">BinaryPackages<\/a>)<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>- <a href=\"https:\/\/wiki.cryptech.is\/OpenDNSSEC\">OpenDNSSEC<\/a> is a guide for how to initialize a rev03 board and use it to sign a zone using OpenDNNSSEC - use as a baseline for own testing and experimentation with PKCS11-based applications.<\/td>\n<\/tr>\n<tr>\n<td>1230<\/td>\n<td>Buffet lunch<\/td>\n<\/tr>\n<tr>\n<td>1330<\/td>\n<td>Hands-on testing continues<\/td>\n<\/tr>\n<tr>\n<td>1500<\/td>\n<td>Coffee break<\/td>\n<\/tr>\n<tr>\n<td>1530<\/td>\n<td>Hands-on testing continues<\/td>\n<\/tr>\n<tr>\n<td>1700<\/td>\n<td>Finish day one<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Saturday 16 July<\/h3>\n<table>\n<thead>\n<tr>\n<th>When<\/th>\n<th>What<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>0900<\/td>\n<td>Hands-on testing continues<\/td>\n<\/tr>\n<tr>\n<td>1030<\/td>\n<td>Coffee break<\/td>\n<\/tr>\n<tr>\n<td>1100<\/td>\n<td>Workshop wrap-up<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>- outstanding questions<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>- feedback from the participants<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>- opportunity to articulate what participants will need that isn't readily available<\/td>\n<\/tr>\n<tr>\n<td>1300<\/td>\n<td>Finish<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>What you need to bring<\/h2>\n<p>During the workshop you will have access to the cryptech platform using\na PKCS11 interface (reviewing PKCS11 might be a good way to prepare for\nthe workshop). We will use OpenDNSSEC (using PKCS11) as a reference\nuse case but you are encouraged to think about other applications that\nuse PKCS11 you want to test. We will be there to help and will do our\nbest to fix stuff that breaks along the way.<\/p>\n<p>Bring a laptop with 2 USB 2.0 ports free (or a USB hub) running either\nMacOS or Debian Linux. We will provide client PKCS11 software\npackages for Debian Jessie and Ubuntu Xenial, and Homebrew for MacOS. You\nwill use one USB port for PKCS11 and one USB port for admin CLI access\nto the cryptech device.<\/p>\n<p>For admin access you will find useful some form of serial console application\ncapable of handling 921600 bps line speed.<\/p>","category":{"@attributes":{"term":"Workshops"}}},{"title":"How to start using coretest_hashes on the TerasIC C5G Board","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/CoretestHashesC5G","rel":"alternate"}},"published":"2016-12-15T22:43:00+00:00","updated":"2016-12-15T22:43:00+00:00","author":{"name":"Joachim Str\u00f6mbergson"},"id":"tag:wiki.cryptech.is,2016-12-15:\/CoretestHashesC5G","summary":"<p>This is a writeup on how to setup, build and testrun the <code>coretest_hashes<\/code>\nCryptech subsystem on a TerasiC C5G Cyclone V GX Starter Kit FPGA\ndevelopment board <a href=\"http:\/\/www.terasic.com.tw\/cgi-bin\/page\/archive.pl?Language=English&amp;No=830\">1<\/a>.<\/p>\n<h2>Introduction<\/h2>\n<h3>Test Setup<\/h3>\n<p>The test setup consists of:<\/p>\n<ul>\n<li>\n<p>A development computer running the Altera Quartus II FPGA development software. This computer will \u2026<\/p><\/li><\/ul>","content":"<p>This is a writeup on how to setup, build and testrun the <code>coretest_hashes<\/code>\nCryptech subsystem on a TerasiC C5G Cyclone V GX Starter Kit FPGA\ndevelopment board <a href=\"http:\/\/www.terasic.com.tw\/cgi-bin\/page\/archive.pl?Language=English&amp;No=830\">1<\/a>.<\/p>\n<h2>Introduction<\/h2>\n<h3>Test Setup<\/h3>\n<p>The test setup consists of:<\/p>\n<ul>\n<li>\n<p>A development computer running the Altera Quartus II FPGA development software. This computer will be building the FPGA comfiguration image (a sof-file) and then use the Altera USB-blaster to load the image into the FPGA on the TerasIC board. This computer shall therefore be connected to the USB-blaster port on the TerasIC board.<\/p>\n<\/li>\n<li>\n<p>A host computer that runs the <code>hash_tester<\/code> application that communicates with the FPGA design downloaded into the FPGA and perform tests on the hash functions. The host computer is connected to the USB-serial port on the TerasIC board.<\/p>\n<\/li>\n<li>\n<p>The TerasIC Cyclone 5 GX Starter Kit (C5G) board.<\/p>\n<\/li>\n<\/ul>\n<p><img src=\"http:\/\/www.terasic.com.tw\/attachment\/archive\/830\/image\/image_74_thumb.jpg\"><\/p>\n<p><em>The TerasIC Cyclone 5 GX Starter Kit board.<\/em><\/p>\n<p>The USB ports are the shown in the upper left corner. These are USB type B ports. The port to the left is the USB-blaster port. The port to the right is the USB-serial port. In the bottom right corner there is a row of buttons and just above them 8 LEDs. These will also be used by the <code>coretest_hashes<\/code> subsystem. There is a HDMI port on the C5G board but it will not be used. All communication is done in CLI on the host computer.<\/p>\n<p><strong>NOTE: You don't actually need two separate computers. You can use one computer with one or two USB ports. If you only have one USB port you will need to switch from connecting to the USB-Blaster port to the USB-serial port on the C5G board once the <code>coretest_hashes<\/code> FPGA configuration has been downloaded to the board.<\/strong><\/p>\n<p>My personal setup is a laptop with two USB ports which allows me to have connections to both USB ports on the C5G boards simultaneously.<\/p>\n<h3><code>Coretest_hashes<\/code><\/h3>\n<p>The <code>coretest_hashes<\/code> is a subsystem that is a FPGA design that contains Cryptech application cores as well as support cores used to run tests of the\nSHA-1 and SHA-256 hash functions from a host computer via a serial\ninterface connected to a FPGA device. The subsystem consists of:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/git.cryptech.is\/core\/sha1\">sha1<\/a>: A HW implementation of the SHA-1 hash function.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/git.cryptech.is\/core\/sha256\">sha56<\/a>: A HW implementation of the SHA-256 hash function.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/git.cryptech.is\/core\/coretest\">coretest<\/a>: A command parser that accepts read\/write commands from a\n  host, executes the commands and sends the response.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/git.cryptech.is\/core\/usrt\">uart<\/a>: A simple serial interface that connects coretest to the host.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/git.cryptech.is\/core\/coretest_hashes\"><code>coretest_hashes<\/code><\/a>: A top level wrapper that connects all the cores as\n  well as connecting the rxd and txd ports on the uart to external pins as well as clk and reset. This core repo also contains the Python command line program <code>hash_tester<\/code> we will be using to talk to coretester and perform tests of the sha1 and sha256 cores.<\/p>\n<\/li>\n<\/ul>\n<p><img alt=\"coretest_hashes.png\" src=\"https:\/\/wiki.cryptech.is\/CoretestHashesC5G\/CoretestHashesC5G\/coretest_hashes.png\"><\/p>\n<p><em>The <code>coretest_hashes<\/code> subsystem with sha1 and sha256 cores. The system is connected to a host computer via a serial interface.<\/em><\/p>\n<h2>SW and system requirements<\/h2>\n<p>You need to download and install the Altera Quartus II Web Edition\nsoftware <a href=\"http:\/\/www.altera.com\/products\/software\/quartus-ii\/web-edition\/qts-we-index.html\">2<\/a>. There are versions of Quartus II Web Edition for Windows and Linux. I'm using the Windows version, but Linux <strong>should<\/strong> work too.<\/p>\n<p>You will probably also install drivers for the Altera USB-blaster in order to program the FPGA on the development board. For instructions on how to install the driver, please see the Altera page for USB-blaster <a href=\"http:\/\/www.ftdichip.com\/Drivers\/VCP.htm\">7<\/a>.<\/p>\n<p>For communication with the <code>coretest_hashes<\/code> in the FPGA we will be using the USB-serial device on the development board. The USB-serial chip on the\nboard is a FTDI FT232R <a href=\"http:\/\/www.ftdichip.com\/Products\/ICs\/FT232R.htm\">3<\/a>. If your host OS does not have support for this device you will need to install drivers. For Windows the correct file to download seems to be a VCP file <a href=\"http:\/\/www.ftdichip.com\/Drivers\/VCP.htm\">7<\/a>.<\/p>\n<p>Finally, in order to talk to <code>coretest_hashes<\/code> from the host there is application SW. This SW is written in Python and uses the Pyserial<a href=\"http:\/\/pyserial.sourceforge.net\/\">5<\/a> library. If you don't have Python and\/or Pyserial installed you will need to install that too.<\/p>\n<p><strong>NOTE: Python and Pyserial does not have to be installed in the same OS as Quartus II but can be run from a separate system and OS.<\/strong><\/p>\n<p>(I'm using Quartus II 13.1 64-bit version running in Win8.1 in a VM in Parallels Desktop in OX 10.9.2 during this writeup. And I use Python and Pyserial in an iTerm in OSX for the serial communication.)<\/p>\n<p>With all this SW installed you should be ready to proceed to create the\n<code>coretest_hashes<\/code> project.<\/p>\n<p><strong>I also recommend that you download the TerasIC C5G User Manual <a href=\"http:\/\/www.terasic.com.tw\/cgi-bin\/page\/archive.pl?Language=English&amp;CategoryNo=165&amp;No=830&amp;PartNo=4\">4<\/a>. It is a really good document that describes the boards with all functions, pins etc.<\/strong><\/p>\n<h2>Downloading the cores<\/h2>\n<p>Create a project directory. I'm using test_<code>coretest_hashes<\/code>. In it I add\na core directory and a toolruns directory:<\/p>\n<div class=\"highlight\"><pre><span><\/span><code><span class=\"c1\">#&gt; ls test_coretest_hashes<\/span>\n<span class=\"n\">cores<\/span><span class=\"o\">\/<\/span><span class=\"w\">    <\/span><span class=\"n\">toolruns<\/span><span class=\"o\">\/<\/span>\n<\/code><\/pre><\/div>\n\n<p>The cores we need to build the subsystem must be downloaded from the\nCryptech server. The cores we need are:<\/p>\n<ul>\n<li><code>sha1<\/code><\/li>\n<li><code>sha256<\/code><\/li>\n<li><code>uart<\/code><\/li>\n<li><code>coretest<\/code><\/li>\n<li><code>coretest_hashes<\/code><\/li>\n<\/ul>\n<div class=\"highlight\"><pre><span><\/span><code><span class=\"err\">#<\/span><span class=\"o\">&gt;<\/span><span class=\"w\"> <\/span><span class=\"n\">cd<\/span><span class=\"w\"> <\/span><span class=\"n\">cores<\/span>\n<span class=\"err\">#<\/span><span class=\"o\">&gt;<\/span><span class=\"w\"> <\/span><span class=\"n\">ssh<\/span><span class=\"w\"> <\/span><span class=\"n\">git<\/span><span class=\"nv\">@git<\/span><span class=\"p\">.<\/span><span class=\"n\">cryptech<\/span><span class=\"p\">.<\/span><span class=\"k\">is<\/span>\n<span class=\"n\">hello<\/span><span class=\"w\"> <\/span><span class=\"o\">&lt;<\/span><span class=\"n\">FOO<\/span><span class=\"o\">&gt;<\/span><span class=\"p\">,<\/span><span class=\"w\"> <\/span><span class=\"n\">this<\/span><span class=\"w\"> <\/span><span class=\"k\">is<\/span><span class=\"w\"> <\/span><span class=\"n\">git<\/span><span class=\"nv\">@cryptech<\/span><span class=\"w\"> <\/span><span class=\"n\">running<\/span><span class=\"w\"> <\/span><span class=\"n\">gitolite3<\/span><span class=\"w\"> <\/span><span class=\"n\">v3<\/span><span class=\"mf\">.5.2<\/span><span class=\"o\">-<\/span><span class=\"mi\">0<\/span><span class=\"o\">-<\/span><span class=\"n\">g926bd5f<\/span><span class=\"w\"> <\/span><span class=\"k\">on<\/span><span class=\"w\"> <\/span><span class=\"n\">git<\/span><span class=\"w\"> <\/span><span class=\"mf\">1.9.0<\/span>\n\n<span class=\"w\"> <\/span><span class=\"n\">R<\/span><span class=\"w\">   <\/span><span class=\"n\">C<\/span><span class=\"w\">  <\/span><span class=\"o\">[<\/span><span class=\"n\">a-zA-Z0-9<\/span><span class=\"o\">]<\/span><span class=\"p\">.<\/span><span class=\"o\">*<\/span>\n<span class=\"w\"> <\/span><span class=\"n\">R<\/span><span class=\"w\"> <\/span><span class=\"n\">W<\/span><span class=\"w\">    <\/span><span class=\"n\">core<\/span><span class=\"o\">\/<\/span><span class=\"n\">coretest<\/span>\n<span class=\"w\"> <\/span><span class=\"n\">R<\/span><span class=\"w\"> <\/span><span class=\"n\">W<\/span><span class=\"w\">    <\/span><span class=\"n\">core<\/span><span class=\"o\">\/<\/span><span class=\"n\">coretest_hashes<\/span>\n<span class=\"w\"> <\/span><span class=\"n\">R<\/span><span class=\"w\"> <\/span><span class=\"n\">W<\/span><span class=\"w\">    <\/span><span class=\"n\">core<\/span><span class=\"o\">\/<\/span><span class=\"n\">coretest_test_core<\/span>\n<span class=\"w\"> <\/span><span class=\"n\">R<\/span><span class=\"w\"> <\/span><span class=\"n\">W<\/span><span class=\"w\">    <\/span><span class=\"n\">core<\/span><span class=\"o\">\/<\/span><span class=\"n\">sha1<\/span>\n<span class=\"w\"> <\/span><span class=\"n\">R<\/span><span class=\"w\"> <\/span><span class=\"n\">W<\/span><span class=\"w\">    <\/span><span class=\"n\">core<\/span><span class=\"o\">\/<\/span><span class=\"n\">sha256<\/span>\n<span class=\"w\"> <\/span><span class=\"n\">R<\/span><span class=\"w\"> <\/span><span class=\"n\">W<\/span><span class=\"w\">    <\/span><span class=\"n\">core<\/span><span class=\"o\">\/<\/span><span class=\"n\">test_core<\/span>\n<span class=\"w\"> <\/span><span class=\"n\">R<\/span><span class=\"w\"> <\/span><span class=\"n\">W<\/span><span class=\"w\">    <\/span><span class=\"n\">core<\/span><span class=\"o\">\/<\/span><span class=\"n\">uart<\/span>\n<span class=\"w\"> <\/span><span class=\"n\">R<\/span><span class=\"w\"> <\/span><span class=\"n\">W<\/span><span class=\"w\">    <\/span><span class=\"n\">doc<\/span><span class=\"o\">\/<\/span><span class=\"n\">presentations<\/span>\n<span class=\"w\"> <\/span><span class=\"n\">R<\/span><span class=\"w\">      <\/span><span class=\"n\">gitolite<\/span><span class=\"o\">-<\/span><span class=\"k\">admin<\/span>\n<span class=\"k\">Connection<\/span><span class=\"w\"> <\/span><span class=\"k\">to<\/span><span class=\"w\"> <\/span><span class=\"n\">cryptech<\/span><span class=\"p\">.<\/span><span class=\"k\">is<\/span><span class=\"w\"> <\/span><span class=\"n\">closed<\/span><span class=\"p\">.<\/span>\n<\/code><\/pre><\/div>\n\n<p>We can see the relevant cores and check them out one by one:<\/p>\n<div class=\"highlight\"><pre><span><\/span><code><span class=\"err\">#<\/span><span class=\"o\">&gt;<\/span><span class=\"w\"> <\/span><span class=\"n\">git<\/span><span class=\"w\"> <\/span><span class=\"n\">clone<\/span><span class=\"w\"> <\/span><span class=\"n\">git<\/span><span class=\"nv\">@git<\/span><span class=\"p\">.<\/span><span class=\"n\">cryptech<\/span><span class=\"p\">.<\/span><span class=\"k\">is<\/span><span class=\"err\">:<\/span><span class=\"n\">core<\/span><span class=\"o\">\/<\/span><span class=\"n\">sha1<\/span><span class=\"p\">.<\/span><span class=\"n\">git<\/span>\n<span class=\"err\">#<\/span><span class=\"o\">&gt;<\/span><span class=\"w\"> <\/span><span class=\"n\">git<\/span><span class=\"w\"> <\/span><span class=\"n\">clone<\/span><span class=\"w\"> <\/span><span class=\"n\">git<\/span><span class=\"nv\">@git<\/span><span class=\"p\">.<\/span><span class=\"n\">cryptech<\/span><span class=\"p\">.<\/span><span class=\"k\">is<\/span><span class=\"err\">:<\/span><span class=\"n\">core<\/span><span class=\"o\">\/<\/span><span class=\"n\">sha256<\/span><span class=\"p\">.<\/span><span class=\"n\">git<\/span>\n<span class=\"err\">#<\/span><span class=\"o\">&gt;<\/span><span class=\"w\"> <\/span><span class=\"n\">git<\/span><span class=\"w\"> <\/span><span class=\"n\">clone<\/span><span class=\"w\"> <\/span><span class=\"n\">git<\/span><span class=\"nv\">@git<\/span><span class=\"p\">.<\/span><span class=\"n\">cryptech<\/span><span class=\"p\">.<\/span><span class=\"k\">is<\/span><span class=\"err\">:<\/span><span class=\"n\">core<\/span><span class=\"o\">\/<\/span><span class=\"n\">uart<\/span><span class=\"p\">.<\/span><span class=\"n\">git<\/span>\n<span class=\"err\">#<\/span><span class=\"o\">&gt;<\/span><span class=\"w\"> <\/span><span class=\"n\">git<\/span><span class=\"w\"> <\/span><span class=\"n\">clone<\/span><span class=\"w\"> <\/span><span class=\"n\">git<\/span><span class=\"nv\">@git<\/span><span class=\"p\">.<\/span><span class=\"n\">cryptech<\/span><span class=\"p\">.<\/span><span class=\"k\">is<\/span><span class=\"err\">:<\/span><span class=\"n\">core<\/span><span class=\"o\">\/<\/span><span class=\"n\">coretest<\/span><span class=\"p\">.<\/span><span class=\"n\">git<\/span>\n<span class=\"err\">#<\/span><span class=\"o\">&gt;<\/span><span class=\"w\"> <\/span><span class=\"n\">git<\/span><span class=\"w\"> <\/span><span class=\"n\">clone<\/span><span class=\"w\"> <\/span><span class=\"n\">git<\/span><span class=\"nv\">@git<\/span><span class=\"p\">.<\/span><span class=\"n\">cryptech<\/span><span class=\"p\">.<\/span><span class=\"k\">is<\/span><span class=\"err\">:<\/span><span class=\"n\">core<\/span><span class=\"o\">\/<\/span><span class=\"n\">coretest_hashes<\/span><span class=\"p\">.<\/span><span class=\"n\">git<\/span>\n<\/code><\/pre><\/div>\n\n<p>We should now have a cores directory like this:<\/p>\n<div class=\"highlight\"><pre><span><\/span><code><span class=\"gh\">#<\/span>&gt; ls\ncoretest\/  coretest_hashes\/  sha1\/  sha256\/  uart\/\n<\/code><\/pre><\/div>\n\n<p>In each of these cores there are RTL and testbenches needed to simulate\nand build each of them. For example the sha1 core contains:<\/p>\n<div class=\"highlight\"><pre><span><\/span><code><span class=\"c1\">#&gt; cd sha1<\/span>\n<span class=\"c1\">#&gt; ls<\/span>\n<span class=\"n\">LICENSE<\/span><span class=\"o\">.<\/span><span class=\"n\">txt<\/span><span class=\"w\">  <\/span><span class=\"n\">README<\/span><span class=\"o\">.<\/span><span class=\"n\">md<\/span><span class=\"w\">  <\/span><span class=\"n\">src<\/span><span class=\"o\">\/<\/span><span class=\"w\">  <\/span><span class=\"n\">toolruns<\/span><span class=\"o\">\/<\/span>\n<\/code><\/pre><\/div>\n\n<p>The sha1 RTL source is in src\/rtl. Lets take a look:<\/p>\n<div class=\"highlight\"><pre><span><\/span><code><span class=\"gh\">#<\/span>&gt; cd src\/rtl\n<span class=\"gh\">#<\/span>&gt; ls\nsha1.v  sha1_core.v  sha1_w_mem.v\n<\/code><\/pre><\/div>\n\n<p>These files are:<\/p>\n<ul>\n<li>\n<p><code>sha1.v<\/code>: A top level wrapper that provides an interface to the core. In\n  this case a 32-bit memory like interface.<\/p>\n<\/li>\n<li>\n<p><code>sha1_core.v<\/code>: The actual SHA-1 hash function core.<\/p>\n<\/li>\n<li>\n<p><code>sha1_w_mem.v<\/code>: The W memory including sliding window functionality used\n  by the core.<\/p>\n<\/li>\n<\/ul>\n<p>The other cores follows a similar pattern with a top level wrapper named\n<code>&lt;core_name&gt;.v<\/code>, the main functionality in <code>&lt;core_name&gt;_core.v<\/code> and then one\nor more submodules.<\/p>\n<h2>Creating the project in Quartus<\/h2>\n<ul>\n<li>\n<p>Start Quartus and select file\/new... and select New Quartus II\n  Project.<\/p>\n<\/li>\n<li>\n<p>Select destination directory to be toolruns\/ in your project\n  directory.<\/p>\n<\/li>\n<li>\n<p>Set<code>'coretest_hashes<\/code> as name of the project<\/p>\n<\/li>\n<li>\n<p>Set <code>coretest_hashes<\/code> as nem of the top level design entity. (Should be\n  done automatically when entering the name of the project.)<\/p>\n<\/li>\n<li>\n<p>Press next.<\/p>\n<\/li>\n<li>\n<p>You should now be on the 'Add Files' page. Press '...'.<\/p>\n<\/li>\n<li>\n<p>Navigate to <code>test_coretest_hashes\/cores\/coretest\/src\/rtl<\/code>.<\/p>\n<\/li>\n<li>\n<p>Select coretest and press 'Open'. (Note: Quartus seems to sometimes omit the .v suffix\n  for the files depending on Windows\/OS version.)<\/p>\n<\/li>\n<li>\n<p>Back on the 'Add Files' page. Press Add to actually add coretest to\n  the project.<\/p>\n<\/li>\n<li>\n<p>Press '...' again and navigate to the rtl directory in\n  <code>coretest_hashes<\/code>. Add it like you did with coretest.<\/p>\n<\/li>\n<li>\n<p>Navigate to <code>test_coretest_hashes\/cores\/sha1\/src\/rtl<\/code> and add the files <code>sha1<\/code>, <code>sha1_core<\/code>,\n  <code>sha1_w_mem<\/code>. This time you don't need to press 'Add' on the 'Add\n  Files'. It is done automatically when adding more than one file at a\n  time.<\/p>\n<\/li>\n<li>\n<p>Navigate to <code>test_coretest_hashes\/cores\/sha256\/src\/rtl<\/code> and add the files <code>sha256<\/code>, <code>sha256_core<\/code>,\n  <code>sha256_k_constants<\/code>, <code>sha256_w_mem<\/code>. Do <strong>NOT<\/strong> add the file <code>wb_sha256<\/code>. This file contains an alternative top level wrapper to the one in <code>sha256.v<\/code> that instead provides a <a href=\"http:\/\/opencores.org\/opencores,wishbone\">WISHBONE<\/a> interface. This interface is not used in the <code>coretest_hashes<\/code> design.<\/p>\n<\/li>\n<li>\n<p>Finally navigate to <code>test_coretest_hashes\/cores\/uart\/src\/rtl<\/code> and add <code>uart<\/code>, <code>uart_core<\/code>.<\/p>\n<\/li>\n<\/ul>\n<p>Back on the 'Add Files page you should now see a list of source files:<\/p>\n<div class=\"highlight\"><pre><span><\/span><code><span class=\"c\">..\/cores\/uart\/src\/rtl\/uart_core.v<\/span>\n<span class=\"c\">..\/cores\/uart\/src\/rtl\/uart.v<\/span>\n<span class=\"c\">..\/cores\/sha256\/src\/rtl\/sha256_w_mem.v<\/span>\n<span class=\"c\">..\/cores\/sha256\/src\/rtl\/sha256_k_constants.v<\/span>\n<span class=\"c\">..\/cores\/sha256\/src\/rtl\/sha256_core.v<\/span>\n<span class=\"c\">..\/cores\/sha256\/src\/rtl\/sha256.v<\/span>\n<span class=\"c\">..\/cores\/sha1\/src\/rtl\/sha1_w_mem.v<\/span>\n<span class=\"c\">..\/cores\/sha1\/src\/rtl\/sha1_core.v<\/span>\n<span class=\"c\">..\/cores\/sha1\/src\/rtl\/sha1.v<\/span>\n<span class=\"c\">..\/cores\/coretest_hashes\/src\/rtl\/coretest_hashes.v<\/span>\n<span class=\"c\">..\/cores\/coretest\/src\/rtl\/coretest.v<\/span>\n<\/code><\/pre><\/div>\n\n<p>Press 'Next' to get to the 'Family &amp; Device Settings' page.<\/p>\n<ul>\n<li>\n<p>In 'Device Family', 'Family' list select 'Cyclone V (E\/GX\/GT\/SX\/SE\/ST)'.<\/p>\n<\/li>\n<li>\n<p>In 'Device Family', 'Devices' list select 'Cyclone V GX Extended Features'<\/p>\n<\/li>\n<li>\n<p>In the 'Available Devices' list select: 5CGXFC5C6F27C7.<\/p>\n<\/li>\n<\/ul>\n<p>Press 'Finish'.<\/p>\n<h2>Setting up and building the FPGA design<\/h2>\n<p>You should now be in the main Quartus II window. In the project\nnavigator you can see all files, open the source files etc.<\/p>\n<p>You could now just press 'Start Compilation' button in the menue row\n(the purple play\/triangle button.) This will build the complete\nsubsystem for the type of device selected. But the generated FPGA configuration image will not map to the correct pins on the C5G board. But this build should go through without errors or warnings related to problems in the source files. It is therefore a good test to see that all files has been included.<\/p>\n<p>The result from this generic build should be a FPGA configuration that\nuses 3666 registers, 2846 ALMs, 12 pins and can run at 88.3 MHz in worst\ncase temperature and timing.<\/p>\n<p>You now need to define the correct pins and define the clock to allow\nQuartus to create a FPGA configuration for our board.<\/p>\n<p>All pins needed are described in the C5G manual. To save time there is\nalso a pin list available in the <code>coretest_hashes<\/code> directory.<\/p>\n<ul>\n<li>\n<p>Navigate to <code>test_coretest_hashes\/cores\/coretest_hashes\/toolruns\/quartus\/terasic_c5g<\/code><\/p>\n<\/li>\n<li>\n<p>The file <code>coretest_hashes.qsf<\/code> contains assignments for a project like\n  the one we are setting up. It contains the pin assignments. The\n  follwing list is a slightly cleaned up version of the pin assignments:<\/p>\n<\/li>\n<\/ul>\n<div class=\"highlight\"><pre><span><\/span><code><span class=\"n\">set_location_assignment<\/span><span class=\"w\"> <\/span><span class=\"n\">PIN_R20<\/span><span class=\"w\"> <\/span><span class=\"o\">-<\/span><span class=\"n\">to<\/span><span class=\"w\"> <\/span><span class=\"n\">clk<\/span>\n<span class=\"n\">set_location_assignment<\/span><span class=\"w\"> <\/span><span class=\"n\">PIN_P11<\/span><span class=\"w\"> <\/span><span class=\"o\">-<\/span><span class=\"n\">to<\/span><span class=\"w\"> <\/span><span class=\"n\">reset_n<\/span>\n<span class=\"n\">set_location_assignment<\/span><span class=\"w\"> <\/span><span class=\"n\">PIN_M9<\/span><span class=\"w\"> <\/span><span class=\"o\">-<\/span><span class=\"n\">to<\/span><span class=\"w\"> <\/span><span class=\"n\">rxd<\/span>\n<span class=\"n\">set_location_assignment<\/span><span class=\"w\"> <\/span><span class=\"n\">PIN_L9<\/span><span class=\"w\"> <\/span><span class=\"o\">-<\/span><span class=\"n\">to<\/span><span class=\"w\"> <\/span><span class=\"n\">txd<\/span>\n<span class=\"n\">set_location_assignment<\/span><span class=\"w\"> <\/span><span class=\"n\">PIN_L7<\/span><span class=\"w\"> <\/span><span class=\"o\">-<\/span><span class=\"n\">to<\/span><span class=\"w\"> <\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"mh\">0<\/span><span class=\"p\">]<\/span>\n<span class=\"n\">set_location_assignment<\/span><span class=\"w\"> <\/span><span class=\"n\">PIN_K6<\/span><span class=\"w\"> <\/span><span class=\"o\">-<\/span><span class=\"n\">to<\/span><span class=\"w\"> <\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"mh\">1<\/span><span class=\"p\">]<\/span>\n<span class=\"n\">set_location_assignment<\/span><span class=\"w\"> <\/span><span class=\"n\">PIN_D8<\/span><span class=\"w\"> <\/span><span class=\"o\">-<\/span><span class=\"n\">to<\/span><span class=\"w\"> <\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"mh\">2<\/span><span class=\"p\">]<\/span>\n<span class=\"n\">set_location_assignment<\/span><span class=\"w\"> <\/span><span class=\"n\">PIN_E9<\/span><span class=\"w\"> <\/span><span class=\"o\">-<\/span><span class=\"n\">to<\/span><span class=\"w\"> <\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"mh\">3<\/span><span class=\"p\">]<\/span>\n<span class=\"n\">set_location_assignment<\/span><span class=\"w\"> <\/span><span class=\"n\">PIN_A5<\/span><span class=\"w\"> <\/span><span class=\"o\">-<\/span><span class=\"n\">to<\/span><span class=\"w\"> <\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"mh\">4<\/span><span class=\"p\">]<\/span>\n<span class=\"n\">set_location_assignment<\/span><span class=\"w\"> <\/span><span class=\"n\">PIN_B6<\/span><span class=\"w\"> <\/span><span class=\"o\">-<\/span><span class=\"n\">to<\/span><span class=\"w\"> <\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"mh\">5<\/span><span class=\"p\">]<\/span>\n<span class=\"n\">set_location_assignment<\/span><span class=\"w\"> <\/span><span class=\"n\">PIN_H8<\/span><span class=\"w\"> <\/span><span class=\"o\">-<\/span><span class=\"n\">to<\/span><span class=\"w\"> <\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"mh\">6<\/span><span class=\"p\">]<\/span>\n<span class=\"n\">set_location_assignment<\/span><span class=\"w\"> <\/span><span class=\"n\">PIN_H9<\/span><span class=\"w\"> <\/span><span class=\"o\">-<\/span><span class=\"n\">to<\/span><span class=\"w\"> <\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"mh\">7<\/span><span class=\"p\">]<\/span>\n<span class=\"n\">set_instance_assignment<\/span><span class=\"w\"> <\/span><span class=\"o\">-<\/span><span class=\"n\">name<\/span><span class=\"w\"> <\/span><span class=\"n\">IO_STANDARD<\/span><span class=\"w\"> <\/span><span class=\"s\">&quot;3.3-V LVTTL&quot;<\/span><span class=\"w\"> <\/span><span class=\"o\">-<\/span><span class=\"n\">to<\/span><span class=\"w\"> <\/span><span class=\"n\">clk<\/span>\n<span class=\"n\">set_instance_assignment<\/span><span class=\"w\"> <\/span><span class=\"o\">-<\/span><span class=\"n\">name<\/span><span class=\"w\"> <\/span><span class=\"n\">IO_STANDARD<\/span><span class=\"w\"> <\/span><span class=\"s\">&quot;1.2 V&quot;<\/span><span class=\"w\"> <\/span><span class=\"o\">-<\/span><span class=\"n\">to<\/span><span class=\"w\"> <\/span><span class=\"n\">reset_n<\/span>\n<span class=\"n\">set_instance_assignment<\/span><span class=\"w\"> <\/span><span class=\"o\">-<\/span><span class=\"n\">name<\/span><span class=\"w\"> <\/span><span class=\"n\">IO_STANDARD<\/span><span class=\"w\"> <\/span><span class=\"s\">&quot;2.5 V&quot;<\/span><span class=\"w\"> <\/span><span class=\"o\">-<\/span><span class=\"n\">to<\/span><span class=\"w\"> <\/span><span class=\"n\">txd<\/span>\n<span class=\"n\">set_instance_assignment<\/span><span class=\"w\"> <\/span><span class=\"o\">-<\/span><span class=\"n\">name<\/span><span class=\"w\"> <\/span><span class=\"n\">IO_STANDARD<\/span><span class=\"w\"> <\/span><span class=\"s\">&quot;2.5 V&quot;<\/span><span class=\"w\"> <\/span><span class=\"o\">-<\/span><span class=\"n\">to<\/span><span class=\"w\"> <\/span><span class=\"n\">rxd<\/span>\n<span class=\"n\">set_instance_assignment<\/span><span class=\"w\"> <\/span><span class=\"o\">-<\/span><span class=\"n\">name<\/span><span class=\"w\"> <\/span><span class=\"n\">IO_STANDARD<\/span><span class=\"w\"> <\/span><span class=\"s\">&quot;2.5 V&quot;<\/span><span class=\"w\"> <\/span><span class=\"o\">-<\/span><span class=\"n\">to<\/span><span class=\"w\"> <\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"mh\">0<\/span><span class=\"p\">]<\/span>\n<span class=\"n\">set_instance_assignment<\/span><span class=\"w\"> <\/span><span class=\"o\">-<\/span><span class=\"n\">name<\/span><span class=\"w\"> <\/span><span class=\"n\">IO_STANDARD<\/span><span class=\"w\"> <\/span><span class=\"s\">&quot;2.5 V&quot;<\/span><span class=\"w\"> <\/span><span class=\"o\">-<\/span><span class=\"n\">to<\/span><span class=\"w\"> <\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"mh\">1<\/span><span class=\"p\">]<\/span>\n<span class=\"n\">set_instance_assignment<\/span><span class=\"w\"> <\/span><span class=\"o\">-<\/span><span class=\"n\">name<\/span><span class=\"w\"> <\/span><span class=\"n\">IO_STANDARD<\/span><span class=\"w\"> <\/span><span class=\"s\">&quot;2.5 V&quot;<\/span><span class=\"w\"> <\/span><span class=\"o\">-<\/span><span class=\"n\">to<\/span><span class=\"w\"> <\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"mh\">2<\/span><span class=\"p\">]<\/span>\n<span class=\"n\">set_instance_assignment<\/span><span class=\"w\"> <\/span><span class=\"o\">-<\/span><span class=\"n\">name<\/span><span class=\"w\"> <\/span><span class=\"n\">IO_STANDARD<\/span><span class=\"w\"> <\/span><span class=\"s\">&quot;2.5 V&quot;<\/span><span class=\"w\"> <\/span><span class=\"o\">-<\/span><span class=\"n\">to<\/span><span class=\"w\"> <\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"mh\">3<\/span><span class=\"p\">]<\/span>\n<span class=\"n\">set_instance_assignment<\/span><span class=\"w\"> <\/span><span class=\"o\">-<\/span><span class=\"n\">name<\/span><span class=\"w\"> <\/span><span class=\"n\">IO_STANDARD<\/span><span class=\"w\"> <\/span><span class=\"s\">&quot;2.5 V&quot;<\/span><span class=\"w\"> <\/span><span class=\"o\">-<\/span><span class=\"n\">to<\/span><span class=\"w\"> <\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"mh\">4<\/span><span class=\"p\">]<\/span>\n<span class=\"n\">set_instance_assignment<\/span><span class=\"w\"> <\/span><span class=\"o\">-<\/span><span class=\"n\">name<\/span><span class=\"w\"> <\/span><span class=\"n\">IO_STANDARD<\/span><span class=\"w\"> <\/span><span class=\"s\">&quot;2.5 V&quot;<\/span><span class=\"w\"> <\/span><span class=\"o\">-<\/span><span class=\"n\">to<\/span><span class=\"w\"> <\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"mh\">5<\/span><span class=\"p\">]<\/span>\n<span class=\"n\">set_instance_assignment<\/span><span class=\"w\"> <\/span><span class=\"o\">-<\/span><span class=\"n\">name<\/span><span class=\"w\"> <\/span><span class=\"n\">IO_STANDARD<\/span><span class=\"w\"> <\/span><span class=\"s\">&quot;2.5 V&quot;<\/span><span class=\"w\"> <\/span><span class=\"o\">-<\/span><span class=\"n\">to<\/span><span class=\"w\"> <\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"mh\">6<\/span><span class=\"p\">]<\/span>\n<span class=\"n\">set_instance_assignment<\/span><span class=\"w\"> <\/span><span class=\"o\">-<\/span><span class=\"n\">name<\/span><span class=\"w\"> <\/span><span class=\"n\">IO_STANDARD<\/span><span class=\"w\"> <\/span><span class=\"s\">&quot;2.5 V&quot;<\/span><span class=\"w\"> <\/span><span class=\"o\">-<\/span><span class=\"n\">to<\/span><span class=\"w\"> <\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"mh\">7<\/span><span class=\"p\">]<\/span>\n<\/code><\/pre><\/div>\n\n<p>As you can see, for each pin we want to use we need to define the actual\npin in the FPGA (<code>PIN_R20<\/code> for example) and the I\/O standard the pin\nshould use\/support.<\/p>\n<p>In this design I've mapped the reset signal to the button 'KEY0' on the\nboard which you can find in the lower right corner. There is also a\ndebug port that in the <code>coretest_hashes<\/code> design is connected to the debug\nport in the uart. This allows us to see byte values received by the\nuart. This debug port is connected to pins that control the green LEDs\njust above the row of buttons that includes 'KEY0'.<\/p>\n<p>In order to enter the pin assignments select 'Assignments' in the\nQuartus top level menue bar. The select 'Assignment Editor'. Then either\nmanually enter each of the assignments above. This will require two rows\nfor each pin. For example for the clock ('clk') we would enter:<\/p>\n<ul>\n<li>Row 1: 'To': clk, 'Assignment name': Location, 'Value': <code>PIN_R20<\/code><\/li>\n<li>Row 2: 'To': clk, 'Assignment name': I\/O Standard, 'Value': 3.3-V LVTTL<\/li>\n<\/ul>\n<p>An easier way is to open up the file <code>coretest_hashes.qsf<\/code> in <code>test_coretest_hashes\/cores\/coretest_hashes\/toolruns\/quartus\/terasic_c5g<\/code> and add the pin assignment from that file to your qsf file in <code>test_coretest_hashes\/toolruns<\/code>. If you then open up the Assignments Editor the same definitions should be shown.<\/p>\n<p>We now need to define the clock. Under 'Assignments' in the top level\nmenue select 'TimeQuest Timing Analyzer Wizard'. Press 'Next' to get\nfrom the 'Intro' page.<\/p>\n<p>Under 'Specify base clock settings' enter 'clk' as 'Clock Name' and\n'Input Pin'. Enter '20' in 'Period' and note that 'ns' is selected as\ntime scale. In the 'Equivalent SDC Commands' you should see:<\/p>\n<div class=\"highlight\"><pre><span><\/span><code>  create_clock -name &quot;clk&quot; -period 20.000ns [get_ports {clk}]\n<\/code><\/pre><\/div>\n\n<p>Now press 'Next' four times to get to the final page and then press\n'Finish' to complete the clock setup. If we now look in the\n<code>test_coretest_hashes\/toolruns<\/code> directory there should be a file called\n<code>coretest_hashes.sdc<\/code> that contains the SDC command above.<\/p>\n<p>Now we are ready to build the real FPGA configuration. Press the purple\n'Start Compilation' button again. After build we should now have an FPGA\nconfiguration that requires 2852 ALMs, 3666 registers, 12 pins and meets\ntiming. The max clock frequency for the design should be about 72 MHz.<\/p>\n<p>Time to load the design onto the board.<\/p>\n<h2>Configuring the FPGA on the C5G board<\/h2>\n<p>If you haven't turned on the C5G board and connected the board to the\ncomputer Quartus is installed on, do so now. You should see the\n7-segment displays and LEDs start flashing in a simple sequence. This\nshows that the default configuration in the FPGA has been loaded and the\nboard works.<\/p>\n<p>In Quartus now locate the 'Programmer' menue button (it looks like a\nchip with waves). Alternatively Select 'Tools' in the top level Menue\nand then 'Programmer'.<\/p>\n<p>In the Programmer window if everything is working magically we should\nsee a list view with <code>toolruns\/output_files\/coretest_hashes.sof<\/code>\nselected. And below this list a graphic that shows a 'TDI' arrow\npointing to an Altera 5CGXFC5C6F27C7 device with a 'TDO' going out from\nthe device.<\/p>\n<p>If the graphic is not showing (probably), you need to press 'Hardware\nSetup'. In the Window you should see 'USB-blaster'. If not you need to\nfix the drivers for the USB-blaster in your OS. If the USB-blaster is\npresent make sure it is selected and then press 'Close'.<\/p>\n<p>If the file is not showing, in the main Programmer window, select 'Add\nFile' and navigate and to <code>toolruns\/output_files<\/code> in the <code>project<\/code>\ndirectory. Select <code>coretest_hashes.sof<\/code> and press 'Open'.<\/p>\n<p>In the main Programmer window now press 'Start' to start\nprogramming. When this has been completed (See 'Progress' in the upper\nright hand corner in the Programmer board) the LEDs etc should have\nstopped blinking. We should now have <code>coretest_hashes<\/code> alive on the\ndevelopment board. Time for host communication and testing!<\/p>\n<h2>Talking to <code>coretest_hashes<\/code> and test of SHA-1 and SHA-256<\/h2>\n<p>There is a (currently rather ugly) test program for\n<code>coretest_hashes<\/code>. Navigate to <code>test_coretest_hashes\/cores\/coretest_hashes\/src\/sw<\/code><\/p>\n<div class=\"highlight\"><pre><span><\/span><code><span class=\"gh\">#<\/span>&gt; ls\nhash_tester.py\n<\/code><\/pre><\/div>\n\n<p>This is a Python2.x program that uses Pyserial <a href=\"http:\/\/pyserial.sourceforge.net\/\">5<\/a> to open up a serial\nport and talk to coretest via the uart. The command and response format\nused is a very simple byte oriented format. For more info, see the\nREADME.md in <a href=\"https:\/\/git.cryptech.is\/core\/coretest\">the top of coretest<\/a>.<\/p>\n<p>The program <code>hash_tester.py<\/code> needs to know which serial interface to\nuse. This is defined in the main() function (yes, VERY ugly). You will\nneed to edit the program source to point to the serial interface\nconnected to the USB-serial chip on the C5G board. For me that device\nis:<\/p>\n<div class=\"highlight\"><pre><span><\/span><code>  ser.port=&#39;\/dev\/cu.usbserial-A801SA6T&#39;\n<\/code><\/pre><\/div>\n\n<p>If everthing is working properly you should now just have to do:<\/p>\n<div class=\"highlight\"><pre><span><\/span><code>  python hash_tester.py\n<\/code><\/pre><\/div>\n\n<p>If the communication has been set up properly you should now see:<\/p>\n<div class=\"highlight\"><pre><span><\/span><code><span class=\"w\">  <\/span><span class=\"nx\">TC1<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"nx\">Reading<\/span><span class=\"w\"> <\/span><span class=\"nx\">name<\/span><span class=\"p\">,<\/span><span class=\"w\"> <\/span><span class=\"k\">type<\/span><span class=\"w\"> <\/span><span class=\"k\">and<\/span><span class=\"w\"> <\/span><span class=\"nx\">version<\/span><span class=\"w\"> <\/span><span class=\"nx\">words<\/span><span class=\"w\"> <\/span><span class=\"nx\">from<\/span><span class=\"w\"> <\/span><span class=\"nx\">SHA<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"w\"> <\/span><span class=\"nx\">core<\/span><span class=\"p\">.<\/span>\n<span class=\"w\">  <\/span><span class=\"nx\">READ_OK<\/span><span class=\"p\">.<\/span><span class=\"w\"> <\/span><span class=\"nx\">address<\/span><span class=\"w\"> <\/span><span class=\"mh\">0x1000<\/span><span class=\"w\"> <\/span><span class=\"p\">=<\/span><span class=\"w\"> <\/span><span class=\"mh\">0x73686131<\/span><span class=\"p\">.<\/span>\n<span class=\"w\">  <\/span><span class=\"nx\">READ_OK<\/span><span class=\"p\">.<\/span><span class=\"w\"> <\/span><span class=\"nx\">address<\/span><span class=\"w\"> <\/span><span class=\"mh\">0x1001<\/span><span class=\"w\"> <\/span><span class=\"p\">=<\/span><span class=\"w\"> <\/span><span class=\"mh\">0x20202020<\/span><span class=\"p\">.<\/span>\n<span class=\"w\">  <\/span><span class=\"nx\">READ_OK<\/span><span class=\"p\">.<\/span><span class=\"w\"> <\/span><span class=\"nx\">address<\/span><span class=\"w\"> <\/span><span class=\"mh\">0x1002<\/span><span class=\"w\"> <\/span><span class=\"p\">=<\/span><span class=\"w\"> <\/span><span class=\"mh\">0x302e3530<\/span><span class=\"p\">.<\/span>\n<span class=\"w\">  <\/span><span class=\"o\">...<\/span>\n<\/code><\/pre><\/div>\n\n<p>That is the first test case that reads from specific registers in the\nSHA-1 core. If we look in <code>sha1\/src\/rtl\/sha1.v<\/code> there are some defines:<\/p>\n<div class=\"highlight\"><pre><span><\/span><code>  parameter CORE_NAME0     = 32&#39;h73686131; \/\/ &quot;sha1&quot;\n  parameter CORE_NAME1     = 32&#39;h20202020; \/\/ &quot;    &quot;\n  parameter CORE_VERSION   = 32&#39;h302e3530; \/\/ &quot;0.50&quot;\n<\/code><\/pre><\/div>\n\n<p>As we can see those hex values matches what is being read from the FPGA\nand is the name and version strings in the core.<\/p>\n<p>Moving on, <code>hash_tester.py<\/code> also performs single block message hash tests\nof both the SHA-1 and SHA-256 core. The message is \"abc\" padded to the\ncorrect block size for SHA-1 and SHA-256. These tests are defined by\nNIST including the expected result in <a href=\"http:\/\/csrc.nist.gov\/groups\/ST\/toolkit\/documents\/Examples\/SHA_All.pdf\">6<\/a>. The block is written as a\nsequence of 32-bit words to addresses mapped to the block registers in\nthe sha1 core.<\/p>\n<p>Finally we set the <code>init_flag<\/code> in the control register in\nsha1 to one which should make the sha1 core initialize and then process\nthe first (of possible several) message block. This takes in total 82\ncycles for the core. This means that by the time the host gets the\n<code>WRITE_OK. address 0x1008.<\/code> message, the core is done since many cycles\nago. We therefore check status and try to extract the digest.<\/p>\n<p>Looking at the output from <code>hash_tester.py<\/code> we see:<\/p>\n<div class=\"highlight\"><pre><span><\/span><code><span class=\"w\">  <\/span><span class=\"nx\">TC1<\/span><span class=\"o\">-<\/span><span class=\"mi\">3<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"nx\">Reading<\/span><span class=\"w\"> <\/span><span class=\"nx\">SHA<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"w\"> <\/span><span class=\"nx\">status<\/span><span class=\"w\"> <\/span><span class=\"k\">and<\/span><span class=\"w\"> <\/span><span class=\"nx\">digest<\/span><span class=\"p\">.<\/span>\n<span class=\"w\">  <\/span><span class=\"nx\">READ_OK<\/span><span class=\"p\">.<\/span><span class=\"w\"> <\/span><span class=\"nx\">address<\/span><span class=\"w\"> <\/span><span class=\"mh\">0x1009<\/span><span class=\"w\"> <\/span><span class=\"p\">=<\/span><span class=\"w\"> <\/span><span class=\"mh\">0x00000003<\/span><span class=\"p\">.<\/span>\n<span class=\"w\">  <\/span><span class=\"nx\">READ_OK<\/span><span class=\"p\">.<\/span><span class=\"w\"> <\/span><span class=\"nx\">address<\/span><span class=\"w\"> <\/span><span class=\"mh\">0x1020<\/span><span class=\"w\"> <\/span><span class=\"p\">=<\/span><span class=\"w\"> <\/span><span class=\"mh\">0xa9993e36<\/span><span class=\"p\">.<\/span>\n<span class=\"w\">  <\/span><span class=\"nx\">READ_OK<\/span><span class=\"p\">.<\/span><span class=\"w\"> <\/span><span class=\"nx\">address<\/span><span class=\"w\"> <\/span><span class=\"mh\">0x1021<\/span><span class=\"w\"> <\/span><span class=\"p\">=<\/span><span class=\"w\"> <\/span><span class=\"mh\">0x4706816a<\/span><span class=\"p\">.<\/span>\n<span class=\"w\">  <\/span><span class=\"nx\">READ_OK<\/span><span class=\"p\">.<\/span><span class=\"w\"> <\/span><span class=\"nx\">address<\/span><span class=\"w\"> <\/span><span class=\"mh\">0x1022<\/span><span class=\"w\"> <\/span><span class=\"p\">=<\/span><span class=\"w\"> <\/span><span class=\"mh\">0xba3e2571<\/span><span class=\"p\">.<\/span>\n<span class=\"w\">  <\/span><span class=\"nx\">READ_OK<\/span><span class=\"p\">.<\/span><span class=\"w\"> <\/span><span class=\"nx\">address<\/span><span class=\"w\"> <\/span><span class=\"mh\">0x1023<\/span><span class=\"w\"> <\/span><span class=\"p\">=<\/span><span class=\"w\"> <\/span><span class=\"mh\">0x7850c26c<\/span><span class=\"p\">.<\/span>\n<span class=\"w\">  <\/span><span class=\"nx\">READ_OK<\/span><span class=\"p\">.<\/span><span class=\"w\"> <\/span><span class=\"nx\">address<\/span><span class=\"w\"> <\/span><span class=\"mh\">0x1024<\/span><span class=\"w\"> <\/span><span class=\"p\">=<\/span><span class=\"w\"> <\/span><span class=\"mh\">0x9cd0d89d<\/span><span class=\"p\">.<\/span>\n<\/code><\/pre><\/div>\n\n<p>Address 0x1009 corresponds to address 0x09 in the SHA-1 core. This\naddress contains the status of the core. 0x03 means that the data in the\ndigest is valid and that the core is ready to accept now commnands.<\/p>\n<p>The digest generated by the sha1 core is in MSB format which means that\nthe digest generated is:<\/p>\n<div class=\"highlight\"><pre><span><\/span><code>  0xa9993e36 0x4706816a 0xba3e2571 0x7850c26c 0x9cd0d89d\n<\/code><\/pre><\/div>\n\n<p>If we compare that to the expected result in <a href=\"http:\/\/csrc.nist.gov\/groups\/ST\/toolkit\/documents\/Examples\/SHA_All.pdf\">6<\/a> we can see that this is\ncorrect. Similarly, for SHA-256 we get:<\/p>\n<div class=\"highlight\"><pre><span><\/span><code><span class=\"w\">  <\/span><span class=\"nx\">TC2<\/span><span class=\"o\">-<\/span><span class=\"mi\">3<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"nx\">Reading<\/span><span class=\"w\"> <\/span><span class=\"nx\">SHA<\/span><span class=\"o\">-<\/span><span class=\"mi\">256<\/span><span class=\"w\"> <\/span><span class=\"nx\">status<\/span><span class=\"w\"> <\/span><span class=\"k\">and<\/span><span class=\"w\"> <\/span><span class=\"nx\">digest<\/span><span class=\"p\">.<\/span>\n<span class=\"w\">  <\/span><span class=\"nx\">READ_OK<\/span><span class=\"p\">.<\/span><span class=\"w\"> <\/span><span class=\"nx\">address<\/span><span class=\"w\"> <\/span><span class=\"mh\">0x2009<\/span><span class=\"w\"> <\/span><span class=\"p\">=<\/span><span class=\"w\"> <\/span><span class=\"mh\">0x00000003<\/span><span class=\"p\">.<\/span>\n<span class=\"w\">  <\/span><span class=\"nx\">READ_OK<\/span><span class=\"p\">.<\/span><span class=\"w\"> <\/span><span class=\"nx\">address<\/span><span class=\"w\"> <\/span><span class=\"mh\">0x2020<\/span><span class=\"w\"> <\/span><span class=\"p\">=<\/span><span class=\"w\"> <\/span><span class=\"mh\">0xba7816bf<\/span><span class=\"p\">.<\/span>\n<span class=\"w\">  <\/span><span class=\"nx\">READ_OK<\/span><span class=\"p\">.<\/span><span class=\"w\"> <\/span><span class=\"nx\">address<\/span><span class=\"w\"> <\/span><span class=\"mh\">0x2021<\/span><span class=\"w\"> <\/span><span class=\"p\">=<\/span><span class=\"w\"> <\/span><span class=\"mh\">0x8f01cfea<\/span><span class=\"p\">.<\/span>\n<span class=\"w\">  <\/span><span class=\"nx\">READ_OK<\/span><span class=\"p\">.<\/span><span class=\"w\"> <\/span><span class=\"nx\">address<\/span><span class=\"w\"> <\/span><span class=\"mh\">0x2022<\/span><span class=\"w\"> <\/span><span class=\"p\">=<\/span><span class=\"w\"> <\/span><span class=\"mh\">0x414140de<\/span><span class=\"p\">.<\/span>\n<span class=\"w\">  <\/span><span class=\"nx\">READ_OK<\/span><span class=\"p\">.<\/span><span class=\"w\"> <\/span><span class=\"nx\">address<\/span><span class=\"w\"> <\/span><span class=\"mh\">0x2023<\/span><span class=\"w\"> <\/span><span class=\"p\">=<\/span><span class=\"w\"> <\/span><span class=\"mh\">0x5dae2223<\/span><span class=\"p\">.<\/span>\n<span class=\"w\">  <\/span><span class=\"nx\">READ_OK<\/span><span class=\"p\">.<\/span><span class=\"w\"> <\/span><span class=\"nx\">address<\/span><span class=\"w\"> <\/span><span class=\"mh\">0x2024<\/span><span class=\"w\"> <\/span><span class=\"p\">=<\/span><span class=\"w\"> <\/span><span class=\"mh\">0xb00361a3<\/span><span class=\"p\">.<\/span>\n<span class=\"w\">  <\/span><span class=\"nx\">READ_OK<\/span><span class=\"p\">.<\/span><span class=\"w\"> <\/span><span class=\"nx\">address<\/span><span class=\"w\"> <\/span><span class=\"mh\">0x2025<\/span><span class=\"w\"> <\/span><span class=\"p\">=<\/span><span class=\"w\"> <\/span><span class=\"mh\">0x96177a9c<\/span><span class=\"p\">.<\/span>\n<span class=\"w\">  <\/span><span class=\"nx\">READ_OK<\/span><span class=\"p\">.<\/span><span class=\"w\"> <\/span><span class=\"nx\">address<\/span><span class=\"w\"> <\/span><span class=\"mh\">0x2026<\/span><span class=\"w\"> <\/span><span class=\"p\">=<\/span><span class=\"w\"> <\/span><span class=\"mh\">0xb410ff61<\/span><span class=\"p\">.<\/span>\n<span class=\"w\">  <\/span><span class=\"nx\">READ_OK<\/span><span class=\"p\">.<\/span><span class=\"w\"> <\/span><span class=\"nx\">address<\/span><span class=\"w\"> <\/span><span class=\"mh\">0x2027<\/span><span class=\"w\"> <\/span><span class=\"p\">=<\/span><span class=\"w\"> <\/span><span class=\"mh\">0xf20015ad<\/span><span class=\"p\">.<\/span>\n<\/code><\/pre><\/div>\n\n<p>The digest generated is thus:<\/p>\n<div class=\"highlight\"><pre><span><\/span><code>  0xba7816bf 0x8f01cfea 0x414140de 0x5dae2223\n  0xb00361a3 0x96177a9c 0xb410ff61 0xf20015ad\n<\/code><\/pre><\/div>\n\n<p>Which again matches what is specified in <a href=\"http:\/\/csrc.nist.gov\/groups\/ST\/toolkit\/documents\/Examples\/SHA_All.pdf\">6<\/a><\/p>\n<h2>Summary<\/h2>\n<p>We have now set up a complete development and verification environment\nfor Cryptech. We have setup and built the <code>coretest_hashes<\/code> subsystem for\nthe TerasIC C5G board. Finally we have connected to <code>coretest_hashes<\/code> from\nSW in the host and verified that we can write to and receive response\nneeded to perform SHA-1 and SHA-256 hash operations and get correct\ndigest back.<\/p>\n<p>If you have not been able to complete this, please contact me (Joachim Str\u00f6mbergson).<\/p>\n<p>Happy Hashing!<\/p>\n<h2>References<\/h2>\n<ul>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<\/ul>","category":{"@attributes":{"term":"misc"}}},{"title":"DNSSEC","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/DNSSEC","rel":"alternate"}},"published":"2016-12-15T22:43:00+00:00","updated":"2016-12-15T22:43:00+00:00","author":{"name":"Cryptech Core Team"},"id":"tag:wiki.cryptech.is,2016-12-15:\/DNSSEC","content":"<ul>\n<li><a href=\"https:\/\/wiki.cryptech.is\/DNSSEC-Requirements\">DNSSEC Requirements<\/a><\/li>\n<\/ul>","category":{"@attributes":{"term":"DNSSEC"}}},{"title":"dev-bridge board","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/DevBridgeBoard","rel":"alternate"}},"published":"2016-12-15T22:43:00+00:00","updated":"2021-02-14T17:30:00+00:00","author":{"name":"Paul Selkirk"},"id":"tag:wiki.cryptech.is,2016-12-15:\/DevBridgeBoard","summary":"<p>In the process of developing the <a href=\"https:\/\/wiki.cryptech.is\/AlphaBoardComponents\">AlphaBoardComponents<\/a> design, the project has made what is known as the \"dev-bridge board\".<\/p>\n<p>This is a board, 100x70 mm, with about 2\/3 of the components intended to be on the Alpha design. What is missing is basically the FPGA and it's supporting circuits \u2026<\/p>","content":"<p>In the process of developing the <a href=\"https:\/\/wiki.cryptech.is\/AlphaBoardComponents\">AlphaBoardComponents<\/a> design, the project has made what is known as the \"dev-bridge board\".<\/p>\n<p>This is a board, 100x70 mm, with about 2\/3 of the components intended to be on the Alpha design. What is missing is basically the FPGA and it's supporting circuits.<\/p>\n<p>To date, the dev-bridge board has been used to implement and validate the FMC based interface that will be used to connect the ARM and the FPGA on the Alpha.<\/p>\n<p>Schematics and layouts are at <a href=\"https:\/\/wiki.cryptech.is\/browser\/user\/ft\/stm32-dev-bridge\/hardware\/rev01\">user\/ft\/stm32-dev-bridge\/hardware\/rev01<\/a>.<\/p>\n<p>High resolution pictures of rev01 of the dev-bridge board are attached at the bottom of this page, but the following should be more than sufficient to read the silkscreens.<\/p>\n<p><img alt=\"dev-bridge_rev01_front_medium.jpg\" src=\"https:\/\/wiki.cryptech.is\/DevBridgeBoard\/DevBridgeBoard\/dev-bridge_rev01_front_medium.jpg\"><\/p>\n<p><img alt=\"dev-bridge_rev01_back_medium.jpg\" src=\"https:\/\/wiki.cryptech.is\/DevBridgeBoard\/DevBridgeBoard\/dev-bridge_rev01_back_medium.jpg\"><\/p>\n<p>Here is the board mounted on the Novena, attached to the programmer:<\/p>\n<p><img alt=\"IMG_9983s.jpg\" src=\"https:\/\/wiki.cryptech.is\/DevBridgeBoard\/DevBridgeBoard\/IMG_9983s.jpg\"><\/p>\n<p>Note that it's rather bigger than the Netgear enclosure I use to transport the Novena. (Not only does it protect the board, but I have this superstition that TSA is more comfortable with a home gateway than a bare motherboard.)<\/p>\n<p>Also note that the dev-bridge board is connected to the Novena by the\nhigh-speed expansion connector, which forms a bit of a pivot point.\nAs Pavel says, \"High speed and mechanical reliability are not very good\nfriends usually.\"<\/p>\n<p>For that reason, I highly recommend stabilizing the board by bolting it to\nthe Novena with a 5mm spacer. There are two through-holes that line up\nwith mounting holes on the Novena, one at the corner and one next to the\nwifi connector.  I've found that even one bolt is enough to stabilize the\nboard.<\/p>\n<p>Finally note that the board traces come rather close to the through-holes, so\nyou want to avoid scraping them with the bolt head or the nut. I happen to\nbe using a countersink-head bolt, which is beveled toward the shaft, but\nit's probably even better to use a nylon washer.<\/p>\n<p>All the software, as well as flashing instructions, are at <a href=\"https:\/\/git.cryptech.is\/sw\/stm32.md\">sw\/stm32<\/a>.<\/p>","category":{"@attributes":{"term":"misc"}}},{"title":"Presentations and Design Documents","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/Documents","rel":"alternate"}},"published":"2016-12-15T22:43:00+00:00","updated":"2016-12-15T22:43:00+00:00","author":{"name":"Cryptech Core Team"},"id":"tag:wiki.cryptech.is,2016-12-15:\/Documents","content":"<p><a href=\"https:\/\/wiki.cryptech.is\/RandomnessTesting\">Randomness Testing Tools<\/a><br\/><\/p>\n<p><a href=\"https:\/\/wiki.cryptech.is\/AlphaBoardStrategy\">Alpha board strategy<\/a><\/p>\n<p><a href=\"https:\/\/git.cryptech.is\/doc\/design\/tree\/Alpha_board_drawing.pdf\">Alpha board drawing<\/a><\/p>\n<p><a href=\"https:\/\/wiki.cryptech.is\/AlphaBoardPictures\">Alpha board pictures<\/a><\/p>\n<p>Placeholder until somebody fills this in with something else interesting.<\/p>","category":{"@attributes":{"term":"misc"}}},{"title":"EDA Toolchain Survey","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/EDAToolchainSurvey","rel":"alternate"}},"published":"2016-12-15T22:43:00+00:00","updated":"2016-12-15T22:43:00+00:00","author":{"name":"Cryptech Core Team"},"id":"tag:wiki.cryptech.is,2016-12-15:\/EDAToolchainSurvey","summary":"<p>The major issue is finding tools that allows a designer, user to\nverify that the RTL source code (in Verilog or VHDL) matches what is\ngenerated at the physical level. As part of the project we need to\ninvestigate the current status of open tools in the toolchain for\nimplementation \u2026<\/p>","content":"<p>The major issue is finding tools that allows a designer, user to\nverify that the RTL source code (in Verilog or VHDL) matches what is\ngenerated at the physical level. As part of the project we need to\ninvestigate the current status of open tools in the toolchain for\nimplementation and verification of hardware. This includes RTL\nsimulation, synthesis, place &amp; route, netlist verification, timing\nanalysis and configuration file generation and analysis. (This implies\nthat the target is an FPGA.). If there are no open tools we need to\nfind ways of verifying pre- and post-functionality to check that the\nblack box tool does not alter (subvert) the design in ways not\nintended.<\/p>\n<p>The basic action flow is:<\/p>\n<ul>\n<li>Finding open EDA tools and assess their status<\/li>\n<li>Settling for Closed<\/li>\n<li>Strategy to Develop Trust in Tools<\/li>\n<li>Validation Methods for Output<\/li>\n<\/ul>\n<p>Some tools and frameworks worth investigating are:<\/p>\n<ul>\n<li><a href=\"http:\/\/www.optimsoc.org\/index.html\">OpTiMSoC<\/a> - An open System on Chip (SoC) framework built around the OpenRISC CPU.<\/li>\n<li><a href=\"http:\/\/iverilog.icarus.com\/\">Icarus Verilog<\/a> - An open Verilog event driven simulator that supports Verilog 2001, 2005 and SystemVerilog.<\/li>\n<li><a href=\"http:\/\/www.geda-project.org\/\">gEDA<\/a> - A project that aims at developing GNU based EDA tools.<\/li>\n<li><a href=\"http:\/\/www.gpleda.org\/\">gplEDA<\/a> - A collection of GPL licensed EDA tools. Points to gEDA.<\/li>\n<\/ul>","category":{"@attributes":{"term":"misc"}}},{"title":"Cryptech Hardware","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/Hardware","rel":"alternate"}},"published":"2016-12-15T22:43:00+00:00","updated":"2016-12-15T22:43:00+00:00","author":{"name":"Cryptech Core Team"},"id":"tag:wiki.cryptech.is,2016-12-15:\/Hardware","summary":"<h2>Generation 1<\/h2>\n<p>Various generic FPGA development boards.<\/p>\n<h2>Generation 2<\/h2>\n<p>\/\/<a href=\"https:\/\/wiki.cryptech.is\/CoretestHashesNovena\">Novena<\/a>\/\/<\/p>\n<h2>Generation 3<\/h2>\n<p>An Alpha version of a CrypTech HSM, currently in early design<\/p>\n<p><img alt=\"cryptech-g3.png\" src=\"https:\/\/wiki.cryptech.is\/Hardware\/Hardware\/cryptech-g3.png\"><\/p>\n<p>There is no real tamper wrapping and no tamper sensors.  The tamper switch is used to simulate tamper detection to test the system's tamper reaction(s).<\/p>\n<p>For \u2026<\/p>","content":"<h2>Generation 1<\/h2>\n<p>Various generic FPGA development boards.<\/p>\n<h2>Generation 2<\/h2>\n<p>\/\/<a href=\"https:\/\/wiki.cryptech.is\/CoretestHashesNovena\">Novena<\/a>\/\/<\/p>\n<h2>Generation 3<\/h2>\n<p>An Alpha version of a CrypTech HSM, currently in early design<\/p>\n<p><img alt=\"cryptech-g3.png\" src=\"https:\/\/wiki.cryptech.is\/Hardware\/Hardware\/cryptech-g3.png\"><\/p>\n<p>There is no real tamper wrapping and no tamper sensors.  The tamper switch is used to simulate tamper detection to test the system's tamper reaction(s).<\/p>\n<p>For the ARM, we think we want<\/p>\n<ul>\n<li>No or minimal magic blobs because it's inside the security boundary<\/li>\n<li>Support for booting, flash file system, and USB<\/li>\n<li>Do not need memory protection or allocation, threads, video or sound or ...<\/li>\n<li>Some speed, but the crypto is done in the FPGA<\/li>\n<li>All components must be free of any GPL-like virus or restrictions<\/li>\n<\/ul>\n<p><a href=\"https:\/\/wiki.cryptech.is\/AlphaBoardComponents\">The BOM and board requirements for the alpha board<\/a>.<\/p>","category":{"@attributes":{"term":"Hardware"}}},{"title":"DNSSEC signing using OpenDNSSEC and a Cryptech alpha board rev03","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/OpenDNSSEC","rel":"alternate"}},"published":"2016-12-15T22:43:00+00:00","updated":"2017-05-13T21:34:00+00:00","author":{"name":"Rob Austein"},"id":"tag:wiki.cryptech.is,2016-12-15:\/OpenDNSSEC","summary":"<h2>Before you start, you'll need<\/h2>\n<ul>\n<li>A Cryptech Alpha board, preferrably revision \"rev03\"<\/li>\n<li>APT on the host system configured to find packages in the Cryptech\n  repository, see <a href=\"https:\/\/wiki.cryptech.is\/BinaryPackages\">BinaryPackages<\/a> for instructions<\/li>\n<\/ul>\n<div class=\"highlight\"><pre><span><\/span><code>apt-get install cryptech-alpha opendnssec opensc\n<\/code><\/pre><\/div>\n\n<p>Once you have the software package installed, you may need to <a href=\"https:\/\/wiki.cryptech.is\/Upgrading\">upgrade your HSM's firmware<\/a>.<\/p>\n<h2>Configure \u2026<\/h2>","content":"<h2>Before you start, you'll need<\/h2>\n<ul>\n<li>A Cryptech Alpha board, preferrably revision \"rev03\"<\/li>\n<li>APT on the host system configured to find packages in the Cryptech\n  repository, see <a href=\"https:\/\/wiki.cryptech.is\/BinaryPackages\">BinaryPackages<\/a> for instructions<\/li>\n<\/ul>\n<div class=\"highlight\"><pre><span><\/span><code>apt-get install cryptech-alpha opendnssec opensc\n<\/code><\/pre><\/div>\n\n<p>Once you have the software package installed, you may need to <a href=\"https:\/\/wiki.cryptech.is\/Upgrading\">upgrade your HSM's firmware<\/a>.<\/p>\n<h2>Configure the HSM<\/h2>\n<p>For now, connect USB cables to both the DATA and MGMT ports of your HSM and plug them into the host where you will be running OpenDNSSEC.\nIn production use it should not be necessary to leave the MGMT port connected, but it's easier to set up this way, and, as this is still a development platform, this is the configuration that's gotten the most testing.<\/p>\n<div class=\"highlight\"><pre><span><\/span><code><span class=\"gh\">#<\/span> eval $(cryptech_probe)\n<span class=\"gh\">#<\/span> cryptech_muxd &amp;\n<span class=\"gh\">#<\/span> cryptech_console\n\nUsername: wheel\nPassword: YouReallyNeedToChangeThisPINRightNowWeAreNotKidding\n\ncryptech&gt; keystore set pin wheel supersikritnewpw\ncryptech&gt; keystore set pin so 123456\ncryptech&gt; keystore set pin user 1234\n\ncryptech&gt; masterkey set EFBEADDE\n^C\n<\/code><\/pre><\/div>\n\n<p>Leave <code>cryptech_muxd<\/code> running, so that the PKCS #11 library can use it to talk to the HSM.<\/p>\n<h2>Configure OpenDNSSEC<\/h2>\n<div class=\"highlight\"><pre><span><\/span><code><span class=\"n\">mkdir<\/span><span class=\"w\"> <\/span><span class=\"o\">\/<\/span><span class=\"k\">var<\/span><span class=\"o\">\/<\/span><span class=\"n\">lib<\/span><span class=\"o\">\/<\/span><span class=\"n\">opendnssec<\/span><span class=\"o\">\/<\/span><span class=\"n\">cryptech<\/span>\n\n<span class=\"n\">cat<\/span><span class=\"w\"> <\/span><span class=\"o\">&gt;<\/span><span class=\"w\"> <\/span><span class=\"o\">\/<\/span><span class=\"k\">var<\/span><span class=\"o\">\/<\/span><span class=\"n\">lib<\/span><span class=\"o\">\/<\/span><span class=\"n\">opendnssec<\/span><span class=\"o\">\/<\/span><span class=\"n\">unsigned<\/span><span class=\"o\">\/<\/span><span class=\"n\">example<\/span><span class=\"o\">.<\/span><span class=\"n\">com<\/span><span class=\"w\"> <\/span><span class=\"o\">&lt;&lt;<\/span><span class=\"w\"> <\/span><span class=\"n\">EOF<\/span>\n\\<span class=\"o\">$<\/span><span class=\"n\">TTL<\/span><span class=\"w\"> <\/span><span class=\"mi\">600<\/span>\n<span class=\"n\">example<\/span><span class=\"o\">.<\/span><span class=\"n\">com<\/span><span class=\"o\">.<\/span><span class=\"w\">  <\/span><span class=\"n\">IN<\/span><span class=\"w\"> <\/span><span class=\"n\">SOA<\/span><span class=\"w\">  <\/span><span class=\"n\">hidden<\/span><span class=\"o\">-<\/span><span class=\"k\">master<\/span><span class=\"o\">.<\/span><span class=\"n\">example<\/span><span class=\"o\">.<\/span><span class=\"n\">com<\/span><span class=\"o\">.<\/span><span class=\"w\"> <\/span><span class=\"n\">hostmaster<\/span><span class=\"o\">.<\/span><span class=\"n\">example<\/span><span class=\"o\">.<\/span><span class=\"n\">com<\/span><span class=\"o\">.<\/span><span class=\"w\"> <\/span><span class=\"p\">(<\/span>\n<span class=\"w\">                                <\/span><span class=\"mi\">2016041401<\/span><span class=\"w\"> <\/span><span class=\"p\">;<\/span><span class=\"w\"> <\/span><span class=\"n\">serial<\/span>\n<span class=\"w\">                                <\/span><span class=\"mi\">720<\/span><span class=\"w\">        <\/span><span class=\"p\">;<\/span><span class=\"w\"> <\/span><span class=\"mi\">28800<\/span><span class=\"w\">      <\/span><span class=\"p\">;<\/span><span class=\"w\"> <\/span><span class=\"n\">refresh<\/span><span class=\"w\"> <\/span><span class=\"p\">(<\/span><span class=\"mi\">8<\/span><span class=\"w\"> <\/span><span class=\"n\">hours<\/span><span class=\"p\">)<\/span>\n<span class=\"w\">                                <\/span><span class=\"mi\">720<\/span><span class=\"w\">        <\/span><span class=\"p\">;<\/span><span class=\"w\"> <\/span><span class=\"mi\">7200<\/span><span class=\"w\">       <\/span><span class=\"p\">;<\/span><span class=\"w\"> <\/span><span class=\"n\">retry<\/span><span class=\"w\"> <\/span><span class=\"p\">(<\/span><span class=\"mi\">2<\/span><span class=\"w\"> <\/span><span class=\"n\">hours<\/span><span class=\"p\">)<\/span>\n<span class=\"w\">                                <\/span><span class=\"mi\">300<\/span><span class=\"w\">        <\/span><span class=\"p\">;<\/span><span class=\"w\"> <\/span><span class=\"mi\">604800<\/span><span class=\"w\">     <\/span><span class=\"p\">;<\/span><span class=\"w\"> <\/span><span class=\"n\">expire<\/span><span class=\"w\"> <\/span><span class=\"p\">(<\/span><span class=\"mi\">1<\/span><span class=\"w\"> <\/span><span class=\"n\">week<\/span><span class=\"p\">)<\/span>\n<span class=\"w\">                                <\/span><span class=\"mi\">120<\/span><span class=\"w\">        <\/span><span class=\"p\">;<\/span><span class=\"w\"> <\/span><span class=\"mi\">3600<\/span><span class=\"w\">       <\/span><span class=\"p\">;<\/span><span class=\"w\"> <\/span><span class=\"n\">minimum<\/span><span class=\"w\"> <\/span><span class=\"p\">(<\/span><span class=\"mi\">1<\/span><span class=\"w\"> <\/span><span class=\"n\">hour<\/span><span class=\"p\">)<\/span>\n<span class=\"w\">                                <\/span><span class=\"p\">)<\/span>\n\n<span class=\"w\">               <\/span><span class=\"n\">NS<\/span><span class=\"w\">      <\/span><span class=\"n\">lab<\/span><span class=\"o\">.<\/span><span class=\"n\">cryptech<\/span><span class=\"o\">.<\/span><span class=\"k\">is<\/span><span class=\"o\">.<\/span>\n<span class=\"n\">test<\/span><span class=\"w\">           <\/span><span class=\"n\">A<\/span><span class=\"w\">       <\/span><span class=\"mf\">127.0<\/span><span class=\"o\">.<\/span><span class=\"mf\">0.1<\/span>\n<span class=\"n\">EOF<\/span>\n\n<span class=\"n\">chown<\/span><span class=\"w\"> <\/span><span class=\"o\">-<\/span><span class=\"n\">R<\/span><span class=\"w\"> <\/span><span class=\"n\">opendnssec<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"o\">\/<\/span><span class=\"k\">var<\/span><span class=\"o\">\/<\/span><span class=\"n\">lib<\/span><span class=\"o\">\/<\/span><span class=\"n\">opendnssec<\/span><span class=\"o\">\/*<\/span>\n<\/code><\/pre><\/div>\n\n<h2>OpenDNSSEC configuration changes<\/h2>\n<p>\/etc\/opendnssec\/conf.xml:<\/p>\n<div class=\"highlight\"><pre><span><\/span><code><span class=\"nt\">&lt;Repository<\/span><span class=\"w\"> <\/span><span class=\"na\">name=<\/span><span class=\"s\">&quot;Cryptech&quot;<\/span><span class=\"nt\">&gt;<\/span>\n<span class=\"w\">        <\/span><span class=\"nt\">&lt;Module&gt;<\/span>\/usr\/lib\/libcryptech-pkcs11.so<span class=\"nt\">&lt;\/Module&gt;<\/span>\n<span class=\"w\">        <\/span><span class=\"nt\">&lt;TokenLabel&gt;<\/span>Cryptech<span class=\"w\"> <\/span>Token<span class=\"nt\">&lt;\/TokenLabel&gt;<\/span>\n<span class=\"w\">        <\/span><span class=\"nt\">&lt;PIN&gt;<\/span>1234<span class=\"nt\">&lt;\/PIN&gt;<\/span>\n<span class=\"w\">        <\/span><span class=\"nt\">&lt;SkipPublicKey\/&gt;<\/span>\n<span class=\"nt\">&lt;\/Repository&gt;<\/span>\n<\/code><\/pre><\/div>\n\n<p>The PIN is whatever was chosen as PIN for 'user' above.\nThe TokenLabel has to be \"Cryptech Token\", not something you choose.<\/p>\n<p>\/etc\/opendnssec\/kasp.xml:<\/p>\n<div class=\"highlight\"><pre><span><\/span><code>s\/SoftHSM\/Cryptech\/\n<\/code><\/pre><\/div>\n\n<p>\/etc\/opendnssec\/zonelist.xml:<\/p>\n<div class=\"highlight\"><pre><span><\/span><code><span class=\"nt\">&lt;Zone<\/span><span class=\"w\"> <\/span><span class=\"na\">name=<\/span><span class=\"s\">&quot;example.com&quot;<\/span><span class=\"nt\">&gt;<\/span>\n<span class=\"w\">        <\/span><span class=\"nt\">&lt;Policy&gt;<\/span>lab<span class=\"nt\">&lt;\/Policy&gt;<\/span>\n<span class=\"w\">        <\/span><span class=\"nt\">&lt;SignerConfiguration&gt;<\/span>\/var\/lib\/opendnssec\/signconf\/example.com.xml<span class=\"nt\">&lt;\/SignerConfiguration&gt;<\/span>\n<span class=\"w\">        <\/span><span class=\"nt\">&lt;Adapters&gt;<\/span>\n<span class=\"w\">                <\/span><span class=\"nt\">&lt;Input&gt;<\/span>\n<span class=\"w\">                        <\/span><span class=\"nt\">&lt;Adapter<\/span><span class=\"w\"> <\/span><span class=\"na\">type=<\/span><span class=\"s\">&quot;File&quot;<\/span><span class=\"nt\">&gt;<\/span>\/var\/lib\/opendnssec\/unsigned\/example.com<span class=\"nt\">&lt;\/Adapter&gt;<\/span>\n<span class=\"w\">                <\/span><span class=\"nt\">&lt;\/Input&gt;<\/span>\n<span class=\"w\">                <\/span><span class=\"nt\">&lt;Output&gt;<\/span>\n<span class=\"w\">                        <\/span><span class=\"nt\">&lt;Adapter<\/span><span class=\"w\"> <\/span><span class=\"na\">type=<\/span><span class=\"s\">&quot;File&quot;<\/span><span class=\"nt\">&gt;<\/span>\/var\/lib\/opendnssec\/signed\/example.com<span class=\"nt\">&lt;\/Adapter&gt;<\/span>\n<span class=\"w\">                <\/span><span class=\"nt\">&lt;\/Output&gt;<\/span>\n<span class=\"w\">        <\/span><span class=\"nt\">&lt;\/Adapters&gt;<\/span>\n<span class=\"nt\">&lt;\/Zone&gt;<\/span>\n<\/code><\/pre><\/div>\n\n<h2>Initialization and signing<\/h2>\n<p>Make the deamons reload their configuration:<\/p>\n<div class=\"highlight\"><pre><span><\/span><code>    service opendnssec-enforcer restart\n    service opendnssec-signer restart\n<\/code><\/pre><\/div>\n\n<p>Initialize opendnssec:<\/p>\n<div class=\"highlight\"><pre><span><\/span><code>    ods-ksmutil setup\n<\/code><\/pre><\/div>\n\n<p>That should be it!<\/p>\n<p>See \/var\/log\/syslog for output from ods-kaspcheck, ods-enforcerd and ods-signerd.\nSee \/var\/lib\/opendnssec\/signed\/ for a signed example.com zone.<\/p>\n<p>To list keys using ods-ksmutil, accessing the HSM using pkcs11\ndirectly (rather than going through any of the opendnssec daemons),\nexport the environment variables from \/etc\/default\/opendnssec and run\n\"ods-ksmutil keys list --verbose\":<\/p>\n<div class=\"highlight\"><pre><span><\/span><code><span class=\"c1\"># ods-ksmutil keys list --verbose<\/span>\n<span class=\"n\">SQLite<\/span><span class=\"w\"> <\/span><span class=\"n\">database<\/span><span class=\"w\"> <\/span><span class=\"n\">set<\/span><span class=\"w\"> <\/span><span class=\"n\">to<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"o\">\/<\/span><span class=\"k\">var<\/span><span class=\"o\">\/<\/span><span class=\"n\">lib<\/span><span class=\"o\">\/<\/span><span class=\"n\">opendnssec<\/span><span class=\"o\">\/<\/span><span class=\"n\">kasp<\/span><span class=\"o\">.<\/span><span class=\"n\">db<\/span>\n<span class=\"n\">Keys<\/span><span class=\"p\">:<\/span>\n<span class=\"n\">Zone<\/span><span class=\"p\">:<\/span><span class=\"w\">                           <\/span><span class=\"n\">Keytype<\/span><span class=\"p\">:<\/span><span class=\"w\">      <\/span><span class=\"n\">State<\/span><span class=\"p\">:<\/span><span class=\"w\">    <\/span><span class=\"n\">Date<\/span><span class=\"w\"> <\/span><span class=\"n\">of<\/span><span class=\"w\"> <\/span><span class=\"n\">next<\/span><span class=\"w\"> <\/span><span class=\"n\">transition<\/span><span class=\"w\"> <\/span><span class=\"p\">(<\/span><span class=\"n\">to<\/span><span class=\"p\">):<\/span><span class=\"w\">  <\/span><span class=\"n\">Size<\/span><span class=\"p\">:<\/span><span class=\"w\">   <\/span><span class=\"n\">Algorithm<\/span><span class=\"p\">:<\/span><span class=\"w\">  <\/span><span class=\"n\">CKA_ID<\/span><span class=\"p\">:<\/span><span class=\"w\">                           <\/span><span class=\"n\">Repository<\/span><span class=\"p\">:<\/span><span class=\"w\">                       <\/span><span class=\"n\">Keytag<\/span><span class=\"p\">:<\/span>\n<span class=\"n\">example<\/span><span class=\"o\">.<\/span><span class=\"n\">com<\/span><span class=\"w\">                     <\/span><span class=\"n\">KSK<\/span><span class=\"w\">           <\/span><span class=\"n\">ready<\/span><span class=\"w\">     <\/span><span class=\"n\">waiting<\/span><span class=\"w\"> <\/span><span class=\"k\">for<\/span><span class=\"w\"> <\/span><span class=\"n\">ds<\/span><span class=\"o\">-<\/span><span class=\"n\">seen<\/span><span class=\"w\"> <\/span><span class=\"p\">(<\/span><span class=\"n\">active<\/span><span class=\"p\">)<\/span><span class=\"w\">   <\/span><span class=\"mi\">2048<\/span><span class=\"w\">    <\/span><span class=\"mi\">8<\/span><span class=\"w\">           <\/span><span class=\"mi\">7<\/span><span class=\"n\">f9b9329480ebe5dc81054ccb293e261<\/span><span class=\"w\">  <\/span><span class=\"n\">Cryptech<\/span><span class=\"w\">                          <\/span><span class=\"mi\">62642<\/span>\n<span class=\"n\">example<\/span><span class=\"o\">.<\/span><span class=\"n\">com<\/span><span class=\"w\">                     <\/span><span class=\"n\">ZSK<\/span><span class=\"w\">           <\/span><span class=\"n\">active<\/span><span class=\"w\">    <\/span><span class=\"mi\">2016<\/span><span class=\"o\">-<\/span><span class=\"mi\">07<\/span><span class=\"o\">-<\/span><span class=\"mi\">13<\/span><span class=\"w\"> <\/span><span class=\"mi\">19<\/span><span class=\"p\">:<\/span><span class=\"mi\">04<\/span><span class=\"p\">:<\/span><span class=\"mi\">30<\/span><span class=\"w\"> <\/span><span class=\"p\">(<\/span><span class=\"n\">retire<\/span><span class=\"p\">)<\/span><span class=\"w\">   <\/span><span class=\"mi\">1024<\/span><span class=\"w\">    <\/span><span class=\"mi\">8<\/span><span class=\"w\">           <\/span><span class=\"mf\">97e972633613<\/span><span class=\"n\">bd605944a0531ff5399b<\/span><span class=\"w\">  <\/span><span class=\"n\">Cryptech<\/span><span class=\"w\">                          <\/span><span class=\"mi\">56620<\/span>\n<\/code><\/pre><\/div>\n\n<p>If the output for repository is \"Cryptech NOT IN repository\",\nods-ksmutil has not been able to actually list the keys in the HSM.<\/p>","category":{"@attributes":{"term":"DNSSEC"}}},{"title":"Praha Workshop SSH keys","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/PrahaWorkshopSSH","rel":"alternate"}},"published":"2016-12-15T22:43:00+00:00","updated":"2016-12-15T22:43:00+00:00","author":{"name":"Cryptech Core Team"},"id":"tag:wiki.cryptech.is,2016-12-15:\/PrahaWorkshopSSH","summary":"<h2>The list of all known SSH keys<\/h2>\n<div class=\"highlight\"><pre><span><\/span><code><span class=\"n\">ssh<\/span><span class=\"o\">-<\/span><span class=\"n\">rsa<\/span><span class=\"w\"> <\/span><span class=\"n\">AAAAB3NzaC1yc2EAAAADAQABAAABAQDZJUtfVH0KQfdGhVetTQRpg9Ki8xGKNnO07r6df9DrrmDrsHVSsDOv8zxMoNh4XHbaLtmSCT8IkB8xLU6dXVCH4vWZZwfzaKKRNgMOSfOSc6blKKBV6xEw9qXeMe4dWcfknl3yAr6EqYsg5Lrmqgalr8Vyd6FGAoGbLR4Qh7vrahMqXp3<\/span><span class=\"o\">+<\/span><span class=\"mi\">20<\/span><span class=\"n\">kn1xfDm5reSJDbNPmU4eNhJykTNtr6l6CbK<\/span><span class=\"o\">\/<\/span><span class=\"n\">OFzhqcMI<\/span><span class=\"o\">\/<\/span><span class=\"n\">AW5AO0wL8f5wIoHQzescZWQMDMW<\/span><span class=\"o\">+<\/span><span class=\"mi\">1<\/span><span class=\"n\">gVyDiS8lGS6nhsSZwZZeAJrXHK<\/span><span class=\"o\">\/<\/span><span class=\"n\">LF3ldz1To5HBxzpU5Sziav8C5bgTeYo5YfqDuBq8m9mgZTzqocXFcXUCr0I6x<\/span><span class=\"w\"> <\/span><span class=\"n\">dol<\/span><span class=\"nv\">@dolmacbook<\/span>\n<span class=\"n\">ssh<\/span><span class=\"o\">-<\/span><span class=\"n\">rsa<\/span><span class=\"w\"> <\/span><span class=\"n\">AAAAB3NzaC1yc2EAAAADAQABAAABAQCnskRpNxWJE<\/span><span class=\"o\">\/<\/span><span class=\"n\">YgDR3o6sMWwwmbUJ8f2SJa0gHfHM<\/span><span class=\"o\">+<\/span><span class=\"n\">fcxxC2zQN9<\/span><span class=\"o\">\/<\/span><span class=\"mi\">9<\/span><span class=\"n\">mqJSxS1E9QdeuRbbHpYxEUtHoX0vSrmia<\/span><span class=\"o\">\/<\/span><span class=\"n\">VALDiQAMps51RBqq6YlrYqvP<\/span><span class=\"o\">\/<\/span><span class=\"n\">Rb0hZ0Z4<\/span><span class=\"o\">\/<\/span><span class=\"n\">YgjTosLdu1PeTzih6mwbyNNF0<\/span><span class=\"o\">+<\/span><span class=\"n\">gY987Ig31qXQytNF<\/span><span class=\"o\">+<\/span><span class=\"mi\">9<\/span><span class=\"n\">G1oSY9dgBAq52lu170QXTRwum4B6Gh4<\/span><span class=\"o\">\/<\/span><span class=\"n\">pCnM6xx<\/span><span class=\"o\">+<\/span><span class=\"mi\">7<\/span><span class=\"n\">nY2oqlgvl2wYHVAOJ39W9r4y9kBhcVs51XvJqYehjaoyKYf1<\/span><span class=\"o\">+<\/span><span class=\"n\">PzA0FsvhJkZuG6ws5eEGSB90lAzKGyFZXedvOLmnFmqAraoLeuKajHIFJDfKNfHHbYpn8ERIfVW66nbqlXFO2g3<\/span><span class=\"w\"> <\/span><span class=\"n\">fredrik<\/span><span class=\"nv\">@thulin<\/span><span class=\"p\">.<\/span><span class=\"n\">net<\/span>\n<span class=\"n\">ssh<\/span><span class=\"o\">-<\/span><span class=\"n\">rsa<\/span><span class=\"w\"> <\/span><span class=\"n\">AAAAB3NzaC1yc2EAAAADAQABAAACAQCo3wT4gGyEmGGw5ePMO<\/span><span class=\"o\">+<\/span><span class=\"n\">jscvq7lo4hIPQHVZNgrChVWphvD1MkkH6PfoUYNfKwagFjUPQcDotQxGaVfvxL6Y4WzOfwiONHTj<\/span><span class=\"o\">\/<\/span><span class=\"mi\">4<\/span><span class=\"n\">b2skxdRw5B<\/span><span class=\"o\">\/<\/span><span class=\"n\">K2ZnGw2pbfXP4Nhjb1gry2K<\/span><span class=\"o\">+<\/span><span class=\"n\">BSVWqP3pVZk5tQ<\/span><span class=\"o\">+<\/span><span class=\"n\">P0YqbwKNfBFlaqS1dR8uIwo6E<\/span><span class=\"o\">\/<\/span><span class=\"mi\">8<\/span><span class=\"n\">wGIjcMcDMAioMyRlU2R \u2026<\/span><\/code><\/pre><\/div>","content":"<h2>The list of all known SSH keys<\/h2>\n<div class=\"highlight\"><pre><span><\/span><code><span class=\"n\">ssh<\/span><span class=\"o\">-<\/span><span class=\"n\">rsa<\/span><span class=\"w\"> <\/span><span class=\"n\">AAAAB3NzaC1yc2EAAAADAQABAAABAQDZJUtfVH0KQfdGhVetTQRpg9Ki8xGKNnO07r6df9DrrmDrsHVSsDOv8zxMoNh4XHbaLtmSCT8IkB8xLU6dXVCH4vWZZwfzaKKRNgMOSfOSc6blKKBV6xEw9qXeMe4dWcfknl3yAr6EqYsg5Lrmqgalr8Vyd6FGAoGbLR4Qh7vrahMqXp3<\/span><span class=\"o\">+<\/span><span class=\"mi\">20<\/span><span class=\"n\">kn1xfDm5reSJDbNPmU4eNhJykTNtr6l6CbK<\/span><span class=\"o\">\/<\/span><span class=\"n\">OFzhqcMI<\/span><span class=\"o\">\/<\/span><span class=\"n\">AW5AO0wL8f5wIoHQzescZWQMDMW<\/span><span class=\"o\">+<\/span><span class=\"mi\">1<\/span><span class=\"n\">gVyDiS8lGS6nhsSZwZZeAJrXHK<\/span><span class=\"o\">\/<\/span><span class=\"n\">LF3ldz1To5HBxzpU5Sziav8C5bgTeYo5YfqDuBq8m9mgZTzqocXFcXUCr0I6x<\/span><span class=\"w\"> <\/span><span class=\"n\">dol<\/span><span class=\"nv\">@dolmacbook<\/span>\n<span class=\"n\">ssh<\/span><span class=\"o\">-<\/span><span class=\"n\">rsa<\/span><span class=\"w\"> <\/span><span class=\"n\">AAAAB3NzaC1yc2EAAAADAQABAAABAQCnskRpNxWJE<\/span><span class=\"o\">\/<\/span><span class=\"n\">YgDR3o6sMWwwmbUJ8f2SJa0gHfHM<\/span><span class=\"o\">+<\/span><span class=\"n\">fcxxC2zQN9<\/span><span class=\"o\">\/<\/span><span class=\"mi\">9<\/span><span class=\"n\">mqJSxS1E9QdeuRbbHpYxEUtHoX0vSrmia<\/span><span class=\"o\">\/<\/span><span class=\"n\">VALDiQAMps51RBqq6YlrYqvP<\/span><span class=\"o\">\/<\/span><span class=\"n\">Rb0hZ0Z4<\/span><span class=\"o\">\/<\/span><span class=\"n\">YgjTosLdu1PeTzih6mwbyNNF0<\/span><span class=\"o\">+<\/span><span class=\"n\">gY987Ig31qXQytNF<\/span><span class=\"o\">+<\/span><span class=\"mi\">9<\/span><span class=\"n\">G1oSY9dgBAq52lu170QXTRwum4B6Gh4<\/span><span class=\"o\">\/<\/span><span class=\"n\">pCnM6xx<\/span><span class=\"o\">+<\/span><span class=\"mi\">7<\/span><span class=\"n\">nY2oqlgvl2wYHVAOJ39W9r4y9kBhcVs51XvJqYehjaoyKYf1<\/span><span class=\"o\">+<\/span><span class=\"n\">PzA0FsvhJkZuG6ws5eEGSB90lAzKGyFZXedvOLmnFmqAraoLeuKajHIFJDfKNfHHbYpn8ERIfVW66nbqlXFO2g3<\/span><span class=\"w\"> <\/span><span class=\"n\">fredrik<\/span><span class=\"nv\">@thulin<\/span><span class=\"p\">.<\/span><span class=\"n\">net<\/span>\n<span class=\"n\">ssh<\/span><span class=\"o\">-<\/span><span class=\"n\">rsa<\/span><span class=\"w\"> <\/span><span class=\"n\">AAAAB3NzaC1yc2EAAAADAQABAAACAQCo3wT4gGyEmGGw5ePMO<\/span><span class=\"o\">+<\/span><span class=\"n\">jscvq7lo4hIPQHVZNgrChVWphvD1MkkH6PfoUYNfKwagFjUPQcDotQxGaVfvxL6Y4WzOfwiONHTj<\/span><span class=\"o\">\/<\/span><span class=\"mi\">4<\/span><span class=\"n\">b2skxdRw5B<\/span><span class=\"o\">\/<\/span><span class=\"n\">K2ZnGw2pbfXP4Nhjb1gry2K<\/span><span class=\"o\">+<\/span><span class=\"n\">BSVWqP3pVZk5tQ<\/span><span class=\"o\">+<\/span><span class=\"n\">P0YqbwKNfBFlaqS1dR8uIwo6E<\/span><span class=\"o\">\/<\/span><span class=\"mi\">8<\/span><span class=\"n\">wGIjcMcDMAioMyRlU2R<\/span><span class=\"o\">\/<\/span><span class=\"n\">u1aXQliol75GWu0jP9xrDyE3mRxoptn7kiUi9JAs<\/span><span class=\"o\">\/<\/span><span class=\"n\">iZtlsiJh51IOADhhNMLWcmQEzKrcR2zytWZqEPzCx9C72<\/span><span class=\"o\">\/<\/span><span class=\"n\">nPl3WacNXqdrMMT5tjt18TOFCf1jhBCHzXMu<\/span><span class=\"o\">+<\/span><span class=\"n\">biaoHB5sSBtue0zLFyO1A1XxLYxCp<\/span><span class=\"o\">+<\/span><span class=\"n\">jqlwJm2xAkS1rpFhdW3qlJZe0dV3a3TwepMGi<\/span><span class=\"o\">\/<\/span><span class=\"n\">ObhggEk8ygwDNpYPEbgKqBcKb5RMpPJS2aEKbKd1<\/span><span class=\"o\">+<\/span><span class=\"n\">UStCagwPNwgRLrBME9YIAI9zyN8sFgHyy70q2XzhUJ5zz<\/span><span class=\"o\">+<\/span><span class=\"n\">X8JMVaKEKMTVh31u01jQchdvHkkGD7<\/span><span class=\"o\">\/<\/span><span class=\"n\">xbp3hluFOCI1ChYKSlRdakoS6XnPopZ<\/span><span class=\"o\">\/<\/span><span class=\"mi\">0<\/span><span class=\"n\">tHrkpk<\/span><span class=\"o\">+<\/span><span class=\"n\">k5lScu9lPHvBTMa3gq<\/span><span class=\"o\">+<\/span><span class=\"n\">b<\/span><span class=\"o\">++<\/span><span class=\"n\">TDbkW8dtYq3c78xHcAmOEjXvezbTnKpe<\/span><span class=\"o\">\/<\/span><span class=\"n\">dRfWEUbmrGOch3mzDPoYAtjj7fdEWUGELhCSJB813B7HcGS6oXmW0PYEtOEIgeo83JX6i2qYiTQmjY1kOgBw<\/span><span class=\"o\">==<\/span><span class=\"w\"> <\/span><span class=\"n\">jakob<\/span><span class=\"nv\">@kirei<\/span><span class=\"p\">.<\/span><span class=\"n\">se<\/span>\n<span class=\"n\">ssh<\/span><span class=\"o\">-<\/span><span class=\"n\">rsa<\/span><span class=\"w\"> <\/span><span class=\"n\">AAAAB3NzaC1yc2EAAAADAQABAAACAQDEK7I<\/span><span class=\"o\">\/<\/span><span class=\"n\">KcbkhIevS<\/span><span class=\"o\">+<\/span><span class=\"n\">N88wBEA7OP<\/span><span class=\"o\">+<\/span><span class=\"n\">HtsULSxB0zl9xZO34mjCHfN6jQDYulwDbsk7IikRO4kn4cqPiaLkSX<\/span><span class=\"o\">+<\/span><span class=\"mi\">8<\/span><span class=\"n\">gXv<\/span><span class=\"o\">\/<\/span><span class=\"n\">NsNqLXttK0x5Yt95Q25rXUMKYw<\/span><span class=\"o\">\/<\/span><span class=\"n\">wkDxArD8k<\/span><span class=\"o\">+<\/span><span class=\"n\">wI71c41iTHyId1ZkHnUNmS9qxS2ajEhOCTYhB5xYYgeUscGwn6iiz5Ksjru28UnL<\/span><span class=\"o\">\/<\/span><span class=\"n\">JZUZ3BHxm62XEHL6Yr9Bz<\/span><span class=\"o\">\/<\/span><span class=\"n\">yzCKatm7<\/span><span class=\"o\">+<\/span><span class=\"mi\">55<\/span><span class=\"n\">eH0BMtiWFADtKEKz1nUGR8EUEIuchfQRZzXhmJmk<\/span><span class=\"o\">+<\/span><span class=\"n\">LNh<\/span><span class=\"o\">+<\/span><span class=\"n\">ft<\/span><span class=\"o\">\/<\/span><span class=\"n\">BKcAjWKjz7LxncDH0fPqtRBYdB9dxziGozviYi20kVLzDdsOsnVL5lF9km1JtpyMyAHb7fbNA5xsCSge0rRL6<\/span><span class=\"o\">+<\/span><span class=\"n\">K5g4iX9QcCiTf12HjurHpFOktopItGtF60yyfbK2itBDlYiQxBSU75mvvllBxQ3gk47WCNrhuut<\/span><span class=\"o\">\/<\/span><span class=\"n\">Uyyc8tjLmPdTIfc0<\/span><span class=\"o\">+<\/span><span class=\"n\">Mjz4owh3hfgNpJTO22jwo7CDtn<\/span><span class=\"o\">\/<\/span><span class=\"mi\">2<\/span><span class=\"n\">bPe24aRpcrzldlMMi4jLLP58znCxabJFwAe9YrxavqGr9qcS1lBaGCrLc98vTix4eJFQQOazwJIFrDUDeeyuTo<\/span><span class=\"o\">\/<\/span><span class=\"n\">ebAZ3nVQyRBTBDCfr1w06<\/span><span class=\"o\">\/<\/span><span class=\"n\">OVAF9QLuxp2wFtuiVdw<\/span><span class=\"o\">\/<\/span><span class=\"n\">DHZ93OwyCN<\/span><span class=\"o\">\/<\/span><span class=\"n\">wDIC8yH<\/span><span class=\"o\">\/<\/span><span class=\"n\">zJuLPKRD5PyBrQ14KLY<\/span><span class=\"o\">\/<\/span><span class=\"n\">iLHw8scWcebvRvTrCc3SZkdXqhIySArXb<\/span><span class=\"o\">+<\/span><span class=\"mi\">17<\/span><span class=\"n\">Qzw<\/span><span class=\"o\">==<\/span><span class=\"w\"> <\/span><span class=\"n\">js<\/span><span class=\"nv\">@snabbis<\/span><span class=\"p\">.<\/span><span class=\"k\">local<\/span>\n<span class=\"n\">ssh<\/span><span class=\"o\">-<\/span><span class=\"n\">rsa<\/span><span class=\"w\"> <\/span><span class=\"n\">AAAAB3NzaC1yc2EAAAADAQABAAABAQDVvB4gdJ6EWRmx8xUSxrhoUNnWxEf8ZwAqhzC1<\/span><span class=\"o\">+<\/span><span class=\"mi\">7<\/span><span class=\"n\">XBY<\/span><span class=\"o\">\/<\/span><span class=\"n\">hSd<\/span><span class=\"o\">\/<\/span><span class=\"n\">cbEotLB9gxgqt0CLW56VU4FPLTw8snD8tgsyZN6KH1Da7UXno8oMk8tJdwLQM0Ggx3aWuztItkDfBc3Lfvq5T07YfphqJO7rcSGbS4QQdflXuOM9JLi6NStVao0ia4aE6Tj68pVVb3<\/span><span class=\"o\">++<\/span><span class=\"n\">XYvqvbU6NtEICvkTxEY93YpnRSfeAi64hsbaqSTN4kpeltzoSD1Rikz2aQFtFXE03ZC48HtGGhdMFA<\/span><span class=\"o\">\/<\/span><span class=\"n\">Ade6KWBDaXxHGARVQ9<\/span><span class=\"o\">\/<\/span><span class=\"n\">UccfhaR2XSjVxSZ8FBNOzNsH4k9cQIb2ndkEOXZXnjF5ZjdI4ZU0F<\/span><span class=\"o\">+<\/span><span class=\"n\">t7<\/span><span class=\"w\"> <\/span><span class=\"n\">leifj<\/span><span class=\"o\">+<\/span><span class=\"mi\">00060<\/span><span class=\"n\">AD478D6<\/span><span class=\"nv\">@sunet<\/span><span class=\"p\">.<\/span><span class=\"n\">se<\/span>\n<span class=\"n\">ssh<\/span><span class=\"o\">-<\/span><span class=\"n\">rsa<\/span><span class=\"w\"> <\/span><span class=\"n\">AAAAB3NzaC1yc2EAAAADAQABAAABAQDQVmVIptFt7ghSm5PpKw6uRQSEozHGKRN6AUyevyarfMuRONWvnFawTL<\/span><span class=\"o\">\/<\/span><span class=\"n\">bqc6atX23dV6q0mIRzfUu<\/span><span class=\"o\">+<\/span><span class=\"mi\">43<\/span><span class=\"n\">ABjv5suwXaXoDw6rc6b8jElX<\/span><span class=\"o\">\/<\/span><span class=\"n\">aJTDjea7n3i2hkhmGQwe8ibvjz2ZgNEkzz8NJSJI9nEzgPoHHM9<\/span><span class=\"o\">\/<\/span><span class=\"n\">enpMb<\/span><span class=\"o\">\/<\/span><span class=\"n\">saPWU<\/span><span class=\"o\">\/<\/span><span class=\"n\">JFfPLAQ9XsQV<\/span><span class=\"o\">+<\/span><span class=\"n\">u1fhuTyrTlVynKN1iQxxCRjySD9boWo7XGQ8<\/span><span class=\"o\">\/<\/span><span class=\"mi\">0<\/span><span class=\"n\">VBy28xS<\/span><span class=\"o\">\/<\/span><span class=\"n\">eGDGs4Wty<\/span><span class=\"o\">+<\/span><span class=\"n\">SKT9QEabipyq7gqqsgoo87B1UUP98kawZF<\/span><span class=\"o\">\/<\/span><span class=\"n\">wPMk5D<\/span><span class=\"o\">+<\/span><span class=\"n\">bWUej6dHaJEZECdAcalHlj7TCfJJM<\/span><span class=\"o\">+<\/span><span class=\"n\">ELHcQ8BD<\/span><span class=\"o\">+<\/span><span class=\"mi\">4<\/span><span class=\"n\">YzbkjTWPFG6ihI29bnV3z<\/span><span class=\"w\"> <\/span><span class=\"n\">linus<\/span><span class=\"nv\">@nordberg<\/span><span class=\"p\">.<\/span><span class=\"n\">se<\/span>\n<span class=\"n\">ssh<\/span><span class=\"o\">-<\/span><span class=\"n\">rsa<\/span><span class=\"w\"> <\/span><span class=\"n\">AAAAB3NzaC1yc2EAAAADAQABAAABAQCfi07vngzbVdipBCSC<\/span><span class=\"o\">+<\/span><span class=\"n\">pDoauAck0nN45sV<\/span><span class=\"o\">+<\/span><span class=\"n\">u9A5vRLM9qwYIZm8XFlqJmKhmZMJWaY<\/span><span class=\"o\">+<\/span><span class=\"n\">rR4VCZKD8F8<\/span><span class=\"o\">\/<\/span><span class=\"n\">Tmw26Q2kOG4tAajA2kZV<\/span><span class=\"o\">+<\/span><span class=\"mi\">2<\/span><span class=\"n\">Us0nXHE8YktKoLqojjSxMi73LT<\/span><span class=\"o\">\/<\/span><span class=\"n\">CtAjbxNZNs6hAVKgIDqFyY7pJhrpNkVxQGMHB<\/span><span class=\"o\">\/<\/span><span class=\"n\">MboVTqS1X3Jglm8J9T5<\/span><span class=\"o\">\/<\/span><span class=\"n\">kNNU6brjErFCxQIOnLFJHczdcLMio31wK37jXZUWvbp8dXJrjNINU1r953hBibkZ178LODsitojXWsBckJZPxc43of7caGROesbIZQeGi<\/span><span class=\"o\">\/<\/span><span class=\"n\">BKnxOgKWXresgeZngw8<\/span><span class=\"o\">+<\/span><span class=\"n\">hb5bQemI<\/span><span class=\"o\">+<\/span><span class=\"n\">ktbCQg3Exna7EHi6TGCLV<\/span><span class=\"w\"> <\/span><span class=\"n\">paul<\/span><span class=\"nv\">@Darkstar<\/span><span class=\"o\">-<\/span><span class=\"n\">VirtualBox<\/span>\n<span class=\"n\">ssh<\/span><span class=\"o\">-<\/span><span class=\"n\">rsa<\/span><span class=\"w\"> <\/span><span class=\"n\">AAAAB3NzaC1yc2EAAAADAQABAAABAQC9<\/span><span class=\"o\">+<\/span><span class=\"n\">qRUZdFK9Fcweb3Zemice<\/span><span class=\"o\">+<\/span><span class=\"n\">QFDmqn0uXfjnB9xjIGXlzV7mi7mcDIMwRdL8es4CbNzx7gk8qbxl<\/span><span class=\"o\">+<\/span><span class=\"n\">bzSWlGrW8mE2smXicvb5aXAl1Gq7A1tmwb9j7Pb3<\/span><span class=\"o\">\/<\/span><span class=\"n\">AUA0fonh086AjH<\/span><span class=\"o\">\/<\/span><span class=\"n\">olVDHEXfE6fA<\/span><span class=\"o\">+<\/span><span class=\"n\">auMeW7NcYEAY4YBn9yrQSmvS4i3RcZtAETe<\/span><span class=\"o\">+<\/span><span class=\"n\">aCO<\/span><span class=\"o\">\/<\/span><span class=\"n\">Cjl147DIeqH9hcSbBdEWdcH5Q0DIPYY1QnOlZAdphXDm3Kvr9poSX<\/span><span class=\"o\">+<\/span><span class=\"mi\">2<\/span><span class=\"n\">W6Zm8tRYJAATXh<\/span><span class=\"o\">+<\/span><span class=\"n\">gCFYWF2xig40k<\/span><span class=\"o\">\/<\/span><span class=\"mi\">5<\/span><span class=\"n\">C0<\/span><span class=\"o\">\/<\/span><span class=\"n\">jX48muuJ<\/span><span class=\"o\">+<\/span><span class=\"n\">gemav07PiOs6gwrvc2hJvhdHm5<\/span><span class=\"o\">+<\/span><span class=\"mi\">3<\/span><span class=\"n\">FoE2MaqPm7xZvEg0maLEvGSvydw0MQ9<\/span><span class=\"w\"> <\/span><span class=\"n\">paul<\/span><span class=\"nv\">@psgd<\/span><span class=\"p\">.<\/span><span class=\"n\">org<\/span>\n<span class=\"n\">ssh<\/span><span class=\"o\">-<\/span><span class=\"n\">dss<\/span><span class=\"w\"> <\/span><span class=\"n\">AAAAB3NzaC1kc3MAAACBAMcyFrmcI06jwD2IEA5lvqNM84mr05eMIARy<\/span><span class=\"o\">+<\/span><span class=\"n\">JQ9f<\/span><span class=\"o\">++<\/span><span class=\"n\">tix9eMk5Y7b9Dmau3iYNG7WAEUtzEhj<\/span><span class=\"o\">+<\/span><span class=\"n\">ZO1QSMNqDX<\/span><span class=\"o\">+<\/span><span class=\"n\">TARAkesWHhRtNp5aTSpTrnyb7W74x7Wdjd0Zw6iQyYjzv8qYdcg3siN<\/span><span class=\"o\">\/<\/span><span class=\"n\">POE6traHqzratuSrN9euEjXSq6lmutAAAAFQCo1RS1pRSCgmkTogCNHEqCnHDOOwAAAIEAg0XcJyRT3Er5oanfdQQT69mXfrGkcqGaahJchbIkVX9MDlFLmrAw8Av<\/span><span class=\"o\">\/<\/span><span class=\"mi\">77<\/span><span class=\"n\">Plesq6uOgQuP1<\/span><span class=\"o\">\/<\/span><span class=\"n\">tgJKN3gjW<\/span><span class=\"o\">+<\/span><span class=\"n\">n25S4Ly5L6P<\/span><span class=\"o\">+<\/span><span class=\"n\">vo8JH22<\/span><span class=\"o\">+<\/span><span class=\"n\">gSDWKdfjbf44xDRdorG19vbOrjynrZ<\/span><span class=\"o\">\/<\/span><span class=\"n\">qZIS9UAdjT0aWiCkyRjhcqFpv3EvqXaqP<\/span><span class=\"o\">\/<\/span><span class=\"n\">wpewAAACBAIu6JsMU53WWWDDVGtFVTKPkx1S0MF69xIOrVVbka88DzHsRg9qLqHlH<\/span><span class=\"o\">\/<\/span><span class=\"mi\">7<\/span><span class=\"n\">TjVYv8Dzp4SBp1sf70JQhFgA0cPbQB7VcGX9rlJdvSqE2d695iSkJY8X08UrcSasjHbThtbjy1dsVXxiUV0Vt7rFYKaxlk4GJz83p8e7KorTiJMTu<\/span><span class=\"o\">\/<\/span><span class=\"w\"> <\/span><span class=\"n\">randy<\/span><span class=\"nv\">@psg<\/span><span class=\"p\">.<\/span><span class=\"n\">com<\/span>\n<span class=\"n\">ssh<\/span><span class=\"o\">-<\/span><span class=\"n\">rsa<\/span><span class=\"w\"> <\/span><span class=\"n\">AAAAB3NzaC1yc2EAAAADAQABAAACAQCkrrpUCqIibbYB7v4Kr<\/span><span class=\"o\">\/<\/span><span class=\"n\">B07yTGXJgMjAsFf<\/span><span class=\"o\">+<\/span><span class=\"n\">YHIC9WpcLvpe5v4<\/span><span class=\"o\">+<\/span><span class=\"n\">O8t4Q<\/span><span class=\"o\">\/<\/span><span class=\"n\">WSMVETlkUZHIKVntHeLYLHIQVyL2njuM<\/span><span class=\"o\">+<\/span><span class=\"n\">MYShslz8lpc0Z<\/span><span class=\"o\">\/<\/span><span class=\"n\">cIInpHSAM<\/span><span class=\"o\">\/<\/span><span class=\"n\">rm9p<\/span><span class=\"o\">\/<\/span><span class=\"mi\">6<\/span><span class=\"n\">MaKzAz8RODYe9Oxah34bNI7lXLUkNOBsUTRaKUA6jav<\/span><span class=\"o\">\/<\/span><span class=\"n\">kfbPA<\/span><span class=\"o\">\/<\/span><span class=\"n\">Y3ADIo8Hj1HcNfTxw6E<\/span><span class=\"o\">+<\/span><span class=\"n\">lmFAf3BkdzyvAmTGLIuv9BbD737B25BIERs5U0EltsdDvNPa3gMLyDt<\/span><span class=\"o\">\/<\/span><span class=\"n\">slslu16WzBRE4tijf0Kbl7DyTeBKSi1EAaQe75N8cHgRSJe96ikkNqTy65vcKw41HTCoLzgJA<\/span><span class=\"o\">\/<\/span><span class=\"n\">EuzwWgSvo96pK0uCM27R0<\/span><span class=\"o\">+<\/span><span class=\"n\">zlg1zp3Z6UQXDhKukmVYP72AF6Csk9BSkb3vURgMAwYDZQUKmzdd<\/span><span class=\"o\">+<\/span><span class=\"n\">YzE9sdmFa4fwYZmdHs<\/span><span class=\"o\">+<\/span><span class=\"n\">cC1XcU6uNbo3202yP<\/span><span class=\"o\">\/<\/span><span class=\"n\">E5NiZ9wN8<\/span><span class=\"o\">+<\/span><span class=\"n\">fKqNpXVePUYPc8ACOYLBO3hjfvtwmXRM1rIcBgm5NbWotlCTmf6c2mfh<\/span><span class=\"o\">+<\/span><span class=\"mi\">4<\/span><span class=\"n\">tDtStSNGSf7a3bq9rHIS1GLDH0FNaWkjB<\/span><span class=\"o\">+<\/span><span class=\"n\">CKY5KnXF4vvMDqauDORt0pTH5OHsVsCgJjemwR0qHK6O7LxcSg8gzNvA5y4N<\/span><span class=\"o\">\/<\/span><span class=\"n\">Pf6tcvoSNLbJoIF<\/span><span class=\"o\">+<\/span><span class=\"n\">XQ7oRhOYNPiR2gBziQ3paEMLsl57ewGOAvwT<\/span><span class=\"o\">+<\/span><span class=\"n\">O26wys1tmwcPr0FQHUnIzv<\/span><span class=\"o\">+<\/span><span class=\"n\">ecDY3oCw9fRw<\/span><span class=\"o\">==<\/span><span class=\"w\"> <\/span><span class=\"n\">sra<\/span><span class=\"nv\">@hactrn<\/span><span class=\"p\">.<\/span><span class=\"n\">net<\/span>\n<\/code><\/pre><\/div>","category":{"@attributes":{"term":"Workshops"}}},{"title":"Project Metadata","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/ProjectMetadata","rel":"alternate"}},"published":"2016-12-15T22:43:00+00:00","updated":"2016-12-15T22:43:00+00:00","author":{"name":"Cryptech Core Team"},"id":"tag:wiki.cryptech.is,2016-12-15:\/ProjectMetadata","content":"<h2>Project Logo Files<\/h2>\n<ul>\n<li>See \"Attachments\" at the bottom of this page<\/li>\n<li>PhotoFolder<\/li>\n<\/ul>\n<p>==\u00a0Meeting Presentations\u00a0and Notes ==<\/p>\n<ul>\n<li><a href=\"https:\/\/wiki.cryptech.is\/DocMeet\">DocMeet<\/a><\/li>\n<li><a href=\"https:\/\/wiki.cryptech.is\/PrahaWorkshop\">PrahaWorkshop<\/a><\/li>\n<li><a href=\"https:\/\/wiki.cryptech.is\/BerlinWorkshop\">BerlinWorkshop<\/a><\/li>\n<\/ul>\n<p>==\u00a0Technical\u00a0References ==<\/p>\n<ul>\n<li><a href=\"https:\/\/wiki.cryptech.is\/MiscStuff\">MiscStuff<\/a><\/li>\n<li><a href=\"https:\/\/wiki.cryptech.is\/InterconnectStandards\">InterconnectStandards<\/a><\/li>\n<li><a href=\"https:\/\/wiki.cryptech.is\/RandomnessTesting\">RandomnessTesting<\/a><\/li>\n<\/ul>\n<p>==\u00a0Related\u00a0Work ==<\/p>\n<ul>\n<li><a href=\"https:\/\/wiki.cryptech.is\/RelatedWork\">RelatedWork<\/a><\/li>\n<li><a href=\"https:\/\/wiki.cryptech.is\/SideChannel\">SideChannel<\/a><\/li>\n<\/ul>","category":{"@attributes":{"term":"misc"}}},{"title":"Quick Start","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/QuickStart","rel":"alternate"}},"published":"2016-12-15T22:43:00+00:00","updated":"2017-05-13T20:39:00+00:00","author":{"name":"Cryptech Core Team"},"id":"tag:wiki.cryptech.is,2016-12-15:\/QuickStart","summary":"<p><em>Page Under Development<\/em><\/p>\n<h2>Git Repositories<\/h2>\n<p>The team uses Git to store and track project development. All submissions are <a href=\"https:\/\/git-scm.com\/book\/en\/v2\/Git-Tools-Signing-Your-Work\">signed<\/a>.<\/p>\n<h2>The Alpha Board<\/h2>\n<p>The current hardware is the AlphaBoard.  More information (to be organized at some point -- yes, this wiki is a mess, again):<\/p>\n<ul>\n<li><a href=\"https:\/\/wiki.cryptech.is\/AlphaBoardComponents\">AlphaBoardComponents<\/a><\/li>\n<li><a href=\"https:\/\/wiki.cryptech.is\/AlphaBoardPictures\">AlphaBoardPictures<\/a><\/li>\n<li><a href=\"https:\/\/wiki.cryptech.is\/AlphaBoardStrategy\">AlphaBoardStrategy<\/a><\/li>\n<li><a href=\"https:\/\/wiki.cryptech.is\/AlphaReviewLog\">AlphaReviewLog<\/a><\/li>\n<li><a href=\"https:\/\/wiki.cryptech.is\/AlphaSchematics\">AlphaSchematics<\/a><\/li>\n<\/ul>\n<p>The Alpha \u2026<\/p>","content":"<p><em>Page Under Development<\/em><\/p>\n<h2>Git Repositories<\/h2>\n<p>The team uses Git to store and track project development. All submissions are <a href=\"https:\/\/git-scm.com\/book\/en\/v2\/Git-Tools-Signing-Your-Work\">signed<\/a>.<\/p>\n<h2>The Alpha Board<\/h2>\n<p>The current hardware is the AlphaBoard.  More information (to be organized at some point -- yes, this wiki is a mess, again):<\/p>\n<ul>\n<li><a href=\"https:\/\/wiki.cryptech.is\/AlphaBoardComponents\">AlphaBoardComponents<\/a><\/li>\n<li><a href=\"https:\/\/wiki.cryptech.is\/AlphaBoardPictures\">AlphaBoardPictures<\/a><\/li>\n<li><a href=\"https:\/\/wiki.cryptech.is\/AlphaBoardStrategy\">AlphaBoardStrategy<\/a><\/li>\n<li><a href=\"https:\/\/wiki.cryptech.is\/AlphaReviewLog\">AlphaReviewLog<\/a><\/li>\n<li><a href=\"https:\/\/wiki.cryptech.is\/AlphaSchematics\">AlphaSchematics<\/a><\/li>\n<\/ul>\n<p>The Alpha board currently ships with very old firmware, but you can <a href=\"https:\/\/wiki.cryptech.is\/Upgrading\">upgrade it yourself<\/a>.<\/p>\n<h2>DNSSEC signing using OpenDNSSEC<\/h2>\n<ul>\n<li><a href=\"https:\/\/wiki.cryptech.is\/OpenDNSSEC\">OpenDNSSEC<\/a><\/li>\n<\/ul>","category":{"@attributes":{"term":"misc"}}},{"title":"Randomness Testing Tools","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/RandomnessTesting","rel":"alternate"}},"published":"2016-12-15T22:43:00+00:00","updated":"2016-12-15T22:43:00+00:00","author":{"name":"Cryptech Core Team"},"id":"tag:wiki.cryptech.is,2016-12-15:\/RandomnessTesting","summary":"<p>This page explains some basics on testing for randomness, and the background necessary to understand their outputs.<\/p>\n<h2>Basic Considerations<\/h2>\n<p>When testing the randomness of an alleged\/assumed random bit\/byte stream, there are two fundamentally different categories of tests: There are <em>blackbox<\/em> tests which are independent of the particular source \u2026<\/p>","content":"<p>This page explains some basics on testing for randomness, and the background necessary to understand their outputs.<\/p>\n<h2>Basic Considerations<\/h2>\n<p>When testing the randomness of an alleged\/assumed random bit\/byte stream, there are two fundamentally different categories of tests: There are <em>blackbox<\/em> tests which are independent of the particular source, and <em>whitebox<\/em> tests tailored to the particular properties of the given source.<\/p>\n<p>For reasons rather unsurprising, the <em>blackbox<\/em> and <em>whitebox<\/em> categories largely correlate with the categories <em>publicly available tests from others<\/em> and <em>tests developed by the designers of the particular stream source<\/em>; this obviously leads to other issues concerning the trustworthiness and reliability of the tests---testing your own stuff is always a somewhat risky approach.<\/p>\n<p>All tests basically work by taking a certain part of the data space, declaring them as \"not random\" or possibly \"suspect\", and then comparing some test input against this partitioning.  Mathematically speaking, all the possible partitionings are equally relevant and as such any stream is equally \"random\" or \"non-random\", so choosing any partitioning definition is somewhat arbitrary.<\/p>\n<p>The usual <em>blackbox<\/em> tests are effectively based on tests used for non-crypto pseudo random number generators; as such, they are generally useful for quick, preliminary testing and for establishing confidence in the source by outsiders.  But to test the health of a source, eventually whitebox tests tailored to the failure modes of the given source are needed.<\/p>\n<h2>The <code>dieharder<\/code> Test Suite<\/h2>\n<p>Dieharder is by far the most extensive blackbox test suite.  However, it is originally aimed at testing the output of non-crypto pseudo random number generators; aside from the limitations of using it for an entirely different purpose, it is rather notorious with regard to its need for extensive amounts of input.  Additionally, it runs all tests sequentially, rather than making use of today's multi-core multi-threaded CPU architectures; this leads to unnecessary I\/O while reading an input file that doesn't fit the disk cache, and runtimes of about an hour or so depending on the sort of computer used.<\/p>\n<h3>Usage<\/h3>\n<p>Generally the best approach to use <code>dieharder<\/code> is to first generate an output file, e.g. <code>random.out<\/code> to run the tests on, so <code>dieharder<\/code> can apply all its individual tests to the same data.  For a standard test, at least about 14 GB worth of data are needed; more if one of the tests needing large amounts of data returns a suspect result and <code>dieharder<\/code> re-tries the same test with more data.<\/p>\n<p>The command line options I (bs) personally use are <code>dieharder -g 201 -f random.out -s 1 -Y 1 -k 2 -a<\/code>:<\/p>\n<ul>\n<li><code>-g 201 -f random.out<\/code>: Don't use a compiled-in pseudo RNG but the file <code>random.out<\/code> as input.<\/li>\n<li><code>-s 1<\/code>: Rewind the input after every test.  Without this, successive tests use successive parts of the input file.<\/li>\n<li><code>-Y 1<\/code>: Keep testing until a definite (in probabilistic terms:-) test result is obtained.<\/li>\n<li><code>-k 2<\/code>: Use some high precision numerics for the KS test; recommended by the man page.<\/li>\n<li><code>-a<\/code>:   Run all tests.<\/li>\n<\/ul>\n<p>Additionally, these may be useful for more targeted testing:<\/p>\n<ul>\n<li><code>-m &lt;n&gt;<\/code>: Multiply the <code>psamples<\/code> value by <code>n<\/code>; good for getting even more reliable results, at the expense of the additional data needed.<\/li>\n<li><code>-d &lt;test name\/number&gt;<\/code>: Perform a specific test.<\/li>\n<li><code>-l<\/code>: List all available tests by name and number.<\/li>\n<li><code>-p &lt;n&gt;<\/code>: Set the <code>psamples<\/code> value.  See below why you may need this.<\/li>\n<\/ul>\n<h3>Interpretation of Results<\/h3>\n<p>The way <code>dieharder<\/code> works, it simply returns a clear assessment of the test results; interpretation should be immediately obvious.<\/p>\n<h3>Caveats<\/h3>\n<p>There are a number of things to keep in mind when using <code>dieharder<\/code>, especially so when running it on a reduced amount of test data.<\/p>\n<ul>\n<li>If <code>dieharder<\/code> reaches the end of the input file, it rewinds and uses the same test data again.  This has rather drastic effects on several tests which assume that some sort of repetition in the input is a sign for a seriously flawed generator.<\/li>\n<li>The <code>-Y 1<\/code> option works by adding 100 to the value of <code>psamples<\/code> until a conclusive result is found.  This works reasonably well with tests that start with a value of 100 to <code>psamples<\/code>, but there are tests starting with 1000, and others starting with 1.<\/li>\n<li>The <code>-m &lt;n&gt;<\/code> option also just affects the initial value of <code>psamples<\/code>.<\/li>\n<li>Some of the tests themselves are marked as \"suspect\" or \"do not use\" if you run <code>dieharder -l<\/code>.  Still, <code>-a<\/code> runs them, for whatever reason.<\/li>\n<li>Expect about one test in a <code>-a<\/code> run to return a \"weak\" result that needs to be resolved.  According to the man page, about 1 in 1000 tests (not <code>-a<\/code> runs!) may fail despite the fact that the input is good.  In that case I suggest doubling the input size, either by using <code>-m &lt;n&gt;<\/code> (which only works in conjunction with <code>-a<\/code>) or by adjusting <code>psamples<\/code> and\/or <code>tsamples<\/code> manually.<\/li>\n<\/ul>\n<h3>Installation<\/h3>\n<p>The <a href=\"http:\/\/www.phy.duke.edu\/~rgb\/General\/dieharder.php\">Dieharder home page<\/a> provides the source code as well as documentation. Dieharder is also available via package systems in Linux (apt-get install dieharder) and by brew for OSX.<\/p>\n<h2>The FIPS140-2 Test Suite <code>rngtest<\/code> from <code>rng-tools<\/code><\/h2>\n<p>While somewhat questionable in the way it has been defined in the FIPS140-2 document (and silently been removed in the -3 draft...), these tests are generally considered useful for a quick preliminary test on small amounts of test data.\nThey generally work on blocks of 20000 bits.<\/p>\n<h3>Usage<\/h3>\n<p>The <code>rngtest<\/code> program reads data from its standard input and by default returns a statistics overview when it reaches EOF.  This can be changed with these two options (among others):<\/p>\n<ul>\n<li><code>-c &lt;n&gt;<\/code>: Stop running after <code>n<\/code> blocks.<\/li>\n<li><code>-b &lt;n&gt;:<\/code> Give intermediate results every <code>n<\/code> blocks.<\/li>\n<\/ul>\n<p>Use at least one of these when running on a pipe or device...<\/p>\n<h3>Interpretation of Results<\/h3>\n<p>Since <code>rngtest<\/code> works on rather small sample sizes it causes a significant number of false alarms:<\/p>\n<table>\n<thead>\n<tr>\n<th>Test<\/th>\n<th>Expected failure rate<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Total<\/td>\n<td>800ppm<\/td>\n<\/tr>\n<tr>\n<td>Monobit<\/td>\n<td>100ppm<\/td>\n<\/tr>\n<tr>\n<td>Poker<\/td>\n<td>100ppm<\/td>\n<\/tr>\n<tr>\n<td>Runs<\/td>\n<td>300ppm<\/td>\n<\/tr>\n<tr>\n<td>Long run<\/td>\n<td>300ppm<\/td>\n<\/tr>\n<tr>\n<td>Continuous run<\/td>\n<td>Extremely rare<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>These failure rates were however measured experimentally rather than derived from the algorithms themselves, so caveat utilitor.<\/p>\n<p>Seriously flawed inputs often show excessive failures from very small input; it is generally a good idea to keep testing until at least about 100 failures in total have occurred before seriously comparing the measured results to the expected failure rates from the table.<\/p>","category":{"@attributes":{"term":"TRNG"}}},{"title":"Rough Cut at v0.01 Proof of Concept Feature Set","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/RoughV1","rel":"alternate"}},"published":"2016-12-15T22:43:00+00:00","updated":"2021-02-14T17:33:00+00:00","author":{"name":"Cryptech Core Team"},"id":"tag:wiki.cryptech.is,2016-12-15:\/RoughV1","summary":"<p>This is a proposed version 0.01 product as a proof of concept.  The\nintent is not to have a very useful product, but rather to gain\nconfidence in our architecture, tools, and team.  The result is intended\nto be the basis for further development into a more useful second \u2026<\/p>","content":"<p>This is a proposed version 0.01 product as a proof of concept.  The\nintent is not to have a very useful product, but rather to gain\nconfidence in our architecture, tools, and team.  The result is intended\nto be the basis for further development into a more useful second stage,\nin the sense of\n<a href=\"https:\/\/en.wikipedia.org\/wiki\/Agile_software_development\">agile development<\/a>.\nIt very intentionally is not a\n<a href=\"https:\/\/en.wikipedia.org\/wiki\/Waterfall_model\">waterfall design<\/a>,<\/p>\n<p>The interface between the Green and Yellow layers is seen as an important design\ninflection.<\/p>\n<p>Some code will be in C in the Green (auxiliary core) because we can get it open\nsource out of the can.  for v.2 (or whatever) we would move it down to the FPGA in\nVerilog.<\/p>\n<h2>FPGA Overview<\/h2>\n<p><img alt=\"HW_sketch_v0001.png\" src=\"https:\/\/wiki.cryptech.is\/RoughV1\/RoughV1\/HW_sketch_v0001.png\">\n<br\/>\n<br\/><\/p>\n<h2>Sketch of TRNG Chain<\/h2>\n<p><img alt=\"HW_RNG.png\" src=\"https:\/\/wiki.cryptech.is\/RoughV1\/RoughV1\/HW_RNG.png\">\n<br\/>\n<br\/><\/p>\n<h2>Off-FPGA<\/h2>\n<ul>\n<li>Persistent Storage<ul>\n<li>For Keys and Time<\/li>\n<li>Or the battery for tamper wipe is big enough to hold the FPGA up<\/li>\n<li>Or the Green processor has enough non-volatile store<\/li>\n<\/ul>\n<\/li>\n<li>Entropy Source<\/li>\n<li>Realtime Clock<\/li>\n<li>Tamper Mechanism<\/li>\n<\/ul>\n<h2>Layers<\/h2>\n<div class=\"highlight\"><pre><span><\/span><code>#!html\n<span class=\"nt\">&lt;h1<\/span><span class=\"w\"> <\/span><span class=\"na\">style=<\/span><span class=\"s\">&quot;text-align: left; color: blue&quot;<\/span><span class=\"nt\">&gt;<\/span>\n<span class=\"w\">  <\/span>Blue<span class=\"w\"> <\/span>\/<span class=\"w\"> <\/span>FPGA\n<span class=\"nt\">&lt;\/h1&gt;<\/span>\n<\/code><\/pre><\/div>\n\n<ul>\n<li>TRNG<\/li>\n<li>BigNumber, Modular, &amp; Exponentiation (expose to green for RSA)<\/li>\n<li>SHA-256<\/li>\n<li>AES-128<\/li>\n<li>EC for ECDH. Curve3617 would be nice, but whatever we can get open source to start<\/li>\n<li>OpenRISC Core or ARM to support Green (maybe FreeScale from Bunnie)<\/li>\n<\/ul>\n<div class=\"highlight\"><pre><span><\/span><code>#!html\n<span class=\"nt\">&lt;h1<\/span><span class=\"w\"> <\/span><span class=\"na\">style=<\/span><span class=\"s\">&quot;text-align: left; color: green&quot;<\/span><span class=\"nt\">&gt;<\/span>\n<span class=\"w\">  <\/span>Green<span class=\"w\"> <\/span>\/<span class=\"w\"> <\/span>On-Chip<span class=\"w\"> <\/span>Core\n<span class=\"nt\">&lt;\/h1&gt;<\/span>\n<\/code><\/pre><\/div>\n\n<ul>\n<li>RSA 2048 &amp; 4096 (move to blue later) [ 1024 for Tor? ]<\/li>\n<li>MACs: HMAC, 1305, uMAC<\/li>\n<li>DH (move to blue later)<\/li>\n<li>Device Activation, Move Authorization, Wiping<\/li>\n<\/ul>\n<div class=\"highlight\"><pre><span><\/span><code>#!html\n<span class=\"nt\">&lt;h1<\/span><span class=\"w\"> <\/span><span class=\"na\">style=<\/span><span class=\"s\">&quot;text-align: left; color: yellow&quot;<\/span><span class=\"nt\">&gt;<\/span>\n<span class=\"w\">  <\/span>Yellow<span class=\"w\"> <\/span>\/<span class=\"w\"> <\/span>Off-Chip<span class=\"w\"> <\/span>Support\n<span class=\"nt\">&lt;\/h1&gt;<\/span>\n<\/code><\/pre><\/div>\n\n<ul>\n<li>Interface to Red<ul>\n<li>PKCS#8<\/li>\n<li>PKCS#11<\/li>\n<li>PGP Support<\/li>\n<\/ul>\n<\/li>\n<li>X.509 and PGP<\/li>\n<li>PKCS#11 for POLA resistance<\/li>\n<li>No PKCS#10 because it will take a year<\/li>\n<li>Backup may be just dump\/restore of the whole FPGA\/CoreState<\/li>\n<\/ul>\n<div class=\"highlight\"><pre><span><\/span><code>#!html\n<span class=\"nt\">&lt;h1<\/span><span class=\"w\"> <\/span><span class=\"na\">style=<\/span><span class=\"s\">&quot;text-align: left; color: red&quot;<\/span><span class=\"nt\">&gt;<\/span>\n<span class=\"w\">  <\/span>Red<span class=\"w\"> <\/span>\/<span class=\"w\"> <\/span>Applications\n<span class=\"nt\">&lt;\/h1&gt;<\/span>\n<\/code><\/pre><\/div>\n\n<ul>\n<li>X.509 CA<\/li>\n<li>DNSSEC<\/li>\n<li>PGP (asymmetric key sign\/verify + symmetric message encryption\/decryption)<\/li>\n<li>Tor consensus(?)<\/li>\n<\/ul>\n<h2>Issues in v0.01<\/h2>\n<ul>\n<li>License of tool chain to build<\/li>\n<li>License for borrowed components (open cores, open fpga)<\/li>\n<li>License for result<ul>\n<li>What we build ourselves - BSD<\/li>\n<li>What components we ship - life is compromise<\/li>\n<\/ul>\n<\/li>\n<li>Toolchains, Verilog, C, ...<\/li>\n<li>FPGAs and ASICs use a Verilog-based toolchain.  There are no mature open\n  Verilog compilers so the <a href=\"http:\/\/www.dwheeler.com\/trusting-trust\/\">DDC approach<\/a>\n  will not work.  Net-list optimization is also an issue.  We're looking into this,\n  but it's going to be really hard.  Research for v2.<\/li>\n<li>Protoyping platform<ul>\n<li><a href=\"http:\/\/www.bunniestudios.com\/blog\/?p=3265\">Bunnie's Novena laptop<\/a><\/li>\n<li>Altera Evaluation Board<\/li>\n<\/ul>\n<\/li>\n<li>RTC, external connectivity to et some sort of assured time<\/li>\n<li>Repository - too many git junkies.  Keep main repo on our server for the security boundary.  Can mirror on GitHub to be socially cool.<\/li>\n<li>Emacs or vi (no Rob, not TECO) :)<\/li>\n<\/ul>","category":{"@attributes":{"term":"misc"}}},{"title":"Planning for SUNET funded Cryptech Work","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/SunetInitialDevelopment","rel":"alternate"}},"published":"2016-12-15T22:43:00+00:00","updated":"2016-12-15T22:43:00+00:00","author":{"name":"Cryptech Core Team"},"id":"tag:wiki.cryptech.is,2016-12-15:\/SunetInitialDevelopment","summary":"<p>The following documents the first two development steps in Cryptech\nfunded by SUNET. The development is being done by Joachim Str\u00f6mbergson\nfrom Secworks AB.<\/p>\n<h2>Step one (Deadline 2014-02-28)<\/h2>\n<ul>\n<li>Acquire a FPGA development platform.<\/li>\n<\/ul>\n<p>DONE. We have a Terasic DE0 board and a Terasic Cyclone V GX starter kit board.<\/p>\n<ul>\n<li>\n<p>Create \u2026<\/p><\/li><\/ul>","content":"<p>The following documents the first two development steps in Cryptech\nfunded by SUNET. The development is being done by Joachim Str\u00f6mbergson\nfrom Secworks AB.<\/p>\n<h2>Step one (Deadline 2014-02-28)<\/h2>\n<ul>\n<li>Acquire a FPGA development platform.<\/li>\n<\/ul>\n<p>DONE. We have a Terasic DE0 board and a Terasic Cyclone V GX starter kit board.<\/p>\n<ul>\n<li>\n<p>Create a working development and verification flow from RTL design\n   downto FPGA.<\/p>\n<\/li>\n<li>\n<p>Verify the functionality of the SHA-256 core in a physical FPGA.<\/p>\n<\/li>\n<\/ul>\n<h3>Actions for step one<\/h3>\n<ul>\n<li>\n<p>Select FPGA development board to acquire<\/p>\n<ul>\n<li>Large enough to test sub systems and possibly a complete HSM.<\/li>\n<li>Good external interfaces for communication with host systems.<\/li>\n<li>Good external interfaces to entropy sources, memories,\n GPIO. Arduino Shields would be good.<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Create a survey on interconnect standards usable for Cryptech<\/p>\n<ul>\n<li>Availability and market share\/usage in third party cores.<\/li>\n<li>License<\/li>\n<li>Technical details - Bus, fabric, performance etc.<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Create base coretest functionality to allow testing of cores in the\n     FPGA on the development board. Read and write access to registers\n     over a known communication channel.<\/p>\n<\/li>\n<li>\n<p>Verify the development flow from Verilog RTL downto FPGA.<\/p>\n<\/li>\n<li>\n<p>Verifiera SHA-256 core using coretest.<\/p>\n<\/li>\n<li>\n<p>Start FPGA tool survey<\/p>\n<ul>\n<li>What is available as open tools and what is the status.<\/li>\n<li>What is available as open tools from the vendors.<\/li>\n<li>Talk to people in the industry to get their views on an open toolchain.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2>Step two (Deadline 2014-03-31)<\/h2>\n<ul>\n<li>\n<p>Produce first draft of design proposal to the Cryptech True Random Number Generator (TRNG)<\/p>\n<ul>\n<li>Security target, security model and assumptions<\/li>\n<li>Structure, architecture<\/li>\n<li>API<\/li>\n<li>Functionality<\/li>\n<li>Online test system<\/li>\n<li>Verification model<\/li>\n<li>First two entropy sources<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Complete SHA-1 core. Including functional verification in FPGA.<\/p>\n<\/li>\n<li>\n<p>First draft of SHA-256 and SHA-1 core documentation.<\/p>\n<\/li>\n<\/ul>\n<h3>Actions for step two<\/h3>\n<ul>\n<li>\n<p>Create template for documentation<\/p>\n<\/li>\n<li>\n<p>Collect info on known TRNGs and TRNG strategies<\/p>\n<\/li>\n<li>\n<p>Collect info on online tests being used.<\/p>\n<\/li>\n<li>\n<p>Create proposal for architecture.<\/p>\n<\/li>\n<li>\n<p>Write implementation proposal.<\/p>\n<\/li>\n<li>\n<p>Specify API.<\/p>\n<\/li>\n<li>\n<p>Write security target and security model.<\/p>\n<\/li>\n<li>\n<p>Write assumptions and limitations.<\/p>\n<\/li>\n<li>\n<p>Write verification model.<\/p>\n<\/li>\n<li>\n<p>Finalize SHA-1 core RTl.<\/p>\n<\/li>\n<li>\n<p>Build SHA-1 core in FPGA.<\/p>\n<\/li>\n<li>\n<p>Verify SHA-1 functionality in FPGA using coretest.<\/p>\n<\/li>\n<li>\n<p>Write documentation for SHA-256 core.<\/p>\n<\/li>\n<li>\n<p>Write documentation for SHA-1 core.<\/p>\n<\/li>\n<\/ul>","category":{"@attributes":{"term":"misc"}}},{"title":"Who We Are","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/WhoWeAre","rel":"alternate"}},"published":"2016-12-15T22:43:00+00:00","updated":"2016-12-15T22:43:00+00:00","author":{"name":"Cryptech Core Team"},"id":"tag:wiki.cryptech.is,2016-12-15:\/WhoWeAre","summary":"<p>This effort was started at the suggestion of Russ Housley, Stephen Farrell, and Jari Arkko of the IETF, to meet the assurance needs of supporting IETF protocols in an open and transparent manner.<\/p>\n<p>But this is not an IETF, ISOC, ... project.  As the saying goes, we work for the Internet \u2026<\/p>","content":"<p>This effort was started at the suggestion of Russ Housley, Stephen Farrell, and Jari Arkko of the IETF, to meet the assurance needs of supporting IETF protocols in an open and transparent manner.<\/p>\n<p>But this is not an IETF, ISOC, ... project.  As the saying goes, we work for the Internet.<\/p>\n<h2>Tech Core<\/h2>\n<ul>\n<li>Fredrik Thulin<\/li>\n<li>Jakob Schlyter<\/li>\n<li><a href=\"https:\/\/wiki.cryptech.is\/Joachim Str\u00f6mbergson\">Joachim Str\u00f6mbergson<\/a><\/li>\n<li>Leif Johansson<\/li>\n<li>Linus Nordberg<\/li>\n<li>Lucy Lynch<\/li>\n<li>Patrik Wallstr\u00f6m<\/li>\n<li>\u041f\u0430\u0432\u0435\u043b \u0428\u0430\u0442\u043e\u0432 (Pavel Shatov)<\/li>\n<li>Peter Stuge<\/li>\n<li><a href=\"https:\/\/psg.com\/~randy\">Randy Bush<\/a><\/li>\n<li><a href=\"https:\/\/www.hactrn.net\/sra\/\">Rob Austein<\/a><\/li>\n<li>Steven Bellovin<\/li>\n<li>Basil Dolmatov<\/li>\n<\/ul>\n<h2>IETF Help<\/h2>\n<ul>\n<li>Russ Housley<\/li>\n<li>Sean Turner<\/li>\n<li>Stephen Farrell<\/li>\n<\/ul>\n<h2>Coordination<\/h2>\n<ul>\n<li>Leif Johansson - Administration<\/li>\n<li>Randy Bush - Technical<\/li>\n<li>Russ Housley \/ Lynn StAmour - Finding Funding<\/li>\n<\/ul>","category":{"@attributes":{"term":"People"}}},{"title":"Alpha Board","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/AlphaBoard","rel":"alternate"}},"published":"2016-12-15T22:39:00+00:00","updated":"2019-01-22T08:46:00+00:00","author":{"name":"Joachim Str\u00f6mbergson"},"id":"tag:wiki.cryptech.is,2016-12-15:\/AlphaBoard","summary":"<h2>Rev 02<\/h2>\n<h3>Components<\/h3>\n<ul>\n<li>ARM Processor:  <a href=\"http:\/\/www.st.com\/content\/st_com\/en\/products\/microcontrollers\/stm32-32-bit-arm-cortex-mcus\/stm32f4-series\/stm32f429-439.html\">STM32F429<\/a><\/li>\n<li>FPGA: <a href=\"http:\/\/www.xilinx.com\/products\/silicon-devices\/fpga\/artix-7.html\">Xilinx Artix-7 XC7A200T-1<\/a><\/li>\n<li>Tamper Circuit: <a href=\"http:\/\/www.atmel.com\/devices\/ATTINY828.aspx\">ATtiny828<\/a><\/li>\n<\/ul>\n<h3>Status LEDs<\/h3>\n<table>\n<thead>\n<tr>\n<th>ID<\/th>\n<th>Color<\/th>\n<th>Meaning<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>01<\/td>\n<td>Green<\/td>\n<td>ARM LED 2<\/td>\n<\/tr>\n<tr>\n<td>02<\/td>\n<td>Red<\/td>\n<td>ARM LED 4<\/td>\n<\/tr>\n<tr>\n<td>03<\/td>\n<td>Blue<\/td>\n<td>ARM LED 1<\/td>\n<\/tr>\n<tr>\n<td>04<\/td>\n<td>Yellow<\/td>\n<td>ARM LED 3<\/td>\n<\/tr>\n<tr>\n<td>05<\/td>\n<td>Yellow<\/td>\n<td>Application Access USB UART Rx<\/td>\n<\/tr>\n<tr>\n<td>06<\/td>\n<td>Green<\/td>\n<td>Application Access USB \u2026<\/td><\/tr><\/tbody><\/table>","content":"<h2>Rev 02<\/h2>\n<h3>Components<\/h3>\n<ul>\n<li>ARM Processor:  <a href=\"http:\/\/www.st.com\/content\/st_com\/en\/products\/microcontrollers\/stm32-32-bit-arm-cortex-mcus\/stm32f4-series\/stm32f429-439.html\">STM32F429<\/a><\/li>\n<li>FPGA: <a href=\"http:\/\/www.xilinx.com\/products\/silicon-devices\/fpga\/artix-7.html\">Xilinx Artix-7 XC7A200T-1<\/a><\/li>\n<li>Tamper Circuit: <a href=\"http:\/\/www.atmel.com\/devices\/ATTINY828.aspx\">ATtiny828<\/a><\/li>\n<\/ul>\n<h3>Status LEDs<\/h3>\n<table>\n<thead>\n<tr>\n<th>ID<\/th>\n<th>Color<\/th>\n<th>Meaning<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>01<\/td>\n<td>Green<\/td>\n<td>ARM LED 2<\/td>\n<\/tr>\n<tr>\n<td>02<\/td>\n<td>Red<\/td>\n<td>ARM LED 4<\/td>\n<\/tr>\n<tr>\n<td>03<\/td>\n<td>Blue<\/td>\n<td>ARM LED 1<\/td>\n<\/tr>\n<tr>\n<td>04<\/td>\n<td>Yellow<\/td>\n<td>ARM LED 3<\/td>\n<\/tr>\n<tr>\n<td>05<\/td>\n<td>Yellow<\/td>\n<td>Application Access USB UART Rx<\/td>\n<\/tr>\n<tr>\n<td>06<\/td>\n<td>Green<\/td>\n<td>Application Access USB UART Tx<\/td>\n<\/tr>\n<tr>\n<td>07<\/td>\n<td>Yellow<\/td>\n<td>Management Access USB UART Rx<\/td>\n<\/tr>\n<tr>\n<td>08<\/td>\n<td>Green<\/td>\n<td>Management Access USB UART Tx<\/td>\n<\/tr>\n<tr>\n<td>09<\/td>\n<td>Green<\/td>\n<td>AVR LED 2<\/td>\n<\/tr>\n<tr>\n<td>10<\/td>\n<td>Red<\/td>\n<td>AVR LED 4<\/td>\n<\/tr>\n<tr>\n<td>11<\/td>\n<td>Blue<\/td>\n<td>AVR LED 1<\/td>\n<\/tr>\n<tr>\n<td>12<\/td>\n<td>Yellow<\/td>\n<td>AVR LED 3<\/td>\n<\/tr>\n<tr>\n<td>13<\/td>\n<td>Red<\/td>\n<td>FPGA Config NOT DONE<\/td>\n<\/tr>\n<tr>\n<td>14<\/td>\n<td>Red<\/td>\n<td>FPGA LED 3<\/td>\n<\/tr>\n<tr>\n<td>15<\/td>\n<td>Green<\/td>\n<td>FPGA LED 1<\/td>\n<\/tr>\n<tr>\n<td>16<\/td>\n<td>Yellow<\/td>\n<td>FPGA LED 2<\/td>\n<\/tr>\n<tr>\n<td>17<\/td>\n<td>Blue<\/td>\n<td>FPGA LED 0. <a href=\"https:\/\/git.cryptech.is\/core\/comm\/fmc\/tree\/src\/rtl\/fmc_indicator.v\">Toggles with sys_clk when FMC is active.<\/a><\/td>\n<\/tr>\n<tr>\n<td>18<\/td>\n<td>Green<\/td>\n<td>Power OK<\/td>\n<\/tr>\n<\/tbody>\n<\/table>","category":{"@attributes":{"term":"AlphaBoard"}}},{"title":"Alpha Schematics","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/AlphaSchematics","rel":"alternate"}},"published":"2016-12-15T22:39:00+00:00","updated":"2016-12-15T22:39:00+00:00","author":{"name":"Cryptech Core Team"},"id":"tag:wiki.cryptech.is,2016-12-15:\/AlphaSchematics","summary":"<p>The Alpha schematics are almost finished!<\/p>\n<p>PDF and Eagle files available for download here in the <a href=\"https:\/\/git.cryptech.is\/hardware\/tree\/eagle\/alpha\/rev02\">hardware<\/a> repository.<\/p>\n<p><code>https:\/\/wiki.cryptech.is\/browser\/hardware\/eagle\/alpha\/rev02<\/code><\/p>\n<p>The schematics are based on the dev-bridge board that we made in the summer of 2015, which is why it is called rev02 \u2026<\/p>","content":"<p>The Alpha schematics are almost finished!<\/p>\n<p>PDF and Eagle files available for download here in the <a href=\"https:\/\/git.cryptech.is\/hardware\/tree\/eagle\/alpha\/rev02\">hardware<\/a> repository.<\/p>\n<p><code>https:\/\/wiki.cryptech.is\/browser\/hardware\/eagle\/alpha\/rev02<\/code><\/p>\n<p>The schematics are based on the dev-bridge board that we made in the summer of 2015, which is why it is called rev02.<\/p>\n<p>We are currently seeking review of the schematics to finalize them before starting layout. A log of various peoples review comments is kept <a href=\"https:\/\/wiki.cryptech.is\/AlphaReviewLog\">here<\/a>.<\/p>","category":{"@attributes":{"term":"AlphaBoard"}}},{"title":"Developers' Guide","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/DevelopersGuide","rel":"alternate"}},"published":"2016-12-15T22:39:00+00:00","updated":"2016-12-15T22:39:00+00:00","author":{"name":"Cryptech Core Team"},"id":"tag:wiki.cryptech.is,2016-12-15:\/DevelopersGuide","content":"<p><em>Page Under Development<\/em><\/p>\n<h2>Architecture<\/h2>\n<ul>\n<li><a href=\"https:\/\/wiki.cryptech.is\/OpenCryptoChip\">OpenCryptoChip<\/a><\/li>\n<li><a href=\"https:\/\/wiki.cryptech.is\/NoisyDiode\">NoisyDiode<\/a><\/li>\n<li><a href=\"https:\/\/wiki.cryptech.is\/AlphaBoard\">AlphaBoard<\/a><\/li>\n<\/ul>\n<h2>Known Limitations<\/h2>\n<ul>\n<li>\n<p><a href=\"https:\/\/wiki.cryptech.is\/AssuredTooChain\">AssuredTooChain<\/a><\/p>\n<\/li>\n<li>\n<p>EDAToolchainSurvey<\/p>\n<\/li>\n<\/ul>\n<h2>Building the Bitstream<\/h2>","category":{"@attributes":{"term":"misc"}}},{"title":"Documents, Meetings, etc.","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/DocMeet","rel":"alternate"}},"published":"2016-12-15T22:39:00+00:00","updated":"2016-12-15T22:39:00+00:00","author":{"name":"Cryptech Core Team"},"id":"tag:wiki.cryptech.is,2016-12-15:\/DocMeet","summary":"<h2>Meetings<\/h2>\n<ul>\n<li>At IETF88 an open lunch meeting was held with maybe 30-40 people.  Minutes will be posted here shortly.<\/li>\n<li>An invitation-only initial exploratory and team-building meeting will be hosted by SUNET in Stockholm in December.  Invitations are in process.  Dress in layers.  Anything useful that comes out of the meeting \u2026<\/li><\/ul>","content":"<h2>Meetings<\/h2>\n<ul>\n<li>At IETF88 an open lunch meeting was held with maybe 30-40 people.  Minutes will be posted here shortly.<\/li>\n<li>An invitation-only initial exploratory and team-building meeting will be hosted by SUNET in Stockholm in December.  Invitations are in process.  Dress in layers.  Anything useful that comes out of the meeting will be published on this wiki.<\/li>\n<\/ul>\n<h2>Documents<\/h2>\n<ul>\n<li><a href=\"https:\/\/wiki.cryptech.is\/DocMeet\/DocMeet\/140109.cryptech.pdf\">140109.cryptech.pdf Presentation - Overview of Project with Funding Requests<\/a><\/li>\n<li>[[attachment:141002.cryptech-iij.pdf|141002.cryptech-iij.pdf CrypTech Presentation at Open IIJ Seminar]]<\/li>\n<\/ul>","category":{"@attributes":{"term":"Workshops"}}},{"title":"Mailing Lists","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/MailingLists","rel":"alternate"}},"published":"2016-12-15T22:39:00+00:00","updated":"2016-12-15T22:39:00+00:00","author":{"name":"Cryptech Core Team"},"id":"tag:wiki.cryptech.is,2016-12-15:\/MailingLists","summary":"<p>The following lists are open to all:<\/p>\n<ul>\n<li>Cryptech Project Announcements<br\/>\n  announce@cryptech.is<br\/>\n  <a href=\"https:\/\/lists.cryptech.is\/listinfo\/announce\">Subscribe\/Unsubscribe<\/a><br\/>\n  <a href=\"https:\/\/lists.cryptech.is\/archives\/announce\/\">Announce List Archive<\/a><\/li>\n<li>General technology and engineering list<br\/>\n  tech@cryptech.is<br\/>\n  <a href=\"https:\/\/lists.cryptech.is\/listinfo\/tech\">Subscribe\/Unsubscribe<\/a><br\/>\n  <a href=\"https:\/\/lists.cryptech.is\/archives\/tech\/\">Tech List Archive<\/a><\/li>\n<li>Repository commit watch list (posting restricted)<br\/>\n  commit@cryptech.is<br\/>\n  <a href=\"https:\/\/lists.cryptech.is\/listinfo\/commits\">Subscribe\/Unsubscribe<\/a><br\/>\n  <a href=\"https:\/\/lists.cryptech.is\/archives\/commits\">Commit List Archive<\/a><\/li>\n<\/ul>\n<p>The following lists require approval \u2026<\/p>","content":"<p>The following lists are open to all:<\/p>\n<ul>\n<li>Cryptech Project Announcements<br\/>\n  announce@cryptech.is<br\/>\n  <a href=\"https:\/\/lists.cryptech.is\/listinfo\/announce\">Subscribe\/Unsubscribe<\/a><br\/>\n  <a href=\"https:\/\/lists.cryptech.is\/archives\/announce\/\">Announce List Archive<\/a><\/li>\n<li>General technology and engineering list<br\/>\n  tech@cryptech.is<br\/>\n  <a href=\"https:\/\/lists.cryptech.is\/listinfo\/tech\">Subscribe\/Unsubscribe<\/a><br\/>\n  <a href=\"https:\/\/lists.cryptech.is\/archives\/tech\/\">Tech List Archive<\/a><\/li>\n<li>Repository commit watch list (posting restricted)<br\/>\n  commit@cryptech.is<br\/>\n  <a href=\"https:\/\/lists.cryptech.is\/listinfo\/commits\">Subscribe\/Unsubscribe<\/a><br\/>\n  <a href=\"https:\/\/lists.cryptech.is\/archives\/commits\">Commit List Archive<\/a><\/li>\n<\/ul>\n<p>The following lists require approval for subscription:<\/p>\n<ul>\n<li>Cryptech Project Core Team<br\/>\n  core@cryptech.is<br\/>\n  <a href=\"https:\/\/lists.cryptech.is\/listinfo\/core\">Subscribe\/Unsubscribe<\/a><br\/>\n  <a href=\"https:\/\/lists.cryptech.is\/archives\/core\/\">Core List Archive<\/a><\/li>\n<li>Finance, funding, administration<br\/>\n  org@cryptec.is<br\/>\n  <a href=\"https:\/\/lists.cryptech.is\/listinfo\/org\">Subscribe\/Unsubscribe<\/a><br\/>\n  <a href=\"https:\/\/lists.cryptech.is\/archives\/org\/\">Org List Archive<\/a><\/li>\n<\/ul>","category":{"@attributes":{"term":"misc"}}},{"title":"References & Miscellaneous","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/MiscStuff","rel":"alternate"}},"published":"2016-12-15T22:39:00+00:00","updated":"2016-12-15T22:39:00+00:00","author":{"name":"Cryptech Core Team"},"id":"tag:wiki.cryptech.is,2016-12-15:\/MiscStuff","summary":"<h2>Interesting research and people<\/h2>\n<p>Advisory board, reviewers etc.<\/p>\n<h3>Elliptic Curves<\/h3>\n<ul>\n<li><a href=\"http:\/\/safecurves.cr.yp.to\/\">http:\/\/safecurves.cr.yp.to\/<\/a>. Including Curve3617.<\/li>\n<li><a href=\"http:\/\/www.nsa.gov\/ia\/_files\/nist-routines.pdf\">http:\/\/www.nsa.gov\/ia\/_files\/nist-routines.pdf<\/a>. Details for implementing NIST curves.<\/li>\n<li><a href=\"http:\/\/blog.cr.yp.to\/20140323-ecdsa.html\">http:\/\/blog.cr.yp.to\/20140323-ecdsa.html<\/a> djb on How to design an elliptic-curve signature system<\/li>\n<\/ul>\n<h3>Side channel attacks<\/h3>\n<ul>\n<li><a href=\"http:\/\/www.cl.cam.ac.uk\/~sps32\/\">http \u2026<\/a><\/li><\/ul>","content":"<h2>Interesting research and people<\/h2>\n<p>Advisory board, reviewers etc.<\/p>\n<h3>Elliptic Curves<\/h3>\n<ul>\n<li><a href=\"http:\/\/safecurves.cr.yp.to\/\">http:\/\/safecurves.cr.yp.to\/<\/a>. Including Curve3617.<\/li>\n<li><a href=\"http:\/\/www.nsa.gov\/ia\/_files\/nist-routines.pdf\">http:\/\/www.nsa.gov\/ia\/_files\/nist-routines.pdf<\/a>. Details for implementing NIST curves.<\/li>\n<li><a href=\"http:\/\/blog.cr.yp.to\/20140323-ecdsa.html\">http:\/\/blog.cr.yp.to\/20140323-ecdsa.html<\/a> djb on How to design an elliptic-curve signature system<\/li>\n<\/ul>\n<h3>Side channel attacks<\/h3>\n<ul>\n<li><a href=\"http:\/\/www.cl.cam.ac.uk\/~sps32\/\">http:\/\/www.cl.cam.ac.uk\/~sps32\/<\/a>, Dr Sergei Skorobogatov<\/li>\n<li><a href=\"https:\/\/www.bsi.bund.de\/SharedDocs\/Downloads\/DE\/BSI\/Zertifizierung\/Interpretationen\/AIS_46_ECCGuide_e_pdf.pdf\">BSI - Minimum Requirements for Evaluating Side-Channel Attack Resistance of Elliptic Curve Implementations<\/a><\/li>\n<\/ul>\n<h2>Useful References<\/h2>\n<ul>\n<li><a href=\"https:\/\/crypto.stanford.edu\/~dabo\/pubs\/abstracts\/ssl-timing.html\">Remote timing attacks are practical<\/a>, D. Boneh and D. Brumley.<\/li>\n<li><a href=\"http:\/\/www.cybersecurity.my\/mycc\/document\/mycpr\/C037\/AEP_Keyper_EAL4_ASE_1.3.pdf\">Common Critiera Security Target for the AEP Keyper<\/a><\/li>\n<li><a href=\"https:\/\/www.cosic.esat.kuleuven.be\/ches2012\/tutorials.shtml\">Cryptographic hardware: how to make it cool, fast and unbreakable<\/a>,\n  Junfeng Fan, KU Leuven<\/li>\n<li><a href=\"http:\/\/web.mit.edu\/bunnie\/www\/xi\/rec.html\">REC FPGA Seminar IAP 1998<\/a>, Bunnie Huang<\/li>\n<li><a href=\"http:\/\/compcert.inria.fr\/\">the formal verification of realistic compilers usable for critical embedded software<\/a><\/li>\n<\/ul>\n<h2>Somewhat Related Web Sites<\/h2>\n<ul>\n<li><a href=\"https:\/\/prism-break.org\/\">List of Open SW Alternatives<\/a><\/li>\n<\/ul>","category":{"@attributes":{"term":"misc"}}},{"title":"HSM Requirements","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/Requirements","rel":"alternate"}},"published":"2016-12-15T22:39:00+00:00","updated":"2016-12-15T22:39:00+00:00","author":{"name":"Cryptech Core Team"},"id":"tag:wiki.cryptech.is,2016-12-15:\/Requirements","summary":"<p>Requirements for the Cryptech Alpha System. Derived from Use Cases (see below). There are also utility, internal requirements (again, see below).<\/p>\n<h2>Capacity<\/h2>\n<h3>Per key storage requirements<\/h3>\n<p>In addition to the actual key data, each key requires<\/p>\n<ul>\n<li>Key type \u2013 4 bytes<\/li>\n<li>Key identifier \u2013 4 bytes<\/li>\n<li>Key flags, e.g. exportable \u2013 8 \u2026<\/li><\/ul>","content":"<p>Requirements for the Cryptech Alpha System. Derived from Use Cases (see below). There are also utility, internal requirements (again, see below).<\/p>\n<h2>Capacity<\/h2>\n<h3>Per key storage requirements<\/h3>\n<p>In addition to the actual key data, each key requires<\/p>\n<ul>\n<li>Key type \u2013 4 bytes<\/li>\n<li>Key identifier \u2013 4 bytes<\/li>\n<li>Key flags, e.g. exportable \u2013 8 bytes<\/li>\n<\/ul>\n<p>This results a total 16 bytes overhead for each key.<\/p>\n<h3>Examples per algorithm<\/h3>\n<p>(For RSA, we  might also want to include the primes p and q might also be included which requires additional storage.)<\/p>\n<ul>\n<li>RSA-8192 requires 1024 bytes secret key, 1024 bytes public key + 4 bytes exponent + 16 bytes overhead = 2068 bytes<\/li>\n<li>RSA-4096 requires 512 bytes secret key,   512 bytes public key + 4 bytes exponent + 16 bytes overhead = 1044 bytes<\/li>\n<li>RSA-2048 requires 256 bytes secret key,   256 bytes public key + 4 bytes exponent + 16 bytes overhead = 532 bytes<\/li>\n<li>EC P-256 requires 32 bytes secret key, 64 bytes public key + 16 bytes overhead = 112 bytes<\/li>\n<li>EC P-384 requires 48 bytes secret key, 96 bytes public key + 16 bytes overhead = 160 bytes<\/li>\n<li>Curve 25519 requires 32 bytes secret key, 32 bytes public key + 16 bytes overhead = 80 bytes<\/li>\n<\/ul>\n<h2>Use Cases<\/h2>\n<h3>DNSSEC<\/h3>\n<h4>Number of keys<\/h4>\n<ul>\n<li>TLD (or provider using key sharing) requires ~ 100 key pairs<\/li>\n<li>3 KSK per zone (previous, current, new)<\/li>\n<li>3 ZSK per zone (previous, current, new)<\/li>\n<\/ul>\n<h4>Possibly dual algorithms<\/h4>\n<ul>\n<li>A typical TLD operator usually has less than 10 TLDs<\/li>\n<li>Other DNS providers may use key sharing to limit number of keys required<\/li>\n<\/ul>\n<h4>Algorithms<\/h4>\n<ul>\n<li>RSA-1024\/SHA-256<\/li>\n<li>RSA-2048\/SHA-256<\/li>\n<li>EC-P256\/SHA-256<\/li>\n<\/ul>\n<h4>Performance<\/h4>\n<p>Each update to a zone requires 3-4 signatures (per algorithm)<\/p>\n<ul>\n<li>Resign SOA (signed by ZSK)<\/li>\n<li>Resign updated RR (signed by ZSK)<\/li>\n<li>Resign NSEC\/NSEC3 (signed by ZSK), may require multiple signatures<\/li>\n<\/ul>\n<p>Non-interactive latency (batch), dynamic updates may require faster signing<\/p>\n<h3>SAML<\/h3>\n<h4>Number of keys<\/h4>\n<p>SAML federation operator requires max 10 key pairs (including space for roll)<\/p>\n<h4>Algorithms<\/h4>\n<ul>\n<li>RSA-2048\/SHA-256<\/li>\n<\/ul>\n<h4>Performance<\/h4>\n<ul>\n<li>Non-interactive latency (batch)<ul>\n<li>non-MDX: \u2026<\/li>\n<\/ul>\n<\/li>\n<li>Interactive latency<ul>\n<li>MDX: \u2026<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3>PKIX (including RPKI)<\/h3>\n<h4>Number of keys<\/h4>\n<ul>\n<li>Typical Certification Authority ~ 10 key pairs<ul>\n<li>CA key, OCSP, CRL per level in the CA<\/li>\n<li>Root CA is one level<\/li>\n<li>For subordinate CAs, perhaps 2-5 CAs in a HSM is reasonable?<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h4>Algorithms<\/h4>\n<ul>\n<li>RSA-2048\/SHA-256<\/li>\n<li>RSA-4096\/SHA-256<\/li>\n<li>RSA-4096\/SHA-512 ?<\/li>\n<li>EC-P256\/SHA-256<\/li>\n<\/ul>\n<h4>Performance<\/h4>\n<ul>\n<li>Non-interactive latency<ul>\n<li>Root CA: Less than 1 signature per day<\/li>\n<li>Issuing CA: One signature per issued certificate<\/li>\n<li>CRL: Less than 1 signature per hour<\/li>\n<\/ul>\n<\/li>\n<li>Interactive latency<ul>\n<li>OCSP: Multiple signatures per second<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3>Tor<\/h3>\n<p>Requirements according to (section 1): https:\/\/gitweb.torproject.org\/torspec.git\/plain\/dir-spec.txt<\/p>\n<h4>Number of keys<\/h4>\n<ul>\n<li>1 private key<\/li>\n<li>10 public keys<\/li>\n<\/ul>\n<h4>Algorithms<\/h4>\n<ul>\n<li>RSA-2048\/SHA-1 ?<\/li>\n<li>RSA-2048\/SHA-256<\/li>\n<li>RSA-4096\/SHA-256 ?<\/li>\n<li>RSA-4096\/SHA-512 ?<\/li>\n<\/ul>\n<h4>Performance<\/h4>\n<ul>\n<li>2 signatures per hour<\/li>\n<li>20 verification operations per hour<\/li>\n<li>1 second max latency for RSA-2048 based verification<\/li>\n<\/ul>\n<h3>Certificate Transparency (CT)<\/h3>\n<h4>Number of keys<\/h4>\n<p>CT requires 1 key (ECDSA or RSA) per log<\/p>\n<h4>Algorithms<\/h4>\n<ul>\n<li>RSA-2048\/SHA-256<\/li>\n<li>RSA-4096\/SHA-256 ?<\/li>\n<li>RSA-4096\/SHA-512 ?<\/li>\n<li>EC-P256\/SHA-256<\/li>\n<\/ul>\n<h4>Performance<\/h4>\n<ul>\n<li>A Certificate Transparency log uses one ECDSA or one RSA key to sign two separate documents:<\/li>\n<li>STH's might need to be signed once per hour<\/li>\n<li>SCT's might need to be signed once per second (*)<\/li>\n<\/ul>\n<p>See RFC 6962, section 2.1.4 \u2013 https:\/\/tools.ietf.org\/html\/rfc6962<\/p>\n<h2>Internal Functional Requirements<\/h2>\n<h3>Algorithms and functions<\/h3>\n<ul>\n<li>Key wrapping using AES-256 with SIV, http:\/\/tools.ietf.org\/html\/rfc5297<\/li>\n<li>Internal Storage Master Key (ISMK) in battery backed RAM connected to FPGA<ul>\n<li>Battery connection controlled by tamper mechanism<\/li>\n<li>Active erasure controlled by tamper mechanism<\/li>\n<\/ul>\n<\/li>\n<li>32-bit high quality random number generation<\/li>\n<\/ul>\n<h3>PKCS11<\/h3>\n<p>The following PKCS11 mechanisms are required to fulfill the aforementioned use cases:<\/p>\n<ul>\n<li>RSA<ul>\n<li>CKM_RSA_PKCS_KEY_PAIR_GEN<\/li>\n<li>CKM_RSA_PKCS<\/li>\n<li>CKM_RSA_X_509 ?<\/li>\n<li>CKM_SHA256_RSA_PKCS<\/li>\n<li>CKM_SHA512_RSA_PKCS ?<\/li>\n<\/ul>\n<\/li>\n<li>ECDSA<ul>\n<li>CKM_EC_KEY_PAIR_GEN<\/li>\n<li>CKM_ECDSA<\/li>\n<\/ul>\n<\/li>\n<li>AES<ul>\n<li>\u2026 TBD \u2026<\/li>\n<\/ul>\n<\/li>\n<li>Random<ul>\n<li>\u2026 TBD \u2026<\/li>\n<\/ul>\n<\/li>\n<li>Key Wrapping<ul>\n<li>\u2026 TBD \u2026<\/li>\n<\/ul>\n<\/li>\n<li>Hash<ul>\n<li>CKM_SHA256<\/li>\n<li>CKM_SHA512 (?)<\/li>\n<\/ul>\n<\/li>\n<\/ul>","category":{"@attributes":{"term":"misc"}}},{"title":"Welcome to the Cryptech Project","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/","rel":"alternate"}},"published":"2016-12-15T20:46:00+00:00","updated":"2017-05-13T20:30:00+00:00","author":{"name":"Cryptech Core Team"},"id":"tag:wiki.cryptech.is,2016-12-15:\/","summary":"<h1>Overview<\/h1>\n<p>Recent revelations have called into question the integrity of some of\nthe implementations of basic cryptographic functions and devices used to\nsecure communications on the Internet. There are serious questions about\nalgorithms and about implementations of those algorithms in software and\nparticularly hardware. The goal of the <a href=\"https:\/\/cryptech.is\">CrypTech<\/a>\nproject \u2026<\/p>","content":"<h1>Overview<\/h1>\n<p>Recent revelations have called into question the integrity of some of\nthe implementations of basic cryptographic functions and devices used to\nsecure communications on the Internet. There are serious questions about\nalgorithms and about implementations of those algorithms in software and\nparticularly hardware. The goal of the <a href=\"https:\/\/cryptech.is\">CrypTech<\/a>\nproject is to provide some possible answers to those questions by\ndeveloping an open-source hardware cryptographic engine that meets the\nneeds of high assurance Internet infrastructure systems that use\ncryptography.<\/p>\n<p>The algorithmic issues are in the domain of the heavy math cryptography\nfolk; the implementation issues are the primary focus of the project.\nThe open-source hardware cryptographic engine must be of general use to\nthe broad Internet community, covering needs such as secure email, web,\nDNS, PKIs, etc.<\/p>\n<p>The intent of the project is that the final open-source hardware cryptographic\nengine can be built by anyone from public hardware specifications and\nopen-source firmware. Anyone can then operate it without fees of any\nkind.<\/p>\n<h1>About Us<\/h1>\n<p><a href=\"https:\/\/cryptech.is\">CrypTech.IS<\/a> is a loose international collective\nof <a href=\"https:\/\/wiki.cryptech.is\/WhoWeAre\">engineers<\/a> trying to improve assurance and privacy on the\nInternet. It is funded diversely and is administratively quartered outside\nthe US.<\/p>\n<p>We are actively seeking use cases for an initial project which is to\nproduce a design of an open and auditable Hardware Security Module (HSM)\nand supporting software.<\/p>\n<p>We are also considering the issues around assurance of a tool-chain,\nfrom compiler to operating system and as close to the hardware as we can\nreasonably get.<\/p>\n<p>The project solicits functional requirements from a wide range of\norganizations. It will focus on the classic low level cryptographic\nfunctions and primitives, and not get drawn into re-implementation of\napplication protocol layers.<\/p>\n<p>We hope that a group of interested organizations will offer funding\nfor development, and that the IACR and public sector cryptographers will\nprovide algorithmic advice and wide and open review. If you or your\norganization is interested in helping this effort, please consider\noffering <a href=\"https:\/\/cryptech.is\/funding\/\">financial support<\/a> to keep the\nwork flowing.<\/p>\n<h1>More Information<\/h1>\n<h2><a href=\"https:\/\/wiki.cryptech.is\/QuickStart\">Quick Start Guide<\/a><\/h2>\n<ul>\n<li>including pointers to the git repositories, information on how to set up and configure the board and software, and HSM requirements<\/li>\n<\/ul>\n<h2><a href=\"https:\/\/wiki.cryptech.is\/DevelopersGuide\">Developers Guide<\/a><\/h2>\n<ul>\n<li>including the architecture diagrams, and known information<\/li>\n<\/ul>\n<h2><a href=\"https:\/\/wiki.cryptech.is\/ProjectStatus\">Project Status<\/a><\/h2>\n<ul>\n<li>including information on the chip design and prototypes as well as the pilot project(s)<\/li>\n<\/ul>\n<h2><a href=\"https:\/\/wiki.cryptech.is\/ProjectMetadata\">Project Metadata<\/a><\/h2>\n<ul>\n<li>including information on presentations and meeting notes, technical references, and related work<\/li>\n<\/ul>\n<h2><a href=\"https:\/\/wiki.cryptech.is\/ProjectArchive\">Project Archive<\/a><\/h2>\n<ul>\n<li>including information on dormant and far-future work<\/li>\n<\/ul>","category":{"@attributes":{"term":"misc"}}},{"title":"CrypTech Alpha Board BOM and PCB design requirement sketch","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/AlphaBoardComponents","rel":"alternate"}},"published":"2015-03-09T00:00:00+00:00","updated":"2015-03-25T00:00:00+00:00","author":{"name":"Joachim Str\u00f6mbergson"},"id":"tag:wiki.cryptech.is,2015-03-09:\/AlphaBoardComponents","summary":"<p>This document contains a list of component level description and requirements for the Crypteh Alpha board.<br\/>\nThe document is to be used as a BOM (Bill Of Materials) and PCB design requirement description for discussing with PCB designers on what we want to have designed.<br\/>\nThe block diagram for the \u2026<\/p>","content":"<p>This document contains a list of component level description and requirements for the Crypteh Alpha board.<br\/>\nThe document is to be used as a BOM (Bill Of Materials) and PCB design requirement description for discussing with PCB designers on what we want to have designed.<br\/>\nThe block diagram for the Alpha board can be seen at: <a href=\"https:\/\/wiki.cryptech.is\/Hardware\">Hardware<\/a><\/p>\n<p>The Alpha board basically consists of three major sub systems:<br\/>\n1. <strong>The FPGA Sub System<\/strong><br\/>\n   Used to implement CrypTech crypto\/security cores accessible by the CPU as coprocessors.<br\/><\/p>\n<ol>\n<li>\n<p><strong>The CPU Sub System<\/strong><br\/>\n   Talks to host systems and handles incoming commands. Basically implements the application interface.\n   Controls the FPGA Sub System. The CPU Sub System is heavily inspired\/based on the CPU parts of the Novena and the iMX6 Rex boards.<br\/><\/p>\n<\/li>\n<li>\n<p><strong>The Tamper Detect Sub System<\/strong><br\/>\n   Responsible for implementing tamper detection and control\/alarm as a separate functionality from the CPU.\n   On the Alpha board this system is fairly simplistic. But we want to at least have a minor MCU that can run\n   independently on battery power and control the Master Key Memory (MKM). detect external events and generate\n   alarms. This allows us to start developing and reason about tamper detection and monitoring separately from the CPU.<\/p>\n<\/li>\n<\/ol>\n<p>The Alpha board should preferably be a single board with all three sub systems on the same board.<\/p>\n<p>We are currently using the <a href=\"http:\/\/www.kosagi.com\/w\/index.php?title=Novena_Main_Page\">Novena<\/a> board, and the Alpha board CPU Sub System functionality from is based on the Novena. We also have a trust in the <a href=\"http:\/\/www.imx6rex.com\/\">iMX6 Rex<\/a> board. Using the the Novena and\/or iMX6 Rex as basis for the Alpha board design might (should) be a good way forward.<\/p>\n<h3>Authors and timeline\/revision history<\/h3>\n<p>Joachim Str\u00f6mbergson, Fredrik Thulin<\/p>\n<ul>\n<li>2015-03-25: Updates from group and maillist discussions. Sync with the diagram.<\/li>\n<li>2015-03-16: Updates from group discussions.<\/li>\n<li>2015-03-09: Work started. Initial versions with headers for all blocks.<\/li>\n<\/ul>\n<h1>FPGA Sub System<\/h1>\n<h3>FPGA<\/h3>\n<p>The board should be equipped with a Xilinx Artix-7 200T FPGA device, more specifically XC7A200T FBG484 speed grade -3.<\/p>\n<ul>\n<li><a href=\"http:\/\/www.xilinx.com\/products\/silicon-devices\/fpga\/artix-7.html\">Xilinx Artix-7 XC7A200T FBG484.<\/a><br\/><\/li>\n<li><a href=\"http:\/\/www.xilinx.com\/support\/documentation\/data_sheets\/ds180_7Series_Overview.pdf\">Product family overview<\/a><br\/><\/li>\n<\/ul>\n<p>The FPGA pad layout should be compatible with the Xilinx Artix-7 FGG484 used by XC7A100T and XC7A75T.<\/p>\n<h3>FPGA Clocking and Reset<\/h3>\n<ul>\n<li>There should be a separate clock, fpga_clk, for the FPGA that starts providing a clock signal at power up. The base frequency for fpga_clk should be 50 MHz.<\/li>\n<li>There should be a separate reset circuitry for the FPGA that resets the FPGA at power up and make the FPGA read the configuration from the confguration memory.<\/li>\n<li>The ARM CPU should be able to reset the FPGA to force it reload the confiuration from configuration memory. The CPUY should be able to reset the FPGA by asserting a GPIO. The ability of the CPU to force reset should be possible to remove by removing a jumper.<\/li>\n<\/ul>\n<h3>FPGA CPU Interface<\/h3>\n<ul>\n<li>The FPGA is connected to the CPU using the i.MX6 EIM interface.<\/li>\n<li>The data width is 16 bits.<\/li>\n<li>The address width is 24 bits.<\/li>\n<li>The data bus and address bus should be separate buses between the CPU and the FPGA.<\/li>\n<li>The clock frequency of the EIM interface layout should support 66 MHz clock frequency.<\/li>\n<li>There should be at least three separate digital signals connected between the FPGA and GPIOs on the CPU to be able to send interrupt\/events from the FPGA to the CPU. Things like RSA operation completed to internal alarms. (Slow signals.)<\/li>\n<\/ul>\n<h3>FPGA Debug Interface<\/h3>\n<ul>\n<li>The FPGA JTAG interface should be available on a header. The header shall be compatible with the <a href=\"http:\/\/www.xilinx.com\/support\/documentation\/data_sheets\/ds593.pdf\">Xilinx Platform Cable USB II<\/a>.<\/li>\n<\/ul>\n<h3>FPGA Extras<\/h3>\n<ul>\n<li>8 LEDs connected to output pins on the FPGA. For general debug uses.<\/li>\n<li>4 LEDs connected to output pins on the FPGA. For heartbeat and status signalling.<\/li>\n<li>100-mil header with VCC+GND+8 pins connected to pins on the FPGA for general input\/output. Slow speed, 3v3 TTL. Some ESD protection would be considered good.<\/li>\n<\/ul>\n<h3>FPGA Configuration and Configuration Memory<\/h3>\n<ul>\n<li>The FPGA should read it's bitstream from the FPGA config memory by itself (Master mode).<\/li>\n<li>\n<p>The FPGA is connected to the config memory with an SPI interface.<\/p>\n<\/li>\n<li>\n<p>The ARM CPU should be able to download a bitstream into config memory by stealing the SPI interface.<\/p>\n<\/li>\n<li>\n<p>The ability to steal the SPI interface is implemented using a transparent MUX controlled by the CPU. The MUX control and the SPI interface to the MUX from the CPU should be possible to remove by removing jumper for the signals mux_ctrl, MISO, MOSI, MCLK.<\/p>\n<\/li>\n<li>\n<p>Suggestion for FPGA config memory is <a href=\"http:\/\/www.micron.com\/parts\/nor-flash\/serial-nor-flash\/m25p128-vme6gb\">M25P128 EEPROM from Micron<\/a>, with a jumper controlling the write-enable pin.<\/p>\n<\/li>\n<li>Suggested MUX is the Quad 2-channel Analog Switch: ON Semi. MC14551B <a href=\"http:\/\/www.onsemi.com\/pub_link\/Collateral\/MC14551B-D.PDF\">http:\/\/www.onsemi.com\/pub_link\/Collateral\/MC14551B-D.PDF<\/a><\/li>\n<\/ul>\n<h3>External RAM and Flash<\/h3>\n<p>No external RAM or Flash memories for FPGA application functionality shall be present and is connected to the FPGA on the Alpha board.<\/p>\n<h3>Master Key Memory<\/h3>\n<ul>\n<li>The Master Key Memory (MKM) is a serial SRAM memory.<\/li>\n<li>The MKM is connected to the FPGA with a SPI interface.\n  The MKM is connected to the Tamper Sub System with the same SPI interface.<\/li>\n<li>The FPGA can read and write to the memory.<\/li>\n<li>The Tamper Sub System controller can read and writeto the memory. Optionally the MISO input wire to the Tamper Sub System can be tied low by setting using a jumper. This should cause the tamper controller to only read zeros from the memory and thus only be able to write to the memory. The Tamper Sub System Controller has strict priority over the CPU. Basically an external switch between the memory, the controller and CPU.<\/li>\n<li>The MKM is powered by a separate power supply using a CR2032 cell battery. The VCC pin connected to the battery should be under control from the Tamper Sub System controller. A transistor or analog switch controlled by the Tamper Sub System controller.<\/li>\n<\/ul>\n<p>Suggested components for the MKM and the switch:<\/p>\n<ul>\n<li>Memory: Microchip serial SRAM. 23A640, 8 kByte, 8-TSSOP or 8-SOIC<\/li>\n<\/ul>\n<p><a href=\"http:\/\/ww1.microchip.com\/downloads\/en\/DeviceDoc\/22127a.pdf\">http:\/\/ww1.microchip.com\/downloads\/en\/DeviceDoc\/22127a.pdf<\/a><br\/><\/p>\n<ul>\n<li>Quad 2-channel Analog Switch: ON Semi. MC14551B<\/li>\n<\/ul>\n<p><a href=\"http:\/\/www.onsemi.com\/pub_link\/Collateral\/MC14551B-D.PDF\">http:\/\/www.onsemi.com\/pub_link\/Collateral\/MC14551B-D.PDF<\/a><\/p>\n<h3>Entropy Sources<\/h3>\n<ul>\n<li>The avalanche noise entropy source should be implemented according to <a href=\"https:\/\/wiki.cryptech.is\/AlphaBoardComponents\/AlphaBoardComponents\/alpha_board_noise_source.pdf\">existing schematics<\/a>.<\/li>\n<li>The noise source should have a shielding can and suitable ground plane etc. to keep radiation of entropy bits as low as possible.<\/li>\n<li>The \"12-15v stable\" VCC should be controllable by the FPGA (enable\/disable  controlled by output pin on FPGA) to increase life time of components.\n  Power requirements for this VCC is &lt; 100 mA (needs measuring, but probably &lt; 50 mA).<\/li>\n<\/ul>\n<h1>Processor Sub System<\/h1>\n<h3>CPU<\/h3>\n<p>The main CPU is a ST Microelectronics STM32F429BIT6 Cortex-M4 based MCU running at 180 MHz. The package used is the 208 pin LQFP.<\/p>\n<ul>\n<li><a href=\"http:\/\/www.st.com\/st-web-ui\/static\/active\/en\/resource\/technical\/document\/reference_manual\/DM00031020.pdf\">Reference Manual<\/a> (pdf)<\/li>\n<li><a href=\"http:\/\/www.st.com\/st-web-ui\/static\/active\/en\/resource\/technical\/document\/datasheet\/DM00077036.pdf\">Product Specification<\/a> (pdf)<\/li>\n<li><a href=\"http:\/\/www.st.com\/st-web-ui\/static\/active\/en\/resource\/technical\/document\/datasheet\/DM00077036.pdf\">Data Sheet<\/a> (pdf)<\/li>\n<\/ul>\n<h3>Host Interface<\/h3>\n<ul>\n<li>USB interface. USB 2.0 Full Speed compliant.<\/li>\n<li>USB interface implemented using an external USB-UART interface chip connected to a high speed (3 Mbps capable) UART interface on the CPU.<\/li>\n<li>Suggested USB-UART component:<\/li>\n<li>http:\/\/www.ftdichip.com\/Support\/Documents\/DataSheets\/ICs\/DS_FT232H.pdf<\/li>\n<li>LQPF48 packaging<\/li>\n<\/ul>\n<h3>Authenticator, Management and Backup Interface<\/h3>\n<ul>\n<li>USB interface. USB 2.0 Full Speed compliant.<\/li>\n<li>USB interface implemented using an external USB-UART interface chip connected to a high speed (3 Mbps capable) UART interface on the CPU.<\/li>\n<li>Suggested USB-UART component:<\/li>\n<li>http:\/\/www.ftdichip.com\/Support\/Documents\/DataSheets\/ICs\/DS_FT232H.pdf<\/li>\n<li>LQPF48 packaging<\/li>\n<\/ul>\n<h3>External Storage<\/h3>\n<ul>\n<li>SD Card connected as Micro SD card with 4 bit data interface (like the Novena.)<\/li>\n<li>Support for at least 2 GByte.<\/li>\n<\/ul>\n<h3>External RAM<\/h3>\n<p>The STM32 CPU supports two separate SDRAM banks. We use both of them with as big SDRAM chips we can find for each bank. The chip used is 64 MByte for a total of 128 Mbyte RAM.<\/p>\n<ul>\n<li><a href=\"http:\/\/www.issi.com\/WW\/pdf\/42-45R-S-32160F.pdf\">ISSI IS45S32160F 64 MByte SDRAM with 32 bit data interface<\/a><\/li>\n<\/ul>\n<h3>Real Time Clock<\/h3>\n<ul>\n<li>Battery backed RTC with calendar\/date information.\n  Connected to the CPU via serial, SPI or other interface.<\/li>\n<li>Suggested chip: Microchip MCP79411 or MCP79412 connected to the CPU via I2C.\n  <a href=\"http:\/\/www.microchip.com\/wwwproducts\/Devices.aspx?product=MCP79411\">http:\/\/www.microchip.com\/wwwproducts\/Devices.aspx?product=MCP79411<\/a><br\/>\n  <a href=\"http:\/\/ww1.microchip.com\/downloads\/en\/DeviceDoc\/20002266G.pdf\">http:\/\/ww1.microchip.com\/downloads\/en\/DeviceDoc\/20002266G.pdf<\/a><br\/>\n  This chip requires an external 32 kHz crystal.<\/li>\n<li>Note: these chips contain per chip unique IDs as well as small EEPROM memory that can be memory protected.<\/li>\n<\/ul>\n<h3>Keystore<\/h3>\n<ul>\n<li>The keystore memory is a non volatile memory (NVRAM, EEPROM, Flash) with size of at least 8 MByte<\/li>\n<li>The keystore memory is connected to the CPU via a separate SPI interface.<\/li>\n<\/ul>\n<h3>CPU Debug port<\/h3>\n<ul>\n<li>CPU JTAG on header.<\/li>\n<\/ul>\n<h3>CPU Misc<\/h3>\n<ul>\n<li>Four LEDs conneced to the GPIOs on the CPU to allow heartbeat as well as status and debug signalling.<\/li>\n<li>We want 8 general I\/Os with direction controlled by the CPU. The I\/O:s should be present on a header. One purpose for these I\/O:s is to connect:<\/li>\n<li>Keypad and LCD display<\/li>\n<li>Smartcart reader via I2C<\/li>\n<li>Bitbanged serial port for debugging<\/li>\n<\/ul>\n<p>We may implement this keypad, smartcard reader and display using a simple MCU based board.<\/p>\n<h3>CPU Interfaces Needed<\/h3>\n<p>SPI Interfaces<\/p>\n<ul>\n<li>FPGA Config memory<\/li>\n<li>Key storage memory<\/li>\n<li>Master Key memory<\/li>\n<\/ul>\n<p>FPGA Interface<\/p>\n<ul>\n<li>EIM interface<\/li>\n<\/ul>\n<p>Asynch serial ports (UARTs)<\/p>\n<ul>\n<li>Host interface (high speed)<\/li>\n<li>Management interface (high speed)<\/li>\n<li>Tamper Sub System<\/li>\n<\/ul>\n<p>Memory Interfaces<\/p>\n<ul>\n<li>DDR3<\/li>\n<li>External SD Flash memory<\/li>\n<\/ul>\n<p>GPIOs<\/p>\n<ul>\n<li>3 signals from FPGA to CPU for signalling<\/li>\n<li>1 signal from CPU to FPGA reset circuit to force reset<\/li>\n<li>1 signal from CPU to FPGA confgig mem mux for control<\/li>\n<li>3 signals from Tamper Sub System controller to CPU<\/li>\n<\/ul>\n<h1>Tamper Sub System<\/h1>\n<p>The Tamper Sub System on the Alpha Board is simplistic and does not do a lot of detection. But the sub system should be there to allow us to test and develop tamper detection mechanisms.<\/p>\n<h3>Tamper Sub System Controller<\/h3>\n<ul>\n<li>A simple 8-bit MCU. Atmel AVR.<\/li>\n<li>Suggested chip: ATTINY828R-AU. Has 28 GPIOs which is definitely more than we've used for this design.<\/li>\n<li>The Tamper Detection Sub System Controlller may need a separate 32 kHz crystal for periodical wake up.\n  (The MCU should be able to wake up based on internal clock source.)<\/li>\n<li>The JTAG interface for debug and firmware download should be accessible via a header.<\/li>\n<li>The MCU should at least have four LEDs under GPIO control to allow heartbeat, status and debug signalling.<\/li>\n<\/ul>\n<h3>CPU interface<\/h3>\n<ul>\n<li>A simple serial (UART) interface between the CPU and the controller. The serial interface can be removed by removing jumpers.<\/li>\n<li>One or a couple separate signals for event signalling from the Tamper Detection Sub System to the CPU Sub System. Slow speed 3V3 LVTTL.<\/li>\n<\/ul>\n<h3>Tamper Detection Mechanisms<\/h3>\n<ul>\n<li>A separate push button connected to the controller.<\/li>\n<li>Possibly using the internal temperature detection in the MCU.<\/li>\n<li>At least four digital input pins on a header for four different digital (HIGH) tamper detection mechanisms.<\/li>\n<li>At least two digital output pins on a header for four different digital (HIGH) tamper alarms.<\/li>\n<\/ul>\n<h3>Tamper Power Supply<\/h3>\n<ul>\n<li>Battery backed. CR2032 cell battery.<\/li>\n<\/ul>\n<h1>Board Form Factor and Power Supply<\/h1>\n<h2>Form factor<\/h2>\n<p>Reasonable small to easily fit all functionality\nHoles to allow mounting the boards using board distances.<\/p>\n<h2>Power Supply<\/h2>\n<p>Power Supply similar to the Power Supply on the Novena.\n7-19V nominal range. 2.5A typical. Max 3A at 12V.<\/p>\n<p>The board is powered from 18V (or 24V) DC from a standard external power supply.\nIt should be possible to power the board with a external 110V AC at 60 Hz and 230V AC at 50 Hz.<\/p>\n<p>The on board power supply block should provide a number of voltage supplies needed by the board. We need at least 5V, 3.3V, 2.5V 1.8V, 1.375V.\nWe also need a stable, low noise 12V voltage supply to power the Cryptech Avalanche noise source.<\/p>\n<p>The board designer should provide information about the power consumtion for the board. What is the current required at 12V?<\/p>","category":{"@attributes":{"term":"AlphaBoard"}}},{"title":"A Completely Informal Snapshot Of The Current State Of The Cryptech Project As Of 2014-11-06","link":{"@attributes":{"href":"https:\/\/wiki.cryptech.is\/StateOfPlay","rel":"alternate"}},"published":"2014-11-06T00:00:00+00:00","updated":"2014-11-06T00:00:00+00:00","author":{"name":"Cryptech Core Team"},"id":"tag:wiki.cryptech.is,2014-11-06:\/StateOfPlay","summary":"<p>This page contains a snapshot of the status in the project and will almost certainly be obsolete by the time you read it.  If you find something that's wrong, please fix it!<\/p>\n<h2>Cores<\/h2>\n<p>We have a bunch of cores, primarily for FPGA implementation.  Some of them implement cryptographic\nalgorithms or \u2026<\/p>","content":"<p>This page contains a snapshot of the status in the project and will almost certainly be obsolete by the time you read it.  If you find something that's wrong, please fix it!<\/p>\n<h2>Cores<\/h2>\n<p>We have a bunch of cores, primarily for FPGA implementation.  Some of them implement cryptographic\nalgorithms or critical functionality like the TRNG. Other cores are support cores for implementation of the Cryptech HSM. Other cores are for developing the cores and the HW. Finally some are just test\ncode.<\/p>\n<p>Cores that have been promoted to official cryptech HW cores:<\/p>\n<ul>\n<li><code>core\/chacha<\/code> - The ChaCha stream cipher<\/li>\n<li><code>core\/sha1<\/code> - FIPS 180-2 SHA-1 hash<\/li>\n<li><code>core\/sha256<\/code> - FIPS 180-4 SHA-256 hash<\/li>\n<li><code>core\/sha512<\/code> - FIPS 180-4 SHA-512\/x hash<\/li>\n<li><code>core\/trng<\/code> - The Cryptech TRNG sub system. Uses ChaCha, SHA-512 and entropy cores.<\/li>\n<li><code>core\/avalanche_entropy<\/code> - Avalanche entropy provider core. Requires external avalanche noise source.<\/li>\n<li><code>core\/rosc_entropy<\/code> - Digital ring oscillator based entropy provider core.<\/li>\n<\/ul>\n<p>Utility, test, board support:<\/p>\n<ul>\n<li><code>core\/coretest<\/code> - Core for performing command\/response operations to drive testing of a core.<\/li>\n<li><code>core\/coretest_hashes<\/code> - Subsysem with coretest and the hash function cores as test objects.<\/li>\n<li><code>core\/coretest_test_core<\/code> - Coretest with a simple test core<\/li>\n<li><code>core\/i2c<\/code> - I2C interface core.<\/li>\n<li><code>core\/novena<\/code><\/li>\n<li><code>core\/novena_eim<\/code><\/li>\n<li><code>core\/novena_i2c_simple<\/code><\/li>\n<li><code>core\/test_core<\/code><\/li>\n<li><code>core\/uart<\/code>- UART interface core to allow serial communication with FPGA functionality.<\/li>\n<li><code>core\/vndecorrelator<\/code> - von Neumann decorrelation core.<\/li>\n<\/ul>\n<p>Documentation is very haphazard: some of the repositories have\ndetailed README.md files, but in many cases the documentation, what\nthere is of it, is probably meaningful only to the person who wrote\nit, not because of any lack of good intent, just because what's\nwritten assumes that the reader knows everything that the author does\nabout the other cores, the rest of the environment, and how everything\nfits together.<\/p>\n<h2>Builds<\/h2>\n<p>At this point I have figured out how to build two different FPGA\nimages for the Novena PVT1.  In both cases, I'm using the Makefile\nrather than attempting to use the XiLinx GUI environment.<\/p>\n<ul>\n<li>\n<p><code>core\/novena<\/code> builds the current set of digest cores into a\n  framework that uses the \"coretest\" byte stream protocol over an I2C\n  bus.<\/p>\n<\/li>\n<li>\n<p><code>core\/novena_i2c_simple<\/code> builds the current set of digest cores into\n  a framework that uses a simplfied write()\/read() API over an I2C bus.<\/p>\n<\/li>\n<\/ul>\n<p>There's a third build, <code>core\/novena_eim<\/code>, which was only just updated\ntoday, and which is reported as not quite stable yet.  Will try\nbuilding it soon and report here.<\/p>\n<p>Both working builds (and, almost certainly, any useful build) involve\nmore than just the named repository.  <code>verilator<\/code>, when asked nicely,\nwill draw a graph of Verilog module relationships.  Take this with\nsalt, as I am a long way from getting <code>verilator<\/code> to run cleanly on\nany of this, but the current graphs may still be useful in visualizing\nwhat's happening here.<\/p>\n<p>At least some of the modules that <code>verilator<\/code> complains about not\nbeing able to find appear to come from XiLinx libraries that\n<code>verilator<\/code> doesn't know about.\nSee <a href=\"http:\/\/www.xilinx.com\/support\/documentation\/sw_manuals\/xilinx12_1\/spartan6_hdl.pdf\">Spartan-6 Libraries Guide for HDL Designs<\/a> for details.<\/p>\n<h3>Module relationships in core\/novena build<\/h3>\n<p><img alt=\"novena__linkcells.svg\" src=\"https:\/\/wiki.cryptech.is\/StateOfPlay\/StateOfPlay\/novena__linkcells.svg\"><\/p>\n<h3>Module relationships in core\/novena_i2c_simple build<\/h3>\n<p><img alt=\"novena_i2c_simple__linkcells.svg\" src=\"https:\/\/wiki.cryptech.is\/StateOfPlay\/StateOfPlay\/novena_i2c_simple__linkcells.svg\"><\/p>\n<h3>Module relationships in core\/novena_eim build<\/h3>\n<p><img alt=\"novena_eim__linkcells.svg\" src=\"https:\/\/wiki.cryptech.is\/StateOfPlay\/StateOfPlay\/novena_eim__linkcells.svg\"><\/p>\n<h3>Module relationships in cores\/trng build<\/h3>\n<p>By special request, here's a graph for the TRNG too, even though we\ndon't yet have a way to speak to it from the Novena:<\/p>\n<p><img alt=\"trng__linkcells.svg\" src=\"https:\/\/wiki.cryptech.is\/StateOfPlay\/StateOfPlay\/trng__linkcells.svg\"><\/p>\n<h2>C Code<\/h2>\n<p>Most of the cores have at least minimal test frameworks, written in a\ncombination of Verilog, C, and Python, but there's also a preliminary\nport of Cryptlib to the Cryptech environment, in <code>sw\/cryptlib<\/code>.  As of\nthis writing, the only Cryptech-specific features of this port, other\nthan a few makefile tricks, are:<\/p>\n<ul>\n<li>\n<p>A set of HALs that make use of the <code>core\/novena<\/code> and\n  <code>core\/novena_i2c_simple<\/code> FPGA builds, using the Linux \/dev\/i2c\n  device interface; and<\/p>\n<\/li>\n<li>\n<p>Another Python script to test the resulting Cryptlib build, using\n  the stock Cryptlib Python bindings.<\/p>\n<\/li>\n<\/ul>\n<p>No HAL for <code>core\/novena_eim<\/code> yet.<\/p>\n<p>The Cryptlib Python bindings build kind of slowly on the Novena, sorry\nabout that.<\/p>\n<h2>Hardware<\/h2>\n<p>The hardware guys have done cool stuff with hardware entropy sources.\nI even have one of the noise boards, but until I have some way to\nconnect C code to the TRNG, I don't have much use for it other than to\nadmire the craftsmanship.  Soon, I hope.<\/p>\n<h2>Tools<\/h2>\n<p>Already mentioned <code>verilator<\/code>.  In addition to generating GraphViz\ninput, <code>verilator<\/code> has a <code>--lint<\/code> mode which looks interesting.<\/p>\n<p>(JS) Verilator is fairly usable, at least as a linter. Adding <code>-Wall<\/code> provides more warnings.\nSince we at least uses Icarus Verilog (iverilog), Altera Quartus and Xilinx ISE one would assume that they would provide all possible warnings. That is not the case. They all seem to fins different things to warn about. And Verilator provides even more. The more parsers and checkers the better. But we will not be able to, or want to fix all warnings. Some things are by design. We should probably document what we ignore.<\/p>\n<p>I haven't yet figured out whether we have any real use for\n<code>verilator<\/code>'s core function of synthesizing Verilog into C++.  I've\nbeen toying with the idea of a software-only development environment,\nwhere one simulates an embedded machine using two Unix processes: one\nwould be a virtual FPGA generated by <code>verilator<\/code>, the other would be a\nclassical deeply embedded system running as a single process.  The two\nprocesses would communicate via a <code>PF_UNIX<\/code> socket or something on\nthat order.  It might be possible to jam everything into a single\nprocess, but I suspect it wouldn't be worth the trouble.<\/p>\n<p>Joachim has Makefiles which use <code>iverilog<\/code> to generate simulation\nimages.  Installing <code>iverilog<\/code> is easy enough (<code>apt-get install<\/code>, etc)\nbut I haven't yet figured out how to do anything interesting with the\nsimulation images.  Joachim replies:<\/p>\n<div class=\"highlight\"><pre><span><\/span><code><span class=\"nv\">There<\/span><span class=\"w\"> <\/span><span class=\"nv\">is<\/span><span class=\"w\"> <\/span><span class=\"nv\">help<\/span><span class=\"w\"> <\/span><span class=\"nv\">in<\/span><span class=\"w\"> <\/span><span class=\"nv\">the<\/span><span class=\"w\"> <\/span><span class=\"nv\">Makefile<\/span>.<span class=\"w\">  <\/span><span class=\"nv\">You<\/span><span class=\"w\"> <\/span><span class=\"nv\">run<\/span><span class=\"w\"> <\/span><span class=\"nv\">the<\/span><span class=\"w\"> <\/span><span class=\"nv\">targets<\/span>,<span class=\"w\"> <\/span><span class=\"nv\">either<\/span><span class=\"w\"> <\/span><span class=\"nv\">as<\/span>\n<span class=\"nv\">make<\/span><span class=\"w\"> <\/span><span class=\"nv\">sim<\/span><span class=\"o\">-<\/span><span class=\"nv\">foo<\/span><span class=\"w\"> <\/span><span class=\"nv\">or<\/span><span class=\"w\"> <\/span><span class=\"nv\">just<\/span><span class=\"w\"> <\/span>.<span class=\"o\">\/<\/span><span class=\"nv\">foo<\/span>.<span class=\"nv\">sim<\/span>.<span class=\"w\">  <\/span><span class=\"nv\">Most<\/span><span class=\"w\"> <\/span><span class=\"k\">if<\/span><span class=\"w\"> <\/span><span class=\"nv\">not<\/span><span class=\"w\"> <\/span><span class=\"nv\">all<\/span><span class=\"w\"> <\/span><span class=\"nv\">tests<\/span><span class=\"w\"> <\/span><span class=\"nv\">are<\/span><span class=\"w\"> <\/span><span class=\"nv\">self<\/span>\n<span class=\"nv\">testing<\/span><span class=\"w\"> <\/span><span class=\"nv\">with<\/span><span class=\"w\"> <\/span><span class=\"nv\">test<\/span><span class=\"w\"> <\/span><span class=\"nv\">cases<\/span><span class=\"w\"> <\/span><span class=\"nv\">and<\/span><span class=\"w\"> <\/span><span class=\"nv\">should<\/span><span class=\"w\"> <\/span><span class=\"nv\">report<\/span><span class=\"w\"> <\/span><span class=\"nv\">number<\/span><span class=\"w\"> <\/span><span class=\"nv\">of<\/span><span class=\"w\"> <\/span><span class=\"nv\">test<\/span><span class=\"w\"> <\/span><span class=\"nv\">cases<\/span><span class=\"w\"> <\/span><span class=\"nv\">and<\/span>\n<span class=\"nv\">how<\/span><span class=\"w\"> <\/span><span class=\"nv\">many<\/span><span class=\"w\"> <\/span><span class=\"nv\">passed<\/span>.<span class=\"w\">  <\/span><span class=\"nv\">Which<\/span><span class=\"w\"> <\/span><span class=\"nv\">should<\/span><span class=\"w\"> <\/span><span class=\"nv\">be<\/span><span class=\"w\"> <\/span><span class=\"nv\">all<\/span>.\n<\/code><\/pre><\/div>\n\n<p>As far as I know we've done nothing yet to deal with threats to the\ntool chain (Thompson attack, etc).<\/p>","category":{"@attributes":{"term":"misc"}}}]}