code: private static KeyPair newKeyPair() throws Exception {
          KeyPairGenerator kpGen = KeyPairGenerator.getInstance(KEY_ALGORITHM, BC);
          kpGen.initialize(KEY_LENGTH, new SecureRandom());
          return kpGen.generateKeyPair();
      }
docs: Generate a new keypair.
  
  @return a keypair
  @throws Exception