I'm trying to encrypt "Hello world" using Twofish algorithm in python. I use this package https://pypi.python.org/pypi/twofish/0.3.0
There's no problem encrypting the message, however I want to set cipher mode to CBC and I don't know how to do it. There's no explanation about how to set cipher mode in document and I can't find the answer when I search in google.
So, have anyone used this package before? and how could you set the cipher mode? please help
This library does not enable you to choose a cypher mode. It is based on libtowfish, and the documentation of the library states (emphahsis is mine) :
You will need to implement modes yourself (if this is for a serious application, you probably should not), or find a library that does it for you. As far as I know, the main crypto libraries in Python (PyCryptodome, Cryptography) does not have twofish implemented.