xtea的python版本
xtea4的Python项目详细描述
这是用python(扩展的微型加密算法)实现的xtea密码。
XTEA is a blockcipher with 8 bytes blocksize and 16 bytes Keysize (128-Bit). The algorithm is secure at 2014 with the recommend 64 rounds (32 cycles). This implementation supports following modes of operation: ECB, CBC, CFB, OFB, CTR
示例:
>>> from xtea4 import * >>> key = " "*16 # Never use this >>> text = "This is a text. "*8 >>> x = new(key, mode=MODE_OFB, IV="12345678") >>> c = x.encrypt(text) >>> text == x.decrypt(c) True
注
I do NOT guarantee that this implementation (or the base cipher) is secure. If you find bugs, please report them at https://github.com/tgates42/xtea/issues .
变更日志
(开发)版本0.6.1;…
- Improved tests
- PEP8-style formatting
- Unittests: Counter, modes (but not results of them!), test vectors
- [BREAKING CHANGE] Counter class is now in xtea4.counter
(未发布)版本0.6.0;2016年10月16日
- Python 3 does work now
- [BREAKING CHANGE] counters cannot return numbers any more, they must return bytestrings now
- [BREAKING CHANGE] Cipher objects remember state, so two consecutive calls to XTEACipher.encrypt should not return the same
- improved documentation
- Python 3 does work now
- [BREAKING CHANGE] counters cannot return numbers any more, they must return bytestrings now
- [BREAKING CHANGE] Cipher objects remember state, so two consecutive calls to XTEACipher.encrypt should not return the same
- improved documentation
(未发布)版本0.5.0;2016年10月15日
- Removed CBCMAC
- Removed CBCMAC
版本0.4.1;2015年7月30日
- Fixed installer
- Fixed installer
版本0.4.0;2014年7月12日
- Buggless & PEP compliant CTR
- CTR mode works with strings now
- raises DeprecatedWarning if a number is returned
- CBCMAC class added (use static method CBCMAC.new(args) to create)
- Buggless & PEP compliant CTR
- CTR mode works with strings now
- raises DeprecatedWarning if a number is returned
- CBCMAC class added (use static method CBCMAC.new(args) to create)
版本0.3.2;2014年7月11日
- Minor Fixes
- Minor Fixes
版本0.3.1;2014年7月11日
- Minor Fixes
- Fixed that the length of data will not be checked
- Minor Fixes
- Fixed that the length of data will not be checked
版本0.3.0;2014年7月11日
- Added CFB mode
- Fully working with PEP 272
- Raising NotImplementedError only on PGP-CFB (OpenPGP) mode
- Wheel support and changelog (0.2.1)
- Added CFB mode
- Fully working with PEP 272
- Raising NotImplementedError only on PGP-CFB (OpenPGP) mode
- Wheel support and changelog (0.2.1)
版本0.2.1-dev;2014年7月10日
从未发布…
- Added better wheel support for uploading (just for me) with a setup.cfg
- Added this file (auto uploading on pypi/warehouse and github)
- (upload.py for github)
版本0.2.0;2014年7月9日
- Added a test feature; warning in CTR
- Added a test feature
- Raises warning on CTR, added a handler that CTR will not crash anymore ;)
- Added a test feature; warning in CTR
- Added a test feature
- Raises warning on CTR, added a handler that CTR will not crash anymore ;)
版本0.1.1;2014年7月9日
[0.1.1]在循环流化床上不执行错误
- Module raises a NotImplementedError on CFB
- Minor changes
版本0.1;2014年6月22日
[0.1]初始版本
- Supports all mode except CFB
- Buggy CTR ( “ß” = “\xc3\x9f” )
- Working with PEP 272, default mode is ECB