473,387 Members | 3,821 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

transposition cipher

hi there!!
i recently started java courses and i don't have much knowledge of it. i really hope you can help me with this..
here's what has been asked:

A transposition cipher first chooses a key to number the columns, then write a plaintext in rows, and finally reads
the ciphertext by columns, staring with the column whose key letter is the lowest alphabetically. Shown below is
one example whereby a string ‘jamesbond’ is used as the key:

j amesbond

(5)(1)(6)(4)(9)(2)(8)(7)(3)
plaintext :

s e n d o n e send one million euros to my swiss
mi l l i on e bank account
uros to m
y s w i s s b ciphertext :

EIR NTOOTSCG EMBUADLSW
YSMUYANNLOSK E OINNOSCH
I IAE

Write a program TranspositionCipher.java that reads a key from the keyboard and a plaintext from a file
plain.txt, then displays the ciphertext. The plain.txt may contain multiple lines with lower case letters and
spaces. A sample of plain.txt is provided on the com6470 webpage, however your code should be able to handle
other input files. The ciphertext should be displayed on the screen using upper case letters and spaces. A key is a
sequence of lower case letters only, and any letter cannot appear more than once. If there is more than one space
left in the final row, they should be filled in with randomly generated lower case letters before encryption.

please heeeeellllpppppppp!! :)
Nov 3 '06 #1
1 3908
vssp
268 100+
Hi friend

I am not clear what u n eed exactly. can u expline breifly.

vssp
Nov 4 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Michael Sparks | last post by:
Hi, I suspect this is a bug with AMK's Crypto package from http://www.amk.ca/python/code/crypto , but want to check to see if I'm being dumb before posting a bug report. I'm looking at...
4
by: Carl Harris | last post by:
I am trying to write some code to: 1.Prompt a user for filenames 2.Open the files 3.Convert my plain text into a cipher text array/string bear in mind I am a novice! I have wriiten some code...
7
by: Piotr Turkowski | last post by:
Hi! Here you can get some notes about Vigenere Cipher: http://raphael.math.uic.edu/~jeremy/crypt/vignere.html Here's whole code of my program, function stats() is in polish, so you can omit...
9
by: Piotr Turkowski | last post by:
Hi, The code is here: http://free.ud.pl/~piotr/data/vigenere.zip Its my program for decrypting and encrypting text. Shot polish course: szyfrowanie (szyfruj) - encrypting (text i want to code...
1
by: mkazek | last post by:
hi, where i can find source codes to encipher/decipher files with Hill's cipher and Transpositon Cipher?? (preferably vc++ source code)
2
by: Julio C. Hernandez Castro | last post by:
Dear all, We have just developped a new block cipher called Raiden, following a Feistel Network structure by means of genetic programming. Our intention now consists on getting as much feedback...
1
by: beetle17 | last post by:
Plaintext: a  n i c e  d a y Key: -3 Ciphertext: X  k f Z b  a X v Cipher will accept commands from the user and perform the operations required by the commands. There are three different...
4
by: wagn31 | last post by:
i need to use a cipher but I have to used the assigned code in the ciphering i know how to do it, but i am not sure how to add my own dictionary. Here is what i have so far:
2
by: yeruvavasavi | last post by:
Algorithm 1: Write python programs to translate the following algorithm so that the computer can execute it. Algorithm for ceaser cipher. Plain: ABCDEFGHIJKLMNOPQRSTUVWXYZ<br> Cipher: ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.