# Ticket #1 (closed discussion: closed)

## Where should the statistical tests be placed?

Reported by: | pchapin | Owned by: | pchapin |
---|---|---|---|

Priority: | major | Milestone: | Statistical Tests |

Component: | Library | Version: | |

Keywords: | Cc: |

### Description

There are two obvious possibilities: inside the Generator component or in the Library component. If the tests are in the generator they will be done regardless of if the library is present or not. This is more secure; if the library is secretly modified the tests in the generator will still detect degraded randomness.

On the other hand, the statistical tests are likely to be computationally expensive. It would be easier/better/faster to implement those tests in a library on the host computer than in an embedded environment. Anyway if an attacker can replace the library there are other security problems to worry about.

I believe the statistical tests should be in the Library.

## Change History

**Note:**See TracTickets for help on using tickets.

In order to keep the computational resources of the Generator component reasonable it has been decided to implement the statistical tests in the Library component. However, the implementation should be made modular, if possible, to make it easier to move at a later time. Also it might be nice to have the option of "snapping in" different test modules.