import * as binFileUtils from "./binfileutils.js"; /* This function creates a new section in the fdTo file with id idSection. It multiplies the pooints in fdFrom by first, first*inc, first*inc^2, .... nPoint Times. It also updates the newChallangeHasher with the new points */ export async function applyKeyToSection(fdOld, sections, fdNew, idSection, curve, groupName, first, inc, sectionName, logger) { const MAX_CHUNK_SIZE = 1 << 16; const G = curve[groupName]; const sG = G.F.n8*2; const nPoints = sections[idSection][0].size / sG; await binFileUtils.startReadUniqueSection(fdOld, sections,idSection ); await binFileUtils.startWriteSection(fdNew, idSection); let t = first; for (let i=0; i