verifyArgsDictRandomized = {} randomizedIncorrectSigIndices = [] for sigIndex in range(0, (numValidSigs + numInvalidSigs)): verifyArgsDictRandomized[sigIndex] = sigsDict[ randomizedIndices[sigIndex]] if (randomizedIndices[sigIndex] in realIncorrectSigIndices): randomizedIncorrectSigIndices.append(sigIndex) verifyFuncArgs = list(verifyArgsDictRandomized[0].keys()) bID1 = InitBenchmark() StartBenchmark(bID1, [RealTime]) incorrectSigIndices = runBLS_Ind(verifyArgsDictRandomized, groupParamArg, verifyFuncArgs) EndBenchmark(bID1) result = (GetBenchmark(bID1, RealTime) / trials) * time_in_ms TIMER += result TOTAL_SIGS = float(numValidSigs + numInvalidSigs) SIGS_PER_SECOND = float((TOTAL_SIGS * 1000.0) / (float(result))) #outputString += str(TIMER) + " " + str(SIGS_PER_SECOND) + "\n" updateBucketList(bucketListSigsPerSec, (TIMER - result), result, SIGS_PER_SECOND) percentInvalid = (float(numInvalidSigs) / TOTAL_SIGS)
batchResultsTimes[programIteration][cycle] = ( float(result) / float(cycle+1) ) # ----------------------------------------------------------------- #bID1 = InitBenchmark() #StartBenchmark(bID1, [RealTime]) startTime = time.clock() incorrectSigIndices = runBLS_Ind(sigsDict, groupParamArg, verifyFuncArgs) endTime = time.clock() result = (endTime - startTime) * time_in_ms #print("ind is ", result) #EndBenchmark(bID1) #result = (GetBenchmark(bID1, RealTime) / trials) * time_in_ms if (incorrectSigIndices != []):
#result = (GetBenchmark(bID1, RealTime) / trials) * time_in_ms if (incorrectSigIndices != []): sys.exit("Batch verification returned invalid signatures.") batchResultsTimes[programIteration][cycle] = (float(result) / float(cycle + 1)) # ----------------------------------------------------------------- #bID1 = InitBenchmark() #StartBenchmark(bID1, [RealTime]) startTime = time.clock() incorrectSigIndices = runBLS_Ind(sigsDict, groupParamArg, verifyFuncArgs) endTime = time.clock() result = (endTime - startTime) * time_in_ms #print("ind is ", result) #EndBenchmark(bID1) #result = (GetBenchmark(bID1, RealTime) / trials) * time_in_ms if (incorrectSigIndices != []): sys.exit("Ind. verification returned invalid signatures.") indResultsTimes[programIteration][cycle] = (float(result) / float(cycle + 1))
verifyArgsDictRandomized = {} randomizedIncorrectSigIndices = [] for sigIndex in range(0, (numValidSigs + numInvalidSigs)): verifyArgsDictRandomized[sigIndex] = sigsDict[randomizedIndices[sigIndex]] if randomizedIndices[sigIndex] in realIncorrectSigIndices: randomizedIncorrectSigIndices.append(sigIndex) verifyFuncArgs = list(verifyArgsDictRandomized[0].keys()) bID1 = InitBenchmark() StartBenchmark(bID1, [RealTime]) incorrectSigIndices = runBLS_Ind(verifyArgsDictRandomized, groupParamArg, verifyFuncArgs) EndBenchmark(bID1) result = (GetBenchmark(bID1, RealTime) / trials) * time_in_ms TIMER += result TOTAL_SIGS = float(numValidSigs + numInvalidSigs) SIGS_PER_SECOND = float((TOTAL_SIGS * 1000.0) / (float(result))) # outputString += str(TIMER) + " " + str(SIGS_PER_SECOND) + "\n" updateBucketList(bucketListSigsPerSec, (TIMER - result), result, SIGS_PER_SECOND) percentInvalid = float(numInvalidSigs) / TOTAL_SIGS # outputInvalidSigsString += str(TIMER) + " " + str(percentInvalid) + "\n"