Python Flask website
Your main issue is (as you've already noticed) one of code repetition. Some simple helper methods here will do the trick; caveat - untested:

from flask import Flask, render_template, request, url_for, jsonify
from ciphers import RSA, DES
from prime import generate_semiprime_number as gspn

app = Flask(__name__)
get_form = None

@app.route('/')
def index():
    return render_template('index.html')

def do_rsa(encrypting):
    global get_form

    direction = 'en' if encrypting else 'de'
    tmpl = f'rsa_{direction}crypt.html'

    if request.method == 'GET':
        return render_template(tmpl, gf=True)

    kwargs = {'p': request.form.get('p'),
              'q': request.form.get('q'),
              'e': request.form.get('e')}
    if encrypting:
        rsa = RSA(request.form.get('pt'), **kwargs)
    else:
        ct = [int(x) for x in request.form.get('ct')[1:-1].split(',')]
        rsa = RSA(ciphertext=ct, **kwargs)

    kwargs = {}
    if encrypting:
        kwargs['gpsn'] = gpsn
    return render_template(tmpl, gf=False, rsa=rsa, **kwargs)

@app.route('/rsa_encrypt', methods=('GET', 'POST'))
def RSA_enc():
    return do_rsa(True)

@app.route('/rsa_decrypt', methods=('GET', 'POST'))
def RSA_dec():
    return do_rsa(False)

def do_des(encrypting):
    global get_form

    direction = 'en' if encrypting else 'de'
    tmpl = f'des_{direction}crypt.html'

    if request.method == 'GET':
        return render_template(tmpl, gf=True)

    kwargs = {'user_key': request.form.get('key')}
    if encrypting:
        des = DES(request.form.get('pt'), **kwargs)
    else:
        des = DES(ciphertext=request.form.get('ct'), **kwargs)

    return render_template(tmpl, gf=False, des=des)


@app.route('/des_encrypt', methods=('GET', 'POST'))
def DES_enc():
    return do_des(True)

@app.route('/des_decrypt', methods=('GET', 'POST'))
def DES_dec():
    return do_des(False)

@app.route('/gpsn', methods=('POST',))
def _gpsn():
    return jsonify({'result' : str(gspn(request.form['bits']))})


if __name__ == '__main__':
    app.run()