title: Why does bigInt give different result when calc. pow() (using npm big-integer)? How to decrypt given number?
body: <p>I'm trying to decrypt my encrypted number.</p>
  <p>with the function</p>
  <pre><code>function decrypt(arg){
    let encrypNum =  bigInt(arg).pow(dNum(eNum,eValue)) 
    let result = encrypNum%b
    return result
  }
  </code></pre>
  <p>In values it looks like this:</p>
  <p>The encrypted value is seven.</p>
  <p>result = 7.pow(103)%143
  and it should return 123 but it still returns 38. I thought that the number was to big so I used the bigInt method but it still returns 38.</p>
  <p>The solution for that should be (that below is not a code, its smth like a pseudo code, since I don't know how to write math in sof. Sorry, will work on that) :
  7.pow(103) mod 143 = 7.pow(64) * 7.pow(32) * 7.pow(4) * 7.pow(2) * 7.pow(1) mod 143</p>
  <p>which equals</p>
  <p>113 × 16 × 113 × 49 × 7 mod 143 = 123</p>
  <p>But why is my bigInt method not working and why they show different results? If the second method is the correct method how to implement that in a code ?</p>
  <p>First code:</p>
  <pre><code>function decrypt(arg){
    let encrypNum = Math.pow(arg,dNum(eNum,eValue))
    let result = encrypNum%b
    return result
  }
  </code></pre>