You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The class SubstitutionCryptosystem accepts keys whose values are alphabetic characters. We should implement a method to allow a key
to be converted between alphabetic characters and numerical values. For example, here is what I have in mind:
I think it would be better to add some kind of conversion/coercion for string monoids instead of specifically for substitution cryptosystem strings. Also I don't believe there is an ASCII/byte value monoid. In either case, that would be a different ticket (see #9118). If someone still wants that they should open a new ticket.
This is also pretty easy to do by hand if someone wants to. For example, to take and element from an alphabetic monoid to a list of ascii values you can use this:
The class
SubstitutionCryptosystem
accepts keys whose values are alphabetic characters. We should implement a method to allow a keyto be converted between alphabetic characters and numerical values. For example, here is what I have in mind:
Generalizing from this, we can also have methods to do the following conversions:
from alphabetic characters to binary values and vice versa
from alphabetic characters to hexadecimal values and vice versa
from alphabetic characters to mod 26 values and vice versa
from alphabetic characters to ASCII values and vice versa
Component: cryptography
Keywords: substitution cryptosystem
Reviewer: Travis Scholl
Issue created by migration from https://trac.sagemath.org/ticket/6565
The text was updated successfully, but these errors were encountered: