code: function generateKeys(params) {
      //Choose a secret key x by some random method, where 0 < x < q.
      //Calculate the public key y = g ^ x mod p.
  
      let priKey = 0;
      let pubKey = 0;
  
      do {
          priKey = params.q - Math.round(Math.random() * params.q * 3 / 4);
          pubKey = myNumbers.modPow(params.g, priKey, params.p);
      } while (pubKey < 100);
  
      return {
          pub: pubKey,
          pri: priKey
      }
  }
docs: non strict implementation of DSA
  used sources:
  https://en.wikipedia.org/wiki/Digital_Signature_Algorithm
  http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-4.pdf
  
   
  generates private and public keys
  @param {{q: number, p: number, g: number}} params - shared DSA params, can be generated with shared-params.generateSharedParams, all parties should use same params
  @returns {{pub: number, pri: number}}