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
When asking for EDDSA SigGen tests with "contextLength": [128] in my registration.json file, the generation fails with the following error: Error NIST.CVP.ACVTS.Libraries.Generation.Core.Generator`4 System.ArgumentException: min must be less than or equal to max
After investigation, I found that in gen-val/src/generation/src/NIST.CVP.ACVTS.Libraries.Generation/EDDSA/v1_0/SigGen/TestCaseGenerator.cs, the code to sample context lengths at line 40 has been changed to get random values between min+1 and max-1, which raises such exception when there is only one element in the domain.
I suggest to restore to the previous way of sampling values. Here is a patch suggestion:
diff --git a/gen-val/src/generation/src/NIST.CVP.ACVTS.Libraries.Generation/EDDSA/v1_0/SigGen/TestCaseGenerator.cs b/gen-val/src/generation/src/NIST.CVP.ACVTS.Libraries.Generation/EDDSA/v1_0/SigGen/TestCaseGenerator.cs
index 26ae3b4a..b5188f90 100644
--- a/gen-val/src/generation/src/NIST.CVP.ACVTS.Libraries.Generation/EDDSA/v1_0/SigGen/TestCaseGenerator.cs
+++ b/gen-val/src/generation/src/NIST.CVP.ACVTS.Libraries.Generation/EDDSA/v1_0/SigGen/TestCaseGenerator.cs
@@ -36,8 +36,8 @@ namespace NIST.CVP.ACVTS.Libraries.Generation.EDDSA.v1_0.SigGen
var min = group.ContextLength.GetDomainMinMax().Minimum;
var max = group.ContextLength.GetDomainMinMax().Maximum;
- // We always add min and max, so get between min+1 and max-1
- var lengths = group.ContextLength.GetRandomValues(min+1, max-1, NumberOfTestCasesToGenerate - 2).ToList();
+ // We always add min and max
+ var lengths = group.ContextLength.GetRandomValues(min, max, NumberOfTestCasesToGenerate - 2).ToList();
lengths.Add(min);
lengths.Add(max);
The text was updated successfully, but these errors were encountered:
Hello @lukbettale, apologies for the issue. This has been resolved and will go out with the next release. We'll reply here once that's available to you. Thanks for your patience!
When asking for EDDSA SigGen tests with
"contextLength": [128]
in myregistration.json
file, the generation fails with the following error:Error NIST.CVP.ACVTS.Libraries.Generation.Core.Generator`4 System.ArgumentException: min must be less than or equal to max
After investigation, I found that in
gen-val/src/generation/src/NIST.CVP.ACVTS.Libraries.Generation/EDDSA/v1_0/SigGen/TestCaseGenerator.cs
, the code to sample context lengths at line 40 has been changed to get random values between min+1 and max-1, which raises such exception when there is only one element in the domain.I suggest to restore to the previous way of sampling values. Here is a patch suggestion:
The text was updated successfully, but these errors were encountered: