/stream-cipher

Implementation of stream cipher using block cipher i.e. AES ECB mode

Primary LanguagePython

Stream Cipher

Implementation of stream cipher using block cipher i.e. AES ECB mode

Instructions

  • 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
    

Reference:

Known Issues

Error installing Python cryptography library:

    sudo apt-get install build-essential libssl-dev libffi-dev python-dev

pytest does not show stdout if test passed:

Solution: add -s argument

pytest and py.test behave inconsistenly:

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