Deep in the basement of a dusty university library in Edinburgh lies a small black box, roughly the size of two cigarette packets side by side, that churns out random numbers in an endless stream. At first glance it is an unremarkable piece of equipment.