Proof of concept code from [AHHPVW].
[AHHPVW] Martin R. Albrecht, Christian Hanser, Andrea Hoeller, Thomas Pöppelmann, Fernando Virdia, Andreas Wallner, "Learning with Errors on RSA Co-Processors", 2018, https://eprint.iacr.org/2018/425
To test the implementation in Sagemath 9, pytest needs to be installed.
$ sage -sh
(sage-sh) $ pip install pytest
(sage-sh) $ exit
Tests can then be run using
$ sage -t test.py