#7123: cryptanalysis of the shift cipher
----------------------------+-----------------------------------------------
Reporter: mvngu | Owner: somebody
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-4.1.3
Component: cryptography | Keywords:
Work_issues: | Author: Minh Van Nguyen
Reviewer: | Merged:
----------------------------+-----------------------------------------------
Changes (by mvngu):
* status: needs_work => needs_review
Comment:
The patch `trac_7123-shift.patch` implements the following features for
cryptanalysis of the shift cipher:
1. In the class `StringMonoidElement` of the module
`sage/monoids/string_monoid_element.py`, change the function
`frequency_distribution()` so that it returns a dictionary of probability
distribution. Up until this change, the default behaviour has been to
return the string representation of the said distribution, which can be
difficult to parse if one intends to parse that distribution for useful
statistics. The behaviour of `frequency_distribution()` now is to return a
dictionary that is easier to parse than previously.
1. Add the method `characteristic_frequency()` to the module
`sage/monoids/string_monoid.py` to return the relative frequencies of all
letters of the English alphabet.
1. The method `brute_force()` for the class `ShiftCryptosystem` to
perform exhaustive key search. I have no idea how to order the possible
keys by likelihood of being the key closest to the real key. A promising
algorithm is via the chi-square statistic as presented at
http://starbase.trincoll.edu/~crypto/historical/caesar.html
Would you consider that OK to implement?
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7123#comment:5>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---