1. A device comprising: one or more resistive memory elements; a random number generator configured to generate a random number dependent on an impedance value of at least one of the one or more resistive memory elements; and a control circuit configured to provide a programming signal to the at least one resistive memory element to configure an impedance value of the at least one resistive memory element of the one or more resistive memory elements, wherein the control circuit is further configured to vary at least one characteristic of the programming signal to alter a degree of randomness of impedance values of the one or more resistive memory elements.