You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: doc/configuration.md
+17-1
Original file line number
Diff line number
Diff line change
@@ -192,14 +192,30 @@ There is a total of 29 different instructions. The sum of frequencies must be eq
192
192
193
193
#### Notes
194
194
195
-
Making large changes to the default values is not recommended. The only exceptions are the instruction pairs IROR_R/IROL_R, FADD_R/FSUB_R and FADD_M/FSUB_M, which are functionally equivalent.
195
+
Making changes to the default values is not recommended. The only exceptions are the instruction pairs IROR_R/IROL_R, FADD_R/FSUB_R and FADD_M/FSUB_M, which are functionally equivalent. Example of a safe custom configuration:
196
+
197
+
||default|custom|
198
+
|-|------|------|-|
199
+
|`RANDOMX_FREQ_IROR_R`|8|5|
200
+
|`RANDOMX_FREQ_IROL_R`|2|5|
201
+
202
+
||default|custom|
203
+
|-|------|------|
204
+
|`RANDOMX_FREQ_FADD_R`|16|17|
205
+
|`RANDOMX_FREQ_FSUB_R`|16|15|
206
+
207
+
||default|custom|
208
+
|-|------|------|
209
+
|`RANDOMX_FREQ_FADD_M`|5|4|
210
+
|`RANDOMX_FREQ_FSUB_M`|5|6|
196
211
197
212
## Unsafe configurations
198
213
199
214
There are some configurations that are considered 'unsafe' because they affect the security of the algorithm against attacks. If the conditions listed below are not satisfied, the configuration is unsafe and a compilation error is emitted when building the RandomX library.
200
215
201
216
These checks can be disabled by definining `RANDOMX_UNSAFE` when building RandomX, e.g. by using `-DRANDOMX_UNSAFE` command line switch in GCC or MSVC. It is not recommended to disable these checks except for testing purposes.
0 commit comments