1 2015-07-31 Niibe Yutaka <gniibe@fsij.org>
3 * src/configure (output_vendor_product_serial_strings): Fix sed
4 script when string is short. Remove empty line.
5 * fraucheky: Update to 0.3.
6 * chopstx: Update to 0.08.
8 2015-07-30 Niibe Yutaka <gniibe@fsij.org>
10 * src/sys.h (BOARD_ID_ST_NUCLEO_F103, BOARD_ID_ST_DONGLE): New.
11 * src/adc_stm32f103.c (get_adc_config): Add ST Dongle and ST
14 2015-07-28 Niibe Yutaka <gniibe@fsij.org>
16 * src/usb_stm32f103.c: Update from Gnuk.
17 * src/usb_lld.h: Ditto.
18 * src/main.c (usb_cb_ctrl_write_finish, vcom_port_data_setup)
19 (usb_cb_setup, usb_cb_get_descriptor, usb_cb_interface): Follow
20 the API change of USB driver.
21 (FSIJ_DEVICE_NEUG_FRAUCHEKY_REQUESTED): New.
22 (NEUG_SPECIAL_BITRATE): New.
23 (usb_cb_ctrl_write_finish, main): Special bitrate to invoke
26 2015-07-23 Niibe Yutaka <gniibe@fsij.org>
28 * src/configure (nl): New. '\n' in sed replacement text is not
29 portable and break FreeBSD or MacOS X built.
30 Reported by Kenji Rikitake.
32 2015-07-18 Niibe Yutaka <gniibe@fsij.org>
36 2015-07-16 Niibe Yutaka <gniibe@fsij.org>
38 * src/config.h.in (@TARGET_DEFINE@): Remove.
39 * src/configure [--with-dfu] (HEXOUTPUT_MAKE_OPTION): Enable .hex
42 2015-07-15 Niibe Yutaka <gniibe@fsij.org>
44 * src/usb_lld.h: Update from Gnuk.
45 * src/usb_stm32f103.c: Likewise.
46 * src/main.c (usb_cb_get_descriptor): Follow the change.
48 * chopstx: Update to 0.07.
49 * src/sys.c: Update to 2.1 from chopstx.
50 * src/sys.h: Likewise.
51 * tool/openocd-script: Fix for newer OpenOCD.
53 2015-07-14 Niibe Yutaka <gniibe@fsij.org>
55 * src/configure (sys1_compat): Fix assignment syntax.
57 * src/adc_stm32f103.c (get_adc_config): New. Consolidate knowlege
58 of boards for ADC usage.
60 * src/neug.c: Remove inclusion of "board.h".
62 * tool/neug_check.py (field): New field 'Board'.
63 * src/main.c (main): Determine flash page size at runtime.
64 (usbbuf): New. Use for passwd and string transfer.
65 (usb_cb_get_descriptor): Support sys_board_name.
66 * src/neug.ld.in: Update for sys 2.1.
68 2015-07-11 Niibe Yutaka <gniibe@fsij.org>
70 * src/neug.ld.in (.fill_ffff): Add ALIGN 4.
72 2015-07-08 Niibe Yutaka <gniibe@fsij.org>
74 * chopstx: Update to 0.06.
76 * src/configure (help): Add other boards.
78 2015-06-30 Niibe Yutaka <gniibe@fsij.org>
80 * tool/neug_check.py: Fix raise and print statements.
82 * tool/neug_upgrade.py: Support upgrade with passwd.
83 (neug.set_passwd): New.
85 * src/main.c (USB_NEUG_SET_PASSWD): New.
87 (usb_cb_ctrl_write_finish, usb_cb_setup): Handle
88 USB_NEUG_SET_PASSWD and USB_NEUG_EXIT with passwd.
90 * src/neug.ld.in (flash): A page for passwd.
92 * src/config.h.in (@SERIALNO_STR_LEN_DEFINE@): Rename.
93 * src/configure (SERIALNO_STR_LEN_DEFINE): Rename.
95 * src/configure (help): Add CQ_STARM.
97 2015-06-22 Niibe Yutaka <gniibe@fsij.org>
99 * src/configure (help): Add STM32_PRIMER2.
101 * src/sys.c: Update from chopstx/example-cdc/sys.c.
103 2015-03-17 Niibe Yutaka <gniibe@fsij.org>
107 2015-03-17 Niibe Yutaka <gniibe@fsij.org>
111 * src/configure: Call configure of Fraucheky with REVISION,
112 REVISION_CHOPSTX, REVISION_FRAUCHEKY.
114 2015-03-12 Niibe Yutaka <gniibe@fsij.org>
118 * src/main.c (fill_serial_no_by_unique_id): Use bits in higher
121 2015-01-29 Niibe Yutaka <gniibe@fsij.org>
125 2015-01-28 Niibe Yutaka <gniibe@fsij.org>
127 * boards/STBEE, board/STBEE_MINI: Remove.
129 2015-01-22 Niibe Yutaka <gniibe@fsij.org>
131 * src/Makefile.in (build/neug.o, build/sha256.o): Use -O3.
133 2015-01-21 Niibe Yutaka <gniibe@fsij.org>
135 * src/neug.ld.in (.text): Add ALIGN(8) at the end.
137 * fraucheky: Update to 0.1.
139 2014-12-10 Niibe Yutaka <gniibe@fsij.org>
141 * chopstx: Update to 0.04.
143 * src/sys.c: Update from chopstx.
145 2014-05-22 Niibe Yutaka <gniibe@fsij.org>
150 2013-11-21 Niibe Yutaka <gniibe@fsij.org>
152 * src/usb_stm32f103.c (usb_handle_transfer): Incorporate changes
155 2013-11-18 Niibe Yutaka <gniibe@fsij.org>
157 * src/usb_stm32f103.c (usb_interrupt_handler): Change the order of
160 2013-11-11 Niibe Yutaka <gniibe@fsij.org>
164 2013-11-09 Niibe Yutaka <gniibe@fsij.org>
166 * src/adc_stm32f103.c (adc_wait_completion): Remove comment about
167 spurious interrupt, as we knew that it's because of the bug of
170 2013-11-08 Niibe Yutaka <gniibe@fsij.org>
172 * chopstx: Update to 0.03.
174 * src/usb_stm32f103.c (ISTR_OVR): Rename.
175 (usb_handle_transfer): Rewrite control transfer handling, so that
176 the case where both of CTR_TX, CTR_RX are 1 is handled correctly.
178 * src/main.c (neug_setup_endpoints_for_interface): Fix for ENDP2.
180 2013-11-06 Niibe Yutaka <gniibe@fsij.org>
182 * fraucheky: New submodule.
183 * .gitignore: Add generated files by Fraucheky.
184 * NEUG_USB_DEVICE_ID: Add USB id of Fraucheky.
185 * src/Makefile.in, src/config.h.in, src/configure: Support
187 *src/main.c: Likewise.
189 * vender/flying-stone-technology: New.
191 2013-11-05 Niibe Yutaka <gniibe@fsij.org>
195 * src/configure (SERIALNO, SERIALNO_STR_LEN_DEFINE): New.
196 (REVISION): Use the file VERSION if it doesn't have .git.
197 * src/config.h.in (SERIALNO_STR_LEN_DEFINE): New.
198 * src/main.c (vcom_string3): Removed.
199 (ID_OFFSET): New, using SERIALNO_STR_LEN.
201 2013-11-03 Niibe Yutaka <gniibe@fsij.org>
203 * chopstx: Update to 0.01.
205 2013-11-02 Niibe Yutaka <gniibe@fsij.org>
208 * src/sys.c, src/usb_lld.h, src/usb_stm32f103.c: Update from
210 * src/main.c (usb_cb_get_descriptor): Follow the change.
212 2013-10-24 Niibe Yutaka <gniibe@fsij.org>
214 * src/main.c (usb_cb_setup): Signal CND_USB, so that
215 neug_upgrade.py works better.
217 2013-08-22 Niibe Yutaka <gniibe@fsij.org>
221 2013-08-21 Niibe Yutaka <gniibe@fsij.org>
223 * chopstx: Update to 0.00 release of Chopstx.
225 2013-08-20 Niibe Yutaka <gniibe@fsij.org>
227 * src/configure (options): Add --enable-sys1-compat.
229 2013-08-19 Niibe Yutaka <gniibe@fsij.org>
231 * src/sha256.h: Remove extern from function prototypes.
233 * src/main.c (vcom_string3): Updated.
234 [DFU_SUPPORT] (main): Fix calling flash_erase_all_and_exec.
236 * src/neug.c (repetition_count_test_word)
237 (adaptive_proportion_64_test_word)
238 (adaptive_proportion_4096_test_word)
239 (noise_source_continuous_test_word): New.
240 (ep_fill_wbuf_v): Use noise_source_continuous_test_word.
242 2013-08-17 Niibe Yutaka <gniibe@fsij.org>
244 * src/main.c (main): Fix locking of USB_MTX.
246 * src/adc_stm32f103.c (adc_wait_completion): Fix race condition.
247 Clear (FLAGS & ~1) only, not all of possible interrupts.
249 2013-08-16 Niibe Yutaka <gniibe@fsij.org>
251 * src/main.c (bDeviceState, fsij_device_state, connected): Protect
253 (usb_cb_ctrl_write_finish): Use USB_MTX to access protected vars.
254 Update CONNECTED here.
255 (vcom_port_data_setup): Check length.
256 Don't update CONNECTED here.
257 (usb_cb_setup): Use USB_MTX to access protected vars.
258 (usb_cb_handle_event): Likewise.
259 (main): Mutual exclusion by USB_MTX.
261 * src/usb_lld.h (bDeviceState): Remove.
263 * src/adc_stm32f103.c (NEUG_DMA_MODE): Merge NEUG_DMA_MODE_SAMPLE
264 and NEUG_DMA_MODE_CRC32 which are same value now.
265 (adc_start_conversion_internal): Remove.
266 (adc_start_conversion): Remove MODE, it's not SIZE but COUNT now.
268 * src/neug.c (ep_init, ep_process): Follow the change of
269 adc_start_conversion.
271 * chopstx: New version of Chopstx.
273 2013-08-13 Niibe Yutaka <gniibe@fsij.org>
275 * src/main.c (struct line_coding): Add packed attribute.
276 (usb_cb_ctrl_write_finish): Wake up main thread if it wait
277 on condition variable.
278 (main): Call neug_mode_select in the loop of waiting_connection.
279 Call neug_mode_select in the main loop to allow changing mode
282 * tool/neug_check.py (neug.get_mode): Change the explanation of
283 filter "CRC32 filter".
285 * src/neug.c (adc_buf): Remove.
286 (ep_fill_initial_string): Call noise_source_continuous_test.
287 (ep_init): Follow the change of adc_start_conversion.
288 (ep_fill_wbuf_v): New name and new argument V, remove FLIP.
289 (ep_process): Access CRC unit from here. Correct calling
290 noise_source_continuous_test for the last byte of output.
291 (rng): Handle error of ADC.
293 * src/adc_stm32f103.c (adc_mode, adc_ptr, adc_size): Remove.
294 (adc_buf): Make it public.
295 (adc_start_conversion): Change arguments.
296 (adc_lld_serve_rx_interrupt, adc_wait): Remove.
297 (adc_wait_completion): New with error code.
299 2013-08-12 Niibe Yutaka <gniibe@fsij.org>
301 * src/sys.c (reset): Remove unneeded & for FT0, FT1, and FT2.
303 2013-06-21 Niibe Yutaka <gniibe@fsij.org>
305 * src/neug.ld.in: Change the placement of stacks.
307 * src/neug.c (rng): Handle interrupt by this thread.
308 (neug_mode_select): Mutual exclusion for mode change.
310 * src/adc_stm32f103.c (adc_wait): New.
311 (adc_start): Don't create thread.
312 (adc_intr_thread): Remove.
314 * src/neug.c: Rename from random.c.
316 2013-06-19 Niibe Yutaka <gniibe@fsij.org>
318 * src/main.c (usb_intr): Avoid interrupt masking by application.
320 2013-06-18 Niibe Yutaka <gniibe@fsij.org>
322 * src/random.c: Update for Chopstx.
324 * src/sys.c: Portable version (not for ChibiOS). Version 2.0.
325 * src/sys.h (clock_init, gpio_init): New.
327 * src/stm32f103.h: New.
329 * src/neug.ld.in: Declare stack sizes.
331 * src/main.c: Update for Chopstx.
332 (usb_intr): Thread for interrupt handling.
334 (EP1_IN_Callback): Use mutex and cond.
335 (event_flag_init, event_flag_waitone, event_flag_signal): New.
336 (led_blinker): Use event flag of our own.
337 (main): Use mutex and cond. Use cancel and join.
339 * src/configure: Update for Chopstx.
340 (target): Defaults to FST_01.
342 * src/adc_stm32f103.c (STM32_ADC_ADC1_IRQ_PRIORITY): Remove.
343 (NEUG_DMA_MODE_CRC32): Add MINC, memory address increment.
344 (adc_init): Handle RCC initialization for ADC.
345 (adc_intr_thread): New.
346 (adc_start): Create a thread for interrupt handling.
347 (adc_start_conversion): Add DMA handling.
348 (adc_stop): Cancel a thread for interrupt handling.
349 (adc_lld_serve_rx_interrupt): Use bigger buffer (256-byte long).
351 * src/aes-constant-ft.c: Add comments. Use stdint.h.
353 * src/config.h.in (FLASH_PAGE_SIZE): Remove.
355 * src/adc.h: Declare mutex and cond for Chopstx.
357 * chopstx: New, Chopstx RT Thread Library.
359 * src/Makefile.in: Update for Chopstx.
361 * src/usb_stm32f103.c (TRUE, FALSE): Defined here.
363 2013-03-15 Niibe Yutaka <gniibe@fsij.org>
367 * src/main.c (vcom_string3): Updated.
369 Support relocatable reGNUal.
371 * src/neug.ld.in (_regnual_start): Now, it's just '.'.
372 * src/main.c (calculate_regnual_entry_address): New.
373 (main): Use calculate_regnual_entry_address for entry point.
377 * src/main.c (device_desc, config_desc, string_descs): Remove.
378 (neug_device_reset, neug_ctrl_write_finish, neug_setup)
379 (neug_get_descriptor, neug_usb_event, usb_cb_interface): Rename to
381 (Device_Method): Remove.
382 (main): Use vcom_configuration_desc.
384 * src/usb_lld.h, src/usb_stm32f103.c: Updated from Gnuk.
386 2013-02-18 Niibe Yutaka <gniibe@fsij.org>
388 * boards/STM32_PRIMER2/board.c, boards/STM32_PRIMER2/board.h:
389 Update for ChibiOS/RT 2.4.x.
391 * boards/FST_01/board.h: Use AN0 and AN9.
393 * src/random.c (noise_source_cnt_max_reset, noise_source_error):
396 * src/adc_stm32f103.c (ADC_SMPR2_SMP_AN9, ADC_CHANNEL_IN9): New.
398 * src/neug.h (neug_prng_reseed): Remove.
402 2013-02-07 Niibe Yutaka <gniibe@fsij.org>
406 * src/main.c (vcom_string3): Updated.
408 2013-01-25 Niibe Yutaka <gniibe@fsij.org>
410 * src/sha256.c (memcpy_bswap32): New function.
411 (bswap32_buf): Removed.
412 (sha256_finish): Use memcpy_bswap32.
414 2013-01-24 Niibe Yutaka <gniibe@fsij.org>
416 * src/sha256.c (v_cycle0): New. Special case of v_cycle(i,j)
417 where j == 0. Do byte order swapping here.
418 (v_cycle): Assume j != 0.
419 (sha256_process): Use v_cycle0 and v_cycle.
420 (sha256_update): Don't do byte order swapping.
421 (sha256_finish): Follow the change of sha256_process does byte
424 2012-12-17 Niibe Yutaka <gniibe@fsij.org>
426 * boards/FST_01_00: Added.
428 2012-10-30 Niibe Yutaka <gniibe@fsij.org>
432 * src/main.c (vcom_string3): Updated.
434 2012-10-26 Niibe Yutaka <gniibe@fsij.org>
436 * NEUG_USB_DEVICE_ID (Product_STRING): Rename to NeuG True RNG.
438 2012-10-23 Niibe Yutaka <gniibe@fsij.org>
440 * src/random.c (neug_consume_random): New.
442 * src/main.c (copy_to_tx): New.
443 (main): Call neug_consume_random.
445 2012-10-17 Niibe Yutaka <gniibe@fsij.org>
447 * src/main.c (main): Wait for random number generation (instead of
450 2012-10-16 Niibe Yutaka <gniibe@fsij.org>
452 * src/random.c (neug_get_nonblock): New function.
454 * src/main.c (RANDOM_BYTES_LENGTH): Now, it's 64 to fill Tx
456 (main): Fill 64-byte Tx buffer if possible.
458 2012-10-15 Niibe Yutaka <gniibe@fsij.org>
460 * tool/neug_check.py (main): Display USB strings.
462 2012-10-13 Niibe Yutaka <gniibe@fsij.org>
464 * boards/STBEE_MINI/board.c [!DFU_SUPPORT] (boardInit): Don't run
465 when "user switch" is pushed. This is for JTAG/SWD debugger.
467 2012-10-12 Niibe Yutaka <gniibe@fsij.org>
469 * src/main.c (neug_setup): Support neug_*_max.
471 * src/random.c (ep_process): Enable health tests for
473 (rng): Don't use the result on error for NEUG_MODE_RAW.
474 (neug_rc_max, neug_p64_max, neug_p4k_max): New.
475 (repetition_count_test, adaptive_proportion_64_test)
476 (adaptive_proportion_4096_test): Record maximum counts.
477 (noise_source_cnt_max_reset): New.
478 (neug_mode_select): Call noise_source_cnt_max_reset on mode
481 * tool/neug_check.py (get_info): Rename.
482 (main): Support max counts.
484 2012-10-11 Niibe Yutaka <gniibe@fsij.org>
486 * src/random.c (EP_ROUND_RAW_DATA_INPUTS): Set it to 32.
488 * tool/dfuse.py: Update from Gnuk 1.0.1.
490 * src/chconf.h (CORTEX_VTOR_INIT): Define.
492 * src/neug.ld.in (.sys): Follow the change of file layout.
494 * src/halconf.h (HAL_USE_EXT, HAL_USE_RTC): Define.
495 (ADC_USE_WAIT, ADC_USE_MUTUAL_EXCLUSION, SERIAL_BUFFERS_SIZE):
498 * boards/FST_01/mcuconf.h (STM32_RTCSEL): Define.
499 (STM32_USBPRE, STM32_MCO): Remove.
500 * boards/STBEE/mcuconf.h: Likewise.
501 * boards/STM8S_DISCOVERY/mcuconf.h: Likewise.
502 * boards/OLIMEX_STM32_H103/mcuconf.h: Likewise.
503 * boards/STBEE_MINI/mcuconf.h: Likewise.
504 * boards/CQ_STARM/mcuconf.h: Likewise.
505 * boards/STM32_PRIMER2/mcuconf.h: Likewise.
507 * boards/common/mcuconf-common.h (STM32_NO_INIT)
508 (STM32_HSI_ENABLED, STM32_LSI_ENABLED, STM32_HSE_ENABLED)
509 (STM32_LSE_ENABLED, STM32_USB_CLOCK_REQUIRED, STM32_USBPRE)
510 (STM32_MCOSEL, STM32_PVD_ENABLE, STM32_PLS): Define.
512 * chibios: Updated to 2.4.3.
514 * src/usb_stm32f103.c: Rename (was: usb-lld.c).
515 * src/Makefile.in (CSRC): Follow the rename.
517 2012-10-10 Niibe Yutaka <gniibe@fsij.org>
519 * src/random.c (rng_gen): Remove.
520 (rng): Merge rng_gen, avoiding bigger lock.
521 (neug_mode_select): Better synchronization to rng thread.
523 2012-10-09 Niibe Yutaka <gniibe@fsij.org>
527 * src/main.c (vcom_string3): Updated.
529 2012-10-05 Niibe Yutaka <gniibe@fsij.org>
531 * src/main.c (neug_state): Remove.
532 (neug_ctrl_write_finish, vcom_port_data_setup, EP1_IN_Callback)
533 (main): Use ->p_state (was: neug_state).
534 (main): Call chThdSleep (was: chEvtWaitOneTimeout).
536 2012-10-03 Niibe Yutaka <gniibe@fsij.org>
538 * src/main.c (USB_NEUG_GET_INFO): New.
540 * tool/neug_check.py: Show mode and errors.
542 * src/adc_stm32f103.c (adc_lld_serve_rx_interrupt)
543 (adc_start_conversion): Filter by CRC32.
544 * src/random.c (ep_init, ep_fill_wbuf, ep_process): Filter by CRC32.
545 (neug_init): CRC32 initialization.
547 2012-10-02 Niibe Yutaka <gniibe@fsij.org>
549 * src/random.c: Use our own ADC driver.
551 * src/halconf.h (HAL_USE_ADC): Set FALSE.
552 (STM32_DMA_REQUIRED): Define here.
554 * src/chconf.h (CH_USE_SEMAPHORES): Set FALSE.
556 * src/Makefile.in (CSRC): Add adc_stm32f103.c.
558 * src/adc.h, src/adc_stm32f103.c: New.
560 * src/random.c (NEUG_ADC_SETTING1_SMPR1): Tweak.
562 2012-10-01 Niibe Yutaka <gniibe@fsij.org>
564 * src/random.c (adc2_start): Add SCAN for ADC2.
565 (adcgrpcfg, NEUG_ADC_SETTING1_SMPR1, NEUG_ADC_SETTING2_SMPR1):
566 ADC1 three channels and ADC2 two channels, one same channel.
568 * boards/FST_01/board.h: Use default ADC settings.
569 * boards/OLIMEX_STM32_H103/board.h (NEUG_ADC_SETTING2_SMPR1)
570 (NEUG_ADC_SETTING2_SMPR2, NEUG_ADC_SETTING2_SQR3)
571 (NEUG_ADC_SETTING2_NUM_CHANNELS): Define.
573 * tool/neug_check.py: New.
574 * src/main.c (neug_setup, USB_NEUG_GET_ERR_COUNT): New.
576 2012-09-28 Niibe Yutaka <gniibe@fsij.org>
578 * src/random.c (neug_mode_select): Rename (was: neug_select).
579 Implement raw sample data output mode (with NEUG_MODE_RAW_DATA),
580 raw lsb data (before conditioning) is with NEUG_MODE_RAW_LSB.
582 2012-09-27 Niibe Yutaka <gniibe@fsij.org>
584 * src/random.c (ep_process): Feedback "additiona input" is now
585 half of previous output.
587 * boards/STBEE_MINI/board.h (NEUG_NON_DEFAULT_ADC_CHANNEL): New.
588 (VAL_GPIOACRL): Use PA1 and PA2 for NeuG's analog input.
589 (VAL_GPIOCCRL): Revert previous change.
590 * boards/STBEE_MINI/mcuconf.h (STM32_PPRE2, STM32_ADCPRE): Revert.
592 * src/main.c (RANDOM_BYTES_LENGTH): 32 is best for SHA-256
595 * src/random.c (adc2_stop, ep_process): New.
596 (rng_gen): Call ep_process.
598 2012-09-26 Niibe Yutaka <gniibe@fsij.org>
600 * boards/STM8S_DISCOVERY/mcuconf.h (STM32_PPRE2, STM32_ADCPRE):
601 12MHz ADC clock gives us more speed.
602 * boards/STM8S_DISCOVERY/board.h (VAL_GPIOCCRL): Digital push pull
603 output 50MHz gives us more entropy.
605 * boards/STBEE/mcuconf.h (STM32_PPRE2, STM32_ADCPRE): Ditto.
606 * boards/STBEE/board.h (VAL_GPIOCCRL): Ditto.
608 * boards/STBEE_MINI/mcuconf.h (STM32_PPRE2, STM32_ADCPRE): Ditto.
609 * boards/STBEE_MINI/board.h (VAL_GPIOCCRL): Ditto.
611 * boards/OLIMEX_STM32_H103/mcuconf.h (STM32_PPRE2, STM32_ADCPRE):
613 * boards/OLIMEX_STM32_H103/board.h (VAL_GPIOCCRL): Ditto.
615 * boards/FST_01/mcuconf.h (STM32_PPRE2, STM32_ADCPRE): Ditto.
616 * boards/FST_01/board.h (VAL_GPIOCCRL): Ditto.
618 * boards/CQ_STARM/mcuconf.h (STM32_PPRE2, STM32_ADCPRE): Ditto.
619 * boards/CQ_STARM/board.h (VAL_GPIOCCRL): Ditto.
621 2012-09-25 Niibe Yutaka <gniibe@fsij.org>
623 * src/random.c (adc2_start): New function.
624 (adcgrpcfg): Dual fast interleaved mode.
625 (rng_gen): Four-byte at a time.
626 (rng): Override DMA settings for 32-bit, and call adc2_start.
628 * src/random.c (adcgrpcfg): To acquire more entropy and more speed,
629 our choice is IN10 and IN11 (which is unconnected).
631 2012-09-20 Niibe Yutaka <gniibe@fsij.org>
633 * src/main.c (main): Call neug_select.
634 * src/random.c (neug_select): New.
635 (rng_gen): Implement Raw output.
636 (hash_df_initial_string): Fix (was: 32, no of bytes).
637 (rng): Implement error recovery.
639 2012-09-19 Niibe Yutaka <gniibe@fsij.org>
641 * tool/neug_upgrade.py: New.
643 * src/main.c (main): Support reGNUal.
644 * src/neug.ld.in (__ram_end__): Define.
645 * src/random.c (rng): Finish upon request of termination.
647 * src/neug.h (neug_fini): New.
649 2012-09-18 Niibe Yutaka <gniibe@fsij.org>
651 * src/random.c (NUM_NOISE_INPUTS, REPITITION_COUNT_TEST_CUTOFF)
652 (ADAPTIVE_PROPORTION_64_TEST_CUTOFF)
653 (ADAPTIVE_PROPORTION_4096_TEST_CUTOFF): Change for draft SP 800-90b,
654 the section 6.2 "Full Entropy Source Requirements".
656 2012-09-13 Niibe Yutaka <gniibe@fsij.org>
658 * src/aes-constant-ft.c: New (from Gnuk).
660 2012-09-12 Niibe Yutaka <gniibe@fsij.org>
662 * src/sha256.c, src/sha256.h: New (from Gnuk).
664 * boards/STBEE/board.h (GPIOD_USB_ENABLE): Fix.
666 2012-09-11 Niibe Yutaka <gniibe@fsij.org>
668 Health tests (SP 800-90b).
669 * src/random.c (repetition_count_test)
670 (adaptive_proportion_64_test, adaptive_proportion_4096_test): New.
672 2012-09-10 Niibe Yutaka <gniibe@fsij.org>
674 * NEUG_USB_DEVICE_ID: New file.
676 * src/main.c: Include usb-vid-pid-ver.c.inc and usb-strings.c.inc.
678 * src/configure (vidpid): New.
680 2012-08-30 Niibe Yutaka <gniibe@fsij.org>
684 2012-08-27 Niibe Yutaka <gniibe@fsij.org>
686 Use WELL random number generator to whiten noise input.
687 * src/random.c (NUM_NOISE_INPUTS): Now, it's 6.
688 (tmt_init, tmt_one_step, tmt_value): Remove.
689 (well512a_step): New function. WELL random number generator.
690 (neug_prng_reseed): Remove.
692 * src/main.c (main): Call neug_flash with time interval 2500ms,
694 Don't call neug_prng_reseed.
697 * src/neug.h (NEUG_PRE_LOOP): It's 64 now (was: 32).
699 2012-08-13 Niibe Yutaka <gniibe@fsij.org>
701 * src/main.c (RANDOM_BYTES_LENGTH): It's now 60 (was: 32).
702 (neug_device_reset, neug_ctrl_write_finish)
703 (vcom_port_data_setup, neug_setup, neug_get_descriptor)
704 (neug_setup_endpoints_for_interface, neug_usb_event)
705 (neug_interface, Vector90, EP1_IN_Callback, EP2_IN_Callback)
706 (EP3_OUT_Callback): New.
707 (main): Now use usb_lld_* functions (was: ChibiOS SDU driver).
709 * boards/*/board.c (USB_Cable_Config, set_led): Remove.
710 , boards/*/board.h (SET_USB_CONDITION, SET_LED_CONDITION)
711 (GPIO_USB, IOPORT_USB, GPIO_LED, IOPORT_LED): Define.
713 * boards/common/board-common.c [DFU_SUPPORT] (__early_init): Don't
714 set SCB->VTOR here (it's done in reset in src/sys.c).
716 * src/halconf.h (HAL_USE_SERIAL_USB, HAL_USE_USB): Not define.
717 * src/Makefile.in (CSRC): Add sys.c and usb_lld.c
718 * src/sys.h, src/sys.c: New files (from Gnuk).
719 * src/usb_lld.h, src/usb_lld.c: New files (from Gnuk).
721 2011-11-14 Niibe Yutaka <gniibe@fsij.org>
725 * src/Makefile.in (MCFLAGS): Override MCFLAGS option for newer
726 GCC of summon-arm-toolchain to add -mfix-cortex-m3-ldrd.
727 NOTE: This should not be needed (as -mcpu=cortex-m3 defaults
728 to -mfix-cortex-m3-ldrd for GCC-proper), but it is needed
729 to select arm-none-eabi/lib/thumb2/libc.a correctly.
731 * boards/common/board-common.c (__early_init): Revert change of
734 * boards/FST_01/{mcuconf.h,board.h,board.c}: New.
736 * src/main.c (my_sduRequestsHook): New.
737 (LED_ONESHOT_SHORT, LED_ONESHOT_LONG): New.
738 (led_blinker): Support LED_ONESHOT_SHORT and LED_ONESHOT_LONG.
739 (main): Call neug_prng_reseed for each new connection.
741 2011-10-07 NIIBE Yutaka <gniibe@fsij.org>
743 * src/random.c (neug_wait_full): New (from Gnuk).
745 2011-10-06 NIIBE Yutaka <gniibe@fsij.org>
747 * src/random.c (neug_flush): New.
748 (neug_prng_reseed): Call neug_flush.
750 2011-10-05 NIIBE Yutaka <gniibe@fsij.org>
752 * boards/common/board-common.c (__early_init): Set MSP register
755 2011-10-04 NIIBE Yutaka <gniibe@fsij.org>
757 * src/chconf.h (THREAD_CONTEXT_SWITCH_HOOK): New.
759 * src/Makefile.in: Follow the change of ChibiOS 2.3.3 (new
760 directory structure of platforms/STM32F1xx).
762 * src/main.c (vcom_configuration_descriptor_data, usb_event):
763 Follow the change of ChibiOS 2.3.3 (USB_CDC_*).
764 (vcom_string3): Version 0.01.
766 * src/configure (MEMORY_SIZE): New.
768 * src/neug.ld.in (@MEMORY_SIZE@): New (for HD device like STBEE).
769 (.stacks): New in newer ChibiOS (>= 2.3.3).
771 * src/random.c (adccb_err): New.
772 (adcgrpcfg): Add adccb_err.
774 * chibios: Updated to trunk of 2.3.3.
776 2011-09-27 NIIBE Yutaka <gniibe@fsij.org>
778 * src/random.c (adcgrpcfg): Fix configuration value (had old
779 values by old example).
781 2011-09-22 NIIBE Yutaka <gniibe@fsij.org>
783 * src/random.c (ROTATE): Remove.
785 (ep_add): Use SHIFT_RIGHT.
787 2011-09-21 NIIBE Yutaka <gniibe@fsij.org>
789 * src/random.c (ep_output): Bug fix for second argument of
790 fnv32_hash, and change the way to place values into the buffer.
791 (ep_add): Feedback byte always shift 1-bit, entropy_bit sometimes.
793 2011-09-20 NIIBE Yutaka <gniibe@fsij.org>
795 * boards/STBEE/mcuconf.h, boards/STBEE/board.h: New.
796 * boards/STBEE/board.c: New.
797 * boards/common/board-common.c (pal_default_config): Add case for
799 * src/configure: Support STBEE.
801 * src/random.c (PROBABILITY_50_BY_TICK): New.
802 (ep_add): Use ROTATE for final feedback only.
804 (ep_output): Rename (was: ep_value). Use fnv32_hash.
806 2011-08-29 NIIBE Yutaka <gniibe@fsij.org>
808 * src/random.c (ep_add): New argument another_random_bit.
809 (crc32_top_bit, crc32_add_bit): Delete.
811 (rng_gen): Call ep_add with SysTick->VAL shake.
812 Don't shake PRNG by interrupt timing.
813 (neug_prng_reseed): New.
815 * src/main.c (main): Call neug_prng_reseed after new connection.
817 * src/neug.h (neug_prng_reseed): New.
819 2011-08-19 NIIBE Yutaka <gniibe@fsij.org>
821 * src/random.c (tmt_one_step): No argument.
822 (crc32_top_bit, crc32_add_bit): New.
823 (rng_gen): Have return value. Put interrupt timing entropy
824 to CRC32 shift register, and use the top bit of CRC32 to
825 shake the steps of TMT.
827 2011-08-10 NIIBE Yutaka <gniibe@fsij.org>
829 * boards/STM8S_DISCOVERY/mcuconf.h: New.
830 * boards/STM8S_DISCOVERY/board.h: New.
831 * boards/STM8S_DISCOVERY/board.c: New.
833 2011-07-22 NIIBE Yutaka <gniibe@fsij.org>
835 * boards/OLIMEX_STM32_H103/mcuconf.h (STM32_USBPRE): Add.
837 * src/main.c (main): Fix one shot logic.
839 2011-07-21 NIIBE Yutaka <gniibe@fsij.org>
841 * src/neug.h (NEUG_PRE_LOOP): New.
843 * src/main.c (led_blinker): New.
844 (main): Use led_blinker.
845 (main): Call neug_get before USB configuration at least
848 2011-07-14 NIIBE Yutaka <gniibe@fsij.org>
850 * src/configure: Support CQ_STARM.
851 * boards/CQ_STARM: Added.