doCrypto method for asymetric key (RSA)
Regarding the two different methods for the encrypt/decrypt, yes, you can reduce them to just one function. The PrivateKey and PublicKey classes both extend the Key interface, and that's what's needed for the init(...) function.

Note also, that you are doing some code-style things "wrong". Your try/catch code should be using the more modern try-with-resources mechanism, and there's no need to declare the byte[] array outside the try block.

So, reducing it all down to a single method, with improved code style, it would be:

private static byte[] doCrypto(int cipherMode,  Key key, byte[] inputBytes) 
          throws CryptoException {

    try (Cipher cipher = Cipher.getInstance("RSA")) {
        cipher.init(cipherMode, key);
        return cipher.doFinal(inputBytes);
    } catch (NoSuchPaddingException
            | NoSuchAlgorithmException
            | InvalidKeyException
            | BadPaddingException
            | IllegalBlockSizeException ex) {
        throw new CryptoException("Error doCrypto", ex);
    }
}