1.you are generating a new RSA keypair on every run.Save private/public key to disk and then load it on subsequent runs.
2. you are also splitting the files into 128-byte chunks.With a 2048‑bit RSA key, each ciphertext is 256 bytes, so you’re cutting ciphertexts in half.when you are writing Files.write(path, (Base64(ct) + "\n").getBytes(...), CREATE, APPEND).
3. Use Base64.getEncoder().encodeToString(bytes) or Arrays.toString(bytes).