1 2012-10-01 Niibe Yutaka <gniibe@fsij.org>
3 * src/main.c (neug_setup, USB_NEUG_GET_ERR_COUNT): New.
5 2012-09-28 Niibe Yutaka <gniibe@fsij.org>
7 * src/random.c (neug_mode_select): Rename (was: neug_select).
8 Implement raw sample data output mode (with NEUG_MODE_RAW_DATA),
9 raw lsb data (before conditioning) is with NEUG_MODE_RAW_LSB.
11 2012-09-27 Niibe Yutaka <gniibe@fsij.org>
13 * src/random.c (ep_process): Feedback "additiona input" is now
14 half of previous output.
16 * boards/STBEE_MINI/board.h (NEUG_NON_DEFAULT_ADC_CHANNEL): New.
17 (VAL_GPIOACRL): Use PA1 and PA2 for NeuG's analog input.
18 (VAL_GPIOCCRL): Revert previous change.
19 * boards/STBEE_MINI/mcuconf.h (STM32_PPRE2, STM32_ADCPRE): Revert.
21 * src/main.c (RANDOM_BYTES_LENGTH): 32 is best for SHA-256
24 * src/random.c (adc2_stop, ep_process): New.
25 (rng_gen): Call ep_process.
27 2012-09-26 Niibe Yutaka <gniibe@fsij.org>
29 * boards/STM8S_DISCOVERY/mcuconf.h (STM32_PPRE2, STM32_ADCPRE):
30 12MHz ADC clock gives us more speed.
31 * boards/STM8S_DISCOVERY/board.h (VAL_GPIOCCRL): Digital push pull
32 output 50MHz gives us more entropy.
34 * boards/STBEE/mcuconf.h (STM32_PPRE2, STM32_ADCPRE): Ditto.
35 * boards/STBEE/board.h (VAL_GPIOCCRL): Ditto.
37 * boards/STBEE_MINI/mcuconf.h (STM32_PPRE2, STM32_ADCPRE): Ditto.
38 * boards/STBEE_MINI/board.h (VAL_GPIOCCRL): Ditto.
40 * boards/OLIMEX_STM32_H103/mcuconf.h (STM32_PPRE2, STM32_ADCPRE):
42 * boards/OLIMEX_STM32_H103/board.h (VAL_GPIOCCRL): Ditto.
44 * boards/FST_01/mcuconf.h (STM32_PPRE2, STM32_ADCPRE): Ditto.
45 * boards/FST_01/board.h (VAL_GPIOCCRL): Ditto.
47 * boards/CQ_STARM/mcuconf.h (STM32_PPRE2, STM32_ADCPRE): Ditto.
48 * boards/CQ_STARM/board.h (VAL_GPIOCCRL): Ditto.
50 2012-09-25 Niibe Yutaka <gniibe@fsij.org>
52 * src/random.c (adc2_start): New function.
53 (adcgrpcfg): Dual fast interleaved mode.
54 (rng_gen): Four-byte at a time.
55 (rng): Override DMA settings for 32-bit, and call adc2_start.
57 * src/random.c (adcgrpcfg): To acquire more entropy and more speed,
58 our choice is IN10 and IN11 (which is unconnected).
60 2012-09-20 Niibe Yutaka <gniibe@fsij.org>
62 * src/main.c (main): Call neug_select.
63 * src/random.c (neug_select): New.
64 (rng_gen): Implement Raw output.
65 (hash_df_initial_string): Fix (was: 32, no of bytes).
66 (rng): Implement error recovery.
68 2012-09-19 Niibe Yutaka <gniibe@fsij.org>
70 * tool/neug_upgrade.py: New.
72 * src/main.c (main): Support reGNUal.
73 * src/neug.ld.in (__ram_end__): Define.
74 * src/random.c (rng): Finish upon request of termination.
76 * src/neug.h (neug_fini): New.
78 2012-09-18 Niibe Yutaka <gniibe@fsij.org>
80 * src/random.c (NUM_NOISE_INPUTS, REPITITION_COUNT_TEST_CUTOFF)
81 (ADAPTIVE_PROPORTION_64_TEST_CUTOFF)
82 (ADAPTIVE_PROPORTION_4096_TEST_CUTOFF): Change for draft SP 800-90b,
83 the section 6.2 "Full Entropy Source Requirements".
85 2012-09-13 Niibe Yutaka <gniibe@fsij.org>
87 * src/aes-constant-ft.c: New (from Gnuk).
89 2012-09-12 Niibe Yutaka <gniibe@fsij.org>
91 * src/sha256.c, src/sha256.h: New (from Gnuk).
93 * boards/STBEE/board.h (GPIOD_USB_ENABLE): Fix.
95 2012-09-11 Niibe Yutaka <gniibe@fsij.org>
97 Health tests (SP 800-90b).
98 * src/random.c (repetition_count_test)
99 (adaptive_proportion_64_test, adaptive_proportion_4096_test): New.
101 2012-09-10 Niibe Yutaka <gniibe@fsij.org>
103 * NEUG_USB_DEVICE_ID: New file.
105 * src/main.c: Include usb-vid-pid-ver.c.inc and usb-strings.c.inc.
107 * src/configure (vidpid): New.
109 2012-08-30 Niibe Yutaka <gniibe@fsij.org>
113 2012-08-27 Niibe Yutaka <gniibe@fsij.org>
115 Use WELL random number generator to whiten noise input.
116 * src/random.c (NUM_NOISE_INPUTS): Now, it's 6.
117 (tmt_init, tmt_one_step, tmt_value): Remove.
118 (well512a_step): New function. WELL random number generator.
119 (neug_prng_reseed): Remove.
121 * src/main.c (main): Call neug_flash with time interval 2500ms,
123 Don't call neug_prng_reseed.
126 * src/neug.h (NEUG_PRE_LOOP): It's 64 now (was: 32).
128 2012-08-13 Niibe Yutaka <gniibe@fsij.org>
130 * src/main.c (RANDOM_BYTES_LENGTH): It's now 60 (was: 32).
131 (neug_device_reset, neug_ctrl_write_finish)
132 (vcom_port_data_setup, neug_setup, neug_get_descriptor)
133 (neug_setup_endpoints_for_interface, neug_usb_event)
134 (neug_interface, Vector90, EP1_IN_Callback, EP2_IN_Callback)
135 (EP3_OUT_Callback): New.
136 (main): Now use usb_lld_* functions (was: ChibiOS SDU driver).
138 * boards/*/board.c (USB_Cable_Config, set_led): Remove.
139 , boards/*/board.h (SET_USB_CONDITION, SET_LED_CONDITION)
140 (GPIO_USB, IOPORT_USB, GPIO_LED, IOPORT_LED): Define.
142 * boards/common/board-common.c [DFU_SUPPORT] (__early_init): Don't
143 set SCB->VTOR here (it's done in reset in src/sys.c).
145 * src/halconf.h (HAL_USE_SERIAL_USB, HAL_USE_USB): Not define.
146 * src/Makefile.in (CSRC): Add sys.c and usb_lld.c
147 * src/sys.h, src/sys.c: New files (from Gnuk).
148 * src/usb_lld.h, src/usb_lld.c: New files (from Gnuk).
150 2011-11-14 Niibe Yutaka <gniibe@fsij.org>
154 * src/Makefile.in (MCFLAGS): Override MCFLAGS option for newer
155 GCC of summon-arm-toolchain to add -mfix-cortex-m3-ldrd.
156 NOTE: This should not be needed (as -mcpu=cortex-m3 defaults
157 to -mfix-cortex-m3-ldrd for GCC-proper), but it is needed
158 to select arm-none-eabi/lib/thumb2/libc.a correctly.
160 * boards/common/board-common.c (__early_init): Revert change of
163 * boards/FST_01/{mcuconf.h,board.h,board.c}: New.
165 * src/main.c (my_sduRequestsHook): New.
166 (LED_ONESHOT_SHORT, LED_ONESHOT_LONG): New.
167 (led_blinker): Support LED_ONESHOT_SHORT and LED_ONESHOT_LONG.
168 (main): Call neug_prng_reseed for each new connection.
170 2011-10-07 NIIBE Yutaka <gniibe@fsij.org>
172 * src/random.c (neug_wait_full): New (from Gnuk).
174 2011-10-06 NIIBE Yutaka <gniibe@fsij.org>
176 * src/random.c (neug_flush): New.
177 (neug_prng_reseed): Call neug_flush.
179 2011-10-05 NIIBE Yutaka <gniibe@fsij.org>
181 * boards/common/board-common.c (__early_init): Set MSP register
184 2011-10-04 NIIBE Yutaka <gniibe@fsij.org>
186 * src/chconf.h (THREAD_CONTEXT_SWITCH_HOOK): New.
188 * src/Makefile.in: Follow the change of ChibiOS 2.3.3 (new
189 directory structure of platforms/STM32F1xx).
191 * src/main.c (vcom_configuration_descriptor_data, usb_event):
192 Follow the change of ChibiOS 2.3.3 (USB_CDC_*).
193 (vcom_string3): Version 0.01.
195 * src/configure (MEMORY_SIZE): New.
197 * src/neug.ld.in (@MEMORY_SIZE@): New (for HD device like STBEE).
198 (.stacks): New in newer ChibiOS (>= 2.3.3).
200 * src/random.c (adccb_err): New.
201 (adcgrpcfg): Add adccb_err.
203 * chibios: Updated to trunk of 2.3.3.
205 2011-09-27 NIIBE Yutaka <gniibe@fsij.org>
207 * src/random.c (adcgrpcfg): Fix configuration value (had old
208 values by old example).
210 2011-09-22 NIIBE Yutaka <gniibe@fsij.org>
212 * src/random.c (ROTATE): Remove.
214 (ep_add): Use SHIFT_RIGHT.
216 2011-09-21 NIIBE Yutaka <gniibe@fsij.org>
218 * src/random.c (ep_output): Bug fix for second argument of
219 fnv32_hash, and change the way to place values into the buffer.
220 (ep_add): Feedback byte always shift 1-bit, entropy_bit sometimes.
222 2011-09-20 NIIBE Yutaka <gniibe@fsij.org>
224 * boards/STBEE/mcuconf.h, boards/STBEE/board.h: New.
225 * boards/STBEE/board.c: New.
226 * boards/common/board-common.c (pal_default_config): Add case for
228 * src/configure: Support STBEE.
230 * src/random.c (PROBABILITY_50_BY_TICK): New.
231 (ep_add): Use ROTATE for final feedback only.
233 (ep_output): Rename (was: ep_value). Use fnv32_hash.
235 2011-08-29 NIIBE Yutaka <gniibe@fsij.org>
237 * src/random.c (ep_add): New argument another_random_bit.
238 (crc32_top_bit, crc32_add_bit): Delete.
240 (rng_gen): Call ep_add with SysTick->VAL shake.
241 Don't shake PRNG by interrupt timing.
242 (neug_prng_reseed): New.
244 * src/main.c (main): Call neug_prng_reseed after new connection.
246 * src/neug.h (neug_prng_reseed): New.
248 2011-08-19 NIIBE Yutaka <gniibe@fsij.org>
250 * src/random.c (tmt_one_step): No argument.
251 (crc32_top_bit, crc32_add_bit): New.
252 (rng_gen): Have return value. Put interrupt timing entropy
253 to CRC32 shift register, and use the top bit of CRC32 to
254 shake the steps of TMT.
256 2011-08-10 NIIBE Yutaka <gniibe@fsij.org>
258 * boards/STM8S_DISCOVERY/mcuconf.h: New.
259 * boards/STM8S_DISCOVERY/board.h: New.
260 * boards/STM8S_DISCOVERY/board.c: New.
262 2011-07-22 NIIBE Yutaka <gniibe@fsij.org>
264 * boards/OLIMEX_STM32_H103/mcuconf.h (STM32_USBPRE): Add.
266 * src/main.c (main): Fix one shot logic.
268 2011-07-21 NIIBE Yutaka <gniibe@fsij.org>
270 * src/neug.h (NEUG_PRE_LOOP): New.
272 * src/main.c (led_blinker): New.
273 (main): Use led_blinker.
274 (main): Call neug_get before USB configuration at least
277 2011-07-14 NIIBE Yutaka <gniibe@fsij.org>
279 * src/configure: Support CQ_STARM.
280 * boards/CQ_STARM: Added.