Restored and tested RSA reference engine