code: function multMod_(x, y, n) {
    var i;
    if (s0.length!=2*x.length)
      s0=new Array(2*x.length);
    copyInt_(s0, 0);
    for (i=0; i<y.length; i++)
      if (y[i])
        linCombShift_(s0, x, y[i], i);   //s0=1*s0+y[i]*(x<<(i*bpe))
    mod_(s0, n);
    copy_(x, s0);
  }
docs: do x=x*y mod n for bigInts x,y,n. for greater speed, let y<x.