RSA/ECB/PKCS1Padding Auth Test GET /pubkey → PEM public key POST /auth → JSON body: {"token": ""} Returns: {"authenticated": true, "decrypted": "..."} Or: {"authenticated": false, "error": "..."} Python client example: from Crypto.PublicKey import RSA from Crypto.Cipher import PKCS1_v1_5 import base64, requests pub = RSA.import_key(requests.get("/pubkey").text) enc = PKCS1_v1_5.new(pub).encrypt(b"hello") r = requests.post("/auth", json={"token": base64.b64encode(enc).decode()}) print(r.json())