update ChaosKey page to say they're gone, top level index
[web/altusmetrum] / ChaosKey / index.mdwn
1 [[!meta title="ChaosKey"]]
2 # ChaosKey
3
4 This is a hardware True Random Number Generator that attaches via USB.
5
6 The Linux Kernel, starting with version 4.1, includes source for this
7 driver. It should be built by default in your distribution. If your
8 using Linux + KVM to host other Linux instances, read the
9 [VirtualMachine](VirtualMachine.html) page to see how you can configure the guests to share
10 the host entropy source.
11
12 ## Version 1.0 ##
13
14 ChaosKey is now out of production.  They work great, but it took several years
15 to sell our first production run, and shipping them from the US to other 
16 countries one at a time ended up dominating the net cost to most users.  We might
17 make more some day, but no promises!
18
19 <a href="v1.0/chaoskey-bare.jpg"><img src="v1.0/chaoskey-bare-thumb.jpg"></a>
20
21 <a href="v1.0/chaoskey-boxed.jpg"><img src="v1.0/chaoskey-boxed-thumb.jpg"></a>
22
23 ### Reflashing Firmware ###
24
25 To reflash the system firmware on ChaosKey, you first need to get the
26 device into 'bootloader mode'. To do this, you must power-up ChaosKey
27 with a jumper between GND and the Boot Loader Select pin.
28
29 Open up ChaosKey by prying the case apart. There's no glue or screws,
30 so a thin tool or fingernail should suffice to split the case into two
31 pieces. Once you've opened it up, you'll find the inside that looks
32 much like this:
33
34 <img src="chaoskey-connector.svg">
35
36 Connect a wire between the two red holes in the debug connector and
37 then plug it in to your computer. It will appear as a USB modem device
38 called AltosFlash with USB ID fffe:000a.
39
40 Use the 'ao-usbload' program, which is part of the
41 [AltOS repository](https://altusmetrum.org/AltOS/)
42 and is packaged for Debian in the 'altos' package:
43
44     $ ao-usbload chaoskey-v1.0-*.elf
45
46 ### Version 1.0 Hardware ###
47
48  * [STM32F042](http://www.st.com/web/catalog/mmc/FM141/SC1169/SS1574/LN1823?icmp=stm32f0x2-line_pron_pr_jan2014&sc=stm32f0x2-pr) System-on-Chip
49     * ARM Cortex-M0 MCU
50     * 32k Flash
51     * 6k RAM
52     * USB 2.0 Full Speed
53     * Crystal-less operation
54  * 20V noise source
55     * AP3015A boost regulator
56     * back-to-back 3904 transistor noise
57  * [OPA356](http://www.ti.com/product/opa356) op amp
58     * 200MHz GBP
59
60 Here's a circuit diagram of the noise source:
61
62 <img src="v1.0/noise-source.svg">
63
64 ### Version 1.0 Bits ###
65
66 Source code for the firmware, flash loader and a utility to pull raw
67 bits from the noise source are available here:
68
69 [AltOS Git Repository](http://git.gag.com/?p=fw/altos;a=summary)
70
71 [ChaosKey Firmware version 1.6.7](v1.0/chaoskey-v1.0-1.6.7.elf)
72
73 [ChaosKey Boot Loader version 1.6.7](v1.0/chaoskey-v1.0-altos-flash-1.6.7.elf)
74
75 Hardware designs using [gEDA](http://www.geda-project.org/) are
76 available here:
77
78 [ChaosKey Hardware Design Files](http://git.gag.com/?p=hw/chaoskey;a=summary)
79
80
81 ## Version 0.3 ##
82
83 This one uses the better noise source coupled with an op amp that
84 provides 2MHz of bandwidth at a gain of 100, offering linear frequency
85 response at a million samples per second.
86
87 A photo of prototype version 0.3:
88
89 <a href="v0.3/chaoskey-v0.3.jpg"> <img src="v0.3/chaoskey-v0.3-thumb.jpg"></a>
90
91 Here's a circuit diagram of the noise source:
92
93 <img src="v0.3/noise-source.svg">
94
95 Version 0.3 uses the same hardware design as version 1.0, except that
96 it uses a QFP package version of the processor instead of the QFN used
97 in 1.0, and hence needs a larger circuit board.
98
99 ## Version 0.2 ##
100
101 This version uses a better noise source, but the single transistor amp
102 designed to get from the 20mV noise source to a digital value doesn't
103 provide enough bandwidth, so the resulting signal seen by the CPU has
104 poor frequency response.
105
106 Here's a photo of prototype version 0.2:
107
108 <a href="v0.2/chaoskey-v0.2.jpg"> <img src="v0.2/chaoskey-v0.2-thumb.jpg"></a>
109
110 ### Version 0.2 Hardware ###
111
112  * [STM32F042](http://www.st.com/web/catalog/mmc/FM141/SC1169/SS1574/LN1823?icmp=stm32f0x2-line_pron_pr_jan2014&sc=stm32f0x2-pr) System-on-Chip
113     * ARM Cortex-M0 MCU
114     * 32k Flash
115     * 6k RAM
116     * USB 2.0
117     * Crystal-less operation
118  * 20V noise source
119     * AP3015A boost regulator
120     * back-to-back 3904 transistor noise
121
122 ## Version 0.1 ##
123
124 These are photos of prototype version 0.1:
125
126 <a href="v0.1/chaoskey-v0.1-top.jpg"> <img src="v0.1/chaoskey-v0.1-top-thumb.jpg"></a>
127 <a href="v0.1/chaoskey-v0.1-bottom.jpg"> <img src="v0.1/chaoskey-v0.1-bottom-thumb.jpg"></a>
128
129 ### Version 0.1 Hardware ###
130
131  * [NXP LPC11U14](http://www.nxp.com/products/microcontrollers/cortex_m0_m0/LPC11U14FHI33.html) System-on-Chip
132         * ARM Cortex-M0 MCU
133         * 32k Flash
134         * 6k RAM
135         * USB 2.0
136         * 8 12-bit analog inputs
137         * I2C, SPI, async serial
138         * digital I/O
139  * ZXRE1004 zener diode noise source
140  * MCP6L92 dual op-amp
141
142 ## Software ##
143
144 * Firmware Features
145         * [AltOS](../AltOS/) is written mostly in C with some ARM assembler
146 * Tools Used
147         * [gEDA](http://www.gpleda.org/) for schematic capture and PCB layout
148         * [GCC](http://gcc.gnu.org/) compiler and source debugger
149 * Licenses
150         * The hardware is licensed under the [TAPR](http://www.tapr.org) [Open Hardware License](http://www.tapr.org/ohl.html)
151         * The software is licensed [GPL version 2](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)