Dear all,

I'm trying to figure out how to make a multiplicative cipher in SAGE.
For example, to make a multiplicative cipher:
M_9{m} = 9 x_{26} m
and to use it to encipher the text 'HAPPYNEWYEAR', I tried typing:

   A = AffineCryptosystem(AlphabeticStrings())
   P = A.encoding("HAPPYNEWYEAR"); P 
   a, b = (9, 0) 
   C = A.enciphering(a, b, P); C

I get back:
LAFFINKQIKAX

However, I think I should get back:
TINNQVSYQSIF
assuming A=1, B=2, C=3, D=4.... Y=25, Z=26

In order to get 'TINNQVSYQSIF', I have to type:
   a, b = (9, 8) 
instead of
   a, b = (9, 0) 
I am wondering why this is?

I had thought:
   a, b = (9, 0) 
should give the multiplicative cipher:
M_9{m} = 9 x_{26} m 
Is this wrong?

I would be grateful for any pointers. 

Kind Regards,
Avril 

Avril Coghlan


-- 
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-support
URL: http://www.sagemath.org

Reply via email to