Minimal implementation of secure random generation.