OTP Encryption should use XOR
Bug #901058 reported by
aj00200
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Anonplus |
Fix Released
|
Wishlist
|
Vomun Security Team |
Bug Description
The OTP encryption module is currently using addition and then modulo division to preform encryption but XOR encryption would be much better since it works at the bit level and it would probably be faster.
XOR can be preformed by PyCrypto (which is probably fast, at least if the faster math stuff is available). Otherwise, the following code works, however is significantly slower than XOR in PyCrypto.
"".join(chr(ord(p) ^ ord(o)) for plain[i],otp[i] in range(len(plain))
Related branches
lp://staging/~aj00200/anonplus/bug-901058
- al1ce (community): Approve (security)
- aj00200: Approve (security)
-
Diff: 59 lines (+13/-28)1 file modifiedsrc/libs/encryption/otp.py (+13/-28)
visibility: | private → public |
description: | updated |
Changed in anonplus: | |
assignee: | aj00200 (aj00200) → Vomun Security Team (vomun-security) |
milestone: | none → build-8 |
Changed in anonplus: | |
milestone: | build-8 → build-7 |
Changed in anonplus: | |
status: | Triaged → Fix Committed |
Changed in anonplus: | |
milestone: | build-7 → r212 |
status: | Fix Committed → Fix Released |
To post a comment you must log in.