Is there a way to encrypt a pdf with 128AES using only preinstalled ubuntu software of software from main repository? I noticed that exproting from libre office into pdf (one possibility) encrypts it whith a week encryption. Is there a way to to it e.g. using qpdf?
After installing qpdf, you can encrypt pdf with password of your choice from command line in the following way.
qpdf --encrypt test123 test123 40 -- doc_without_pass.pdf doc_with_pass.pdf
Where test123 is both the user and owner password
To decrypt the pdf file you can use the following
qpdf --password=test123 --decrypt doc_with_pass.pdf doc_without_pass2.pdf