Implementation of stream cipher using block cipher i.e. AES ECB mode
-
Install and initilize virtualenv:
pip install virtualenv virtualenv --python=python2.7 my-venv
-
Activate/Deactivate virtualenv:
source my-venv/bin/activate deactivate
-
Install Python dependencies:
pip install cryptography pytest
-
Run test_AESCtr and excluding the
my-venv
folder:py.test --ignore=my-venv
-
Run standard debugger pdb
py.test -x --pdb --ignore=my-venv
-
RUN GUI debugger pudb and pytest-pudb:
pip install pudb pytest-pudb py.test -x --pudb --ignore=my-venv
-
Run debugger without pytest:
python -m {pdb|pudb.run} my-script.py
-
Python cryptography: https://cryptography.io/en/latest/
-
Python virtualenv: https://virtualenv.pypa.io/en/latest/userguide/
-
XOR on bytes: http://stackoverflow.com/questions/29408173/byte-operations-xor-in-python
-
Python2.7 Unicode: https://fedorahosted.org/releases/k/i/kitchen/docs/unicode-frustrations.html
-
Python2.7 String Literal: https://docs.python.org/2.7/reference/lexical_analysis.html#string-literals
sudo apt-get install build-essential libssl-dev libffi-dev python-dev
Solution: add -s
argument
pytest
is from logilab-common instead of Python: http://www.christianlong.com/blog/pytest-vs-pytest.html#the-problem
Solution: sudo apt-get autoremove python-logilab-common