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:
tevador
2019-08-25 13:47:21 +02:00
committed by GitHub
parent 91f3edb5eb
commit 971f10c9c2
6 changed files with 30 additions and 21 deletions
+4
View File
@@ -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;