title: Taking the exponent of a SHA3 hash function
body: <p>I am trying to implement a protocol described in the paper <a href="http://ieeexplore.ieee.org/document/7368584/" rel="nofollow noreferrer">Private Data Aggregation with Groups for Smart Grids in a Dynamic Setting using CRT</a> in python. </p>
  
  <p>In order to do this, I need to calculate the following value: </p>
  
  <p><a href="https://i.stack.imgur.com/DmAMF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DmAMF.png" alt="enter image description here"></a></p>
  
  <p>I know that since python 3.6, you can calculate a SHA3 value as follows:</p>
  
  <pre><code>import hashlib
  hash_object = hashlib.sha3_512(b'value_to_encode')
  hash_value = hash_object.hexdigest()
  </code></pre>
  
  <p>I was wondering you should solve this, since, as far as I know, a SHA-3 function returns a string and therefore cannot be calculated in a function with to the power of n.</p>
  
  <p>What am I overlooking?</p>