mirror of
https://github.com/wownero/RandomX.git
synced 2026-10-19 08:18:45 +02:00
Changes recommended by Quarkslab (#111)
* Corrected bounds for some configuration parameters * Clarifications in the specification * Check validity of Argon2 parameters
This commit is contained in:
@@ -38,6 +38,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <cstring>
|
||||
#include <cassert>
|
||||
|
||||
#include "common.hpp"
|
||||
#include "dataset.hpp"
|
||||
@@ -91,6 +92,9 @@ namespace randomx {
|
||||
context.flags = ARGON2_DEFAULT_FLAGS;
|
||||
context.version = ARGON2_VERSION_NUMBER;
|
||||
|
||||
int inputsValid = rxa2_validate_inputs(&context);
|
||||
assert(inputsValid == ARGON2_OK);
|
||||
|
||||
/* 2. Align memory size */
|
||||
/* Minimum memory_blocks = 8L blocks, where L is the number of lanes */
|
||||
memory_blocks = context.m_cost;
|
||||
|
||||
Reference in New Issue
Block a user