wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes Problem with Linear Transformation method in Cipher program Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Problem with Linear Transformation method in Cipher program" Watch "Problem with Linear Transformation method in Cipher program" New topic
Author

Problem with Linear Transformation method in Cipher program

Christina Arsenault
Greenhorn

Joined: Oct 23, 2007
Posts: 2
We have to write a cipher program for an assignment. Here's the code for it, it has been documented. The input we are using is {10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,160}. The output is meant to be {127,178,145,50,74,59,90,63,36,168,182,106,211,94,8,188} after two rounds. We are not getting the right output and we have determined that the flaw in our program occurs in the linear transformation method (lines 179-213). We've been looking at this program for hours and are having problems finding an error. If someone could take a look at it, we would love them forever!

Here's the code:
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

Originally posted by Christina Arsenault:
... We are not getting the right output and we have determined that the flaw in our program occurs in the linear transformation method (lines 179-213)...

How are you testing this method?

In other words, what exactly is the "second part of the linear transformation" supposed to do?
[ October 23, 2007: Message edited by: marc weber ]

"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with Linear Transformation method in Cipher program
 
Similar Threads
Programming Diversion 2a: Applying a Key
cant find solution - OutOfBoundsException
Scanner class help
javax.crypto.BadPaddingException: Given final block not properly padded
Programming Diversion 2b: Applying a hat