« Lots of posts | Main | Your wish is my command ... »

November 28, 2005

CHALLENGE 7B FIRST HINT

.... if this can be called a first hint given the amount of information leaking out in the comments.


If you haven't figured this out yet, Challenge 7B is encrypted with a Hill cipher. You should have enough of a crib to almost get this without too much work, but of course we haven't made it too easy.

The clue in part 7A was the reference to "steep'. Not much of a clue but it was there and professionals work with less!

Knowing this you could this worse than read the comments from the over the weekend looking for info about how to tackle this cipher. There seems to be a concensus that you are better off trying to solve the simultaneous equations using the obvious crib, together with a bit of brute force and common sense. Good luck.

Posted by Harry at November 28, 2005 09:46 AM

Comments


If you wish to leave a comment please act responsibly. No personal or innapropriate comments should be made. Concerns about a comment should be emailed directly to us here. Hints about the challenges may be blocked or held back at our discretion. We reserve the right to refuse to publish comments without entering into a discussion about why, and to censor comments as we see fit. Please be patient if it takes a while for your comments to be approved.

woohoo! dun em both! we found a GREAT website but had to use a different web browser to be able to use it. you might also want to try this if a program doesnt work for you! try firefox!

Posted by: charlie at December 6, 2005 04:26 PM

You are right - on both accounts; but I was up making a programme for the 'fialka' machine (quotation marks to keep everyone happy). Besides, I was having a lie in in the morning.

Posted by: Stephen Harris at December 2, 2005 05:34 PM

Can we have a new comments thread please, Harry?

[Your wish is my command, Harry]

Posted by: Laura at December 2, 2005 03:43 PM

Yay! pencil and paper rocks! Last year I made a little pack of cards with numbers on and got annoyed when anyone so much as touched them. I don't know what I would have done if there was an earthquake and they were knocked off the table...

Posted by: cecil at December 2, 2005 07:55 AM

I think you've answered that particular riddle successfully, Stephen! And I didn't know that about Korea. But don't you think it makes it slightly more interesting if they attack each other? :)

Also, Stephen, don't you think you were up a bit late? Or early. Even later than me. I wonder if any other cipher challengers stay up so late?

Posted by: Jess at December 2, 2005 07:26 AM

In reply to Jess:
When Russians communicate in English and the Americans expect their cryptographer's to decrypt their own messages - oh and the Russians and Americans openly attack each other. During the Cold War neither officially attacked the other - in Korea, Russian pilots flew Chinese aircraft to avoid direct conflict. Now isn't that an interesting fact!

Posted by: Stephen Harris at December 2, 2005 01:01 AM

Philosophical contemplation of the day:

When is a Fialka not a Fialka?

;-)

Posted by: Jess at December 1, 2005 10:01 PM

keep saying it jason by all means. i see no reason why you're right.

number 1:
why would all the challenges say it is a fialka cipher, if it wasnt? surely they would make up a name like in the 2002 challenge, if it was only a 'simular' cipher machine

number 2:
harry hasnt said it isnt a fialka. He has said it wont be a real fialka as that would be too hard. what this means is that it will be a SIMPLIFIED fialka, with only 2 wheels and maybe something else missing as well

Therefore i dont see any basis for the fact that it wont be a fialka cipher.

(i bet harry says im wrong now)
chidders

[You're wrong Chidders. Now does that mean, you're wrong because I wasn't about to say you were wrong, or you were wrong about the encryption and you were right to say I would say you are wrong? Either way I suppose you were right and I did say you were wrong. Hope that is clear. Harry]

Posted by: chidders at December 1, 2005 09:28 PM

I don't know how many times it needs to be said, but IT IS NOT A FIALKA CIPHER!!! It is however, a rotor machine cipher, and it must have some similarities.

Posted by: Jason at December 1, 2005 09:20 PM

Hi. if you're stuck on 7b and don't know where to start, read the comments people are posting (including Harry's helpful hint) because they tell you a lot. i know what to do (i think), but the maths is really difficult and i'm learning it bit by bit. should get there in the end... hopefully. but yeah, read the comments page and basically just do some research. hope that helps.

Posted by: lara at December 1, 2005 08:10 PM

finally finished gnvq work. i can now start to examine the fialka cipher :)

chidders

Posted by: chidders at December 1, 2005 07:28 PM

Why do everyone start to talk about Challenge 8? I am still on 7B! Help! Help! Help! I think i get how the cipher works, but can anyone just tell me how i should start?

Posted by: Sam at December 1, 2005 06:55 PM

Harry, how come the site was offline earlier? It gave me a real shock, I thought that there was a new challenge and I'd got my dates wrong!

[Just routine maintenance. Sorry for the shock. Harry]

Posted by: Tim at December 1, 2005 06:41 PM

Hi, ppl. If anyone's still stuck on the keyword for a, think back to previous part a challenges and the word that has appeared nearly every time in those.
Harry, is challenge 8 going to be possible using pencil+paper method? also, what exactly is the target audience for this challenge? cos isn't matrices, mod 26 and simultaneous equations quite advanced maths? thanks anyway, though, cos i've learnt loads doing this challenge. quite a few headaches, a lot of lost sleep, but definitely worth it.
Keep at it everyone and have fun deciphering.

[The target audience is secondary school age, but the target of the later stages is probably A level. We try to have something for everyone during the various rounds. It will be impossible to do part 8 straight away with pencil and paper but we will release more info over time and by the end it would be possible (if tedious) to do it by hand, just like last year's final challenge. Harry]

Posted by: lara at December 1, 2005 06:24 PM

What's vigenère got to do with anything? It's just a weak version of the type of cipher we are involved with here. However, this machine won't be a perfect form either, as it generates each ciphertext letter in a mechanical way from the initial set-up. And machine->pattern->***. There may be a while before the system returns to its initial position, but ***. Although, if the pattern of a cipher is complex enough, the cipher will be PRACTICALLY unbreakable. The only theoretically completely secure cipher is random! The one and only example is the One-Time Pad, which can be just a vigenère with a plaintext length random keyword, but obviously parity addition on ASCII codes etc works too with a random string of 0s and 1s. However, the random element causes many problems as you might expect...

I finally got my cheque today. Woo hoo! By the way, advent calenders are a rip off! The chocolate is much cheaper (and usually better quality) on its own! So you can either spend less or eat more. A difficult decision... Mmmm...

Posted by: Jason at December 1, 2005 05:43 PM

fialka machines are very complicated. my teammates are trying to create a program to solve ciphers encrypeted with the darned thing. i just sort os watch, but am personally content with vigniere. anyway, are there any sites anyone can suggest that are understandable to those of us with an iq of under 700000000 that explain it? not that people haven't tried to explain it to me already.

[The real Fialka is very complicated, just a well I don't have one! The idea of the simpler ENgima machine is that it gives a mechanical way to generate a Vigenere typ cipher with a VERY long keyword. Actually the cipher it generates isn't a Vigenere because the individaul ciphers it uses are not Caesar shifts like the ones in a Vigenere table, but the idea is similar. Harry]

Posted by: lbow(dont shout at me if i get asterisks teammates)(harry dont give me asterisks i got roasted for t at December 1, 2005 01:29 PM

Just wondering how many people have solved 7B now...

Posted by: lbow at December 1, 2005 01:22 PM

Sample Keys are quite good. I like generating them!

Posted by: Try it! at December 1, 2005 12:41 PM

I'm also celebrating 14 succesful ciphers broken... by ME!! and that last year I was up till almost midnight on 7B last year and, since its harder this year, I think I'll give up now. YAY! :)))

Posted by: cecil at December 1, 2005 07:32 AM

On "National Cipher Challenge Treat Day", school finishes early! Which I suppose means it could be better for a new cipher because I'll actually be home at 4pm but there you go.
(By the way, it's not because its NCCTD, because I'm the only one in my school of 1200 who does the the cipher challenge, its something else)

Posted by: cecil at December 1, 2005 07:29 AM

but that's the thing - i got the fialka mark i in 6b days before, but could not get that twist. so i cant celebrate. and 6a was not anything worth celebrating about.

Posted by: laura at December 1, 2005 07:14 AM

so, err, what if you dont celebrate advent? and if you aren't celebrating about cipher cos you haven't finished 7b?

[How about celebrating the fact that you did part 6? Harry]

Posted by: laura at November 30, 2005 10:52 PM

I'm gald there isn't one starting tomorrow - it isn't just YOU who needs sleep Harry, if one started tomorrow I would have had no sleep and done no homework since at least Monday, or even earlier.

Posted by: Ruth at November 30, 2005 10:46 PM

My advent calendar doesn't have chocolate :(

I think we should be lamenting the fact that there is no challenge tomorrow, not celebrating! ;)

[You really are hooked! I wish I had the energy to write more challenges for you, but I need to sleep some time. Harry]

Posted by: Jess at November 30, 2005 10:22 PM

just to point out that you dont need to celebrate advent to have an advent calender. I dont celebrate advent personally, but i had real love of chocolate. ;)

doubt the chocolate will last till christmas :P

chidders

Posted by: chidders at November 30, 2005 09:57 PM

I'm also programming for Challenge 8B, but not being too clever about it, I'm just using a hefty chunk of variables to define wiring mazes, and a few mod functions to "rotate" the rotors, and so on. It does work, I've tested it! But so far only manual single decrypts, I need to loop it properly and get cribs working. Hurray :P
I'm just trying to outguess the Soviets here and creating subroutines for everything I can think of in my tiny little mind!

Got options for rotor contacts, and rotor turning options, and number of rotors of course, as well as a big array for wiring mazes. Hopefully will be given them as I don't want to have to loop whatever the number of contacts is factorial × whatever the number of rotors is :(

Whatever the number of rotors is those numbers get huge pretty quickly.

But I'm thinking that the initial rotor setup position will probably have a keyword, might make it a tad easier, or at least easier to see if you have the right answer :D

Posted by: Ian at November 30, 2005 09:43 PM

i hope everyone has their advent calenders...just bought mine.

if not, nip to the shop and buy one! you can't celebrate christmas without chocolate!!! (on the leader board, im joint first, and thats because of the amount of chocolate and mints ive been eating - it'll help your coding, honest!!!)

remember everyone:
if it snows, then dont waste time in front of the computer; get out there and have a giant snowball fight!

happy advent day eve ;)
chidders


[Errr. Of course not everyone celebrates Advent, so for those of you who don't I'm declaring December 1st "National Cipher Challenge Treat Day" as a celebration of the fact that you don't have a Challenge starting tomorrow. Even if it doesn't snow find something nice to eat or fun/relaxing to do and raise a cheer to the 4,421 registered participants in the 2005 National Cipher Challenge! Harry]

Posted by: chidders at November 30, 2005 09:27 PM

A good vigenère automatic program, perfectly designed, I would expect it to finish in less than a second for these challenges! But if a computer was doing everything, why use the index of coincidence at all, or any other formula. Brute force, going through each keyword length for good frequency distributions, is certainly the most reliable method, without doubt, and computers are very good at counting! Because of the multiples problem (a keyword length 12 would score even higher on 3 and 4), the frequency has to be checked anyway, or it couldn't give the correct answer. Maybe I should try to make a new formula to just kick the correct multiple over, and scale the numbers down. Hmmm...

Ian has got my original principle in scoring keyword lengths exactly right. Lengthy repetitions mean much, much more than little groups of 2 or 3. This information must be reflected somewhere. He hasn't been very specific about the formula though. Can anyone be bothered to work it out...?

Or maybe you should spend some time preparing for challenge 8. If I start to think about writing any program material, and since I am using OOP, I would probably go about developing some very useful component objects, starting with... a rotor of course!!! I assume I will need an interface between them and of course it needs a Turn method as well as many other things. I'd better not say any more! Who knows exactly what this machine could involve? The point is: by writing little necessary, and generalised, code components, writing the actual program for the mysterious weather machine only involves putting them together, like a jigsaw-puzzle, just as in real life e.g. building a computer. This information is most probably mostly useless for experienced programmers, or those who do things differently, but it should give beginners a better way of looking at things. Good luck to you all! May the best programmer win and not the one who gets to work earliest next week!

Posted by: Jason at November 30, 2005 05:50 PM

My C# program solves vigeneres in seconds. I spent my Summer holiday making it (sad). First it derives the key length using index of coincidence(xor) and then using freq.analysis to complete the keyword. It got one of the letters of 7A keyword wrong but it mostly is correct. Currently creating abstract class "RotorMachine" =)
Want / need more juicy info on challenge 8. Hope the timing intervals are much shorter so that I have a chance to catch up again. Also wondered if the actual point scores could be put by the names on the honours board so I know how far I am behind.

Posted by: Ben Caller at November 29, 2005 10:41 PM

basically, maybe i'm really dumb, but i see no one called stix.

[Double Doh. I meant "Clever Code Cracker", Harry]

Posted by: laura at November 29, 2005 10:32 PM

Just out of curiosity is there any where that all of us (people who are really interested in maths and cryptology) can meet and talk, rather than just leaving comments?

[ I'm afraid I can't post contact info or forum addresses for you for the usual reasons. There will be a prizegiving ceremony at Bletchley on 31st March. Tickets will be allocated by lottery. You could try and meet up there. More details later. Harry

Posted by: Clever Code Cracker at November 29, 2005 10:16 PM

harry, just before, you told me to look at my own comment.
secondly, is there more than 1 matrix?

[Doh, I meant Stix's advice. You only need to find one, and in fact you can go a long way without finding all of it. Harry]

Posted by: laura at November 29, 2005 08:58 PM

Sam, I think if anyone told you that the challenge would be reduced to pretty much a number crunching exercise :P

Look at http://www.math.sunysb.edu/~scott/papers/MSTP/crypto/8Hill_Cipher

Posted by: Ian at November 29, 2005 08:24 PM

Oooh, some big numbers there, I'd have to hazard a guess at when the program finds a repeated string, it adds (length of string)! to the total?

Probs something along those lines though, counting longer repetitions for (a lot!) more.

Posted by: Ian at November 29, 2005 06:51 PM

There are so messages about 7B but i have no idea what they are about. I still get whate hill cipher is after i looked it up.?Can someone just tell how should i start? how do get all these equation? Please?

Posted by: Sam at November 29, 2005 06:39 PM

um, about the formula for vigenere. whats the point, when you can simply use index of coincidence and logweights :S i cracked A in 10 minutes or so from the time it was released.

chidders

Posted by: chidders at November 29, 2005 05:58 PM

Well we seem to have many different ways to solve a Vigenère, so why not discuss the following:
The most effective solution
The most reliable solution
The most simple solution
The quickest solution to do by hand

I present to you some sample data from my program using challenge 6B. It's my own Kasiski scoring system, designed for computers only really. A name? How about Jason's coefficient of repetition? Then again, it probably needs something else done to the values for that. You might want to try to reverse engineer my formula, if you would like to know it! First one to post it gets... well... the honour of being the first to discover my formula.
Without transposition:
2- 352 3- 212 4- 177 5- 126 6- 125 7- 96 8- 87 9- 56 10- 73 11- 204 12- 47 13- 46 14- 44 15- 41 16- 44 17- 53 18- 31 19- 40 20- 34
With transposition:
2- 4455 3- 4600 4- 4127 5- 350 6- 4052 7- 135 8- 3983 9- 379 10- 119 11- 38146978275 12- 3988 13- 178 14- 97 15- 226 16- 3934 17- 89 18- 35 19- 43 20- 56
How about that for obvious! Effective? Reliable?
Well, I think most people have 7A key length already:
2- 490327 3- 1831 4- 489612 5- 12207325 6- 1627 7- 1596 8- 1196 9- 342 10- 172 11- 81 12- 1056 13- 111 14- 1553 15- 173 16- 963 17- 38 18- 268 19- 43 20- 48

So what sort of method or data do you work on?

About that simultaneous equation solver, maybe some other time. I was looking for some sort of programming that could use a list of any equations and derive information from them.

Posted by: Jason at November 29, 2005 05:37 PM

right. i've read up and understand about modular arithmetic and matrices. so what now? how ion earth do i find out what goes in which columns/rows of the cipher?
harry?

[See Laura's advice above (or is that "below"?) Harry]

Posted by: laura at November 29, 2005 05:21 PM

finally I got it done.

People are saying how they end up with 64 possible matrices.
Whilst this is true there is an easier way of doing it.
Each row in the matrix only affects one letter and each letter is only affected by that line in the matrix.
What that means is the if you get one whole row of the matrix correct, you've got 1/3 of the letters.
Also these 1/3 of the letters will fit standard freq. anal. of English. So actually I found that you can work out the four possiblities for each row, analyse them to get the one with the best freq. analysis.
And suddenly you've only 12 posibilties to try out.

P.S. Harry I think its a litttle hard to provide a plain text with errors in since I spent a good two hourts trying to solve equations with a crib from the end when the equations were actually wroing 'cos I'd guessed the intended letters not the real letters.

Bye Hope this helps.

Posted by: Clever Code Cracker at November 29, 2005 05:15 PM

am i the only one who doesn't understand any of this? I got lost after challenge 5. Am i really stupid? What on earth are matrices? And what does excel have to do with them. I give up!!!!!

[I wouldn't be too disheartened, you did well to get to the fifth stage. Harry]

Posted by: cat at November 29, 2005 04:37 PM

Cecil - I don't know where you might start if you actually want to learn about matrices, but if you just want to know enough to break this cipher all you need is an understanding of matrix multiplication, which you can get at Wikipedia. The gist is that you multiply columns against rows, not corresponding elements...once you have the matrices you can brute force the solution.

Another tip is that you don't need to invert the matrix used for encryption if you actually work the other way 'round from the beginning - that saves the matrix inversion problems.

Note to all the people who are stuck on this cipher: all the relevant information is posted in the comments section so read it carefully.

Kati

Posted by: Katriel Cohn-Gordon at November 29, 2005 02:15 PM

all these matrices seem pretty scary for dittle me. does anyone know of any good books/websites to get started?

thanks

Posted by: cecil at November 29, 2005 08:07 AM

so wait a sec..
if a=0, then z=25.
so if you end up with a number like 26, do you keep it as 26 or put it as 0? and does it equal a?

[either and yes it is equal to A. Harry]

Posted by: laura at November 29, 2005 07:10 AM

please, i don't know if this is a dumn question or not....
with a hill cipher, does it matter at all if i set my alphabet at a=0 or at a=1?

[Yes it does. you should set a=0. Harry]

Posted by: jasonwhite at November 29, 2005 12:03 AM

8A... I should think that it will not be straightforward, but probably not too difficult either as if it were too terrible it would kind of defeat the point of 8B- after all, it is the B challenges which count, really.

Posted by: Jess at November 28, 2005 10:29 PM

to solve a simultaneus equation you have to subtract the equations

as this is purely systematical then it is simple to build a program that would do that.

general method:
a = bc + de (1)
f = fg + hk (2)

find lowest common multiple
of b and f - call this m

(3) = times equation 1 by (m / f)
(4) = times equation 2 by (m / b)

subtract (3) from (4)

divide number on left by co-efficent

you would keep the same method for more equations, but ill leave you to modify it :P

also modular equations are slightly different, but quite simular. have a go anyway at building an equation solver.

i get the feeling ive been talking nonsense :S
ah well, trying to help :P

chidders

Posted by: chidders at November 28, 2005 10:25 PM

i wonder what 8a will be. ADFGVX/ADFGX/Playfair/Double playfair/double transposition

i reckon that the person who cracks A quickest in in for a chance with the whole thing, as a will give you loads of info about B

im trying to prepare for all the possible A's as well as building a program for the fialka

however, i am pretty pleased with my adfgx/adfgvx cracker ;) now can be done in under 3/4 of an hour

chidders

Posted by: chidders at November 28, 2005 10:07 PM

Hi All,

Finally solved 7B. Spent alot of time not realising it was a Hill Cipher (never heard of one before) and then alot of time finding the required equations.
I can not write programs so I wanted to solve the equations by hand. I was a little intimidated by having 9 equations in 10 unknowns. I wish I'd just solved what I could without the 9th letter and taken it from there. Anyway, I finally realised I could take an additional crib by considering the most popular trigraph in the English alphabet.
Now I had 9 equations in 9 unknowns and I felt confident about it.

The morale is to get stuck in, solve what you can, see what decryption you can do and take it from there. If I'd done that I would have solved the damn thing 24 hours ago. Now I'm very tired but very happy. Time to get some proper sleep.

Good Luck to everyone on Challenge 8.

Posted by: eleven1 at November 28, 2005 10:03 PM

for 7a, i made a program for repetitions, so it told me the possible keylengths. Then my program automatically tried each one to find the average ic and the one with the highest ic, is the keylength.

not bad for 3/4 an hour's work? ;)
chidders

Posted by: chidders at November 28, 2005 10:01 PM

a few questions which i am not sure will be allowed or not.
Is the key a 9*9 matrix?
Do I have to use this key's inverse to decrypt the message?
How do I find the inverse of a matrix when I do not know its elements?

[No it is a 3x3 matrix! You ca work out what its entries are by solving some equations. Harry]

Posted by: jasonwhite at November 28, 2005 09:59 PM

well, actually, to tell you the truth, i have no matrix. i know its size, but do not know where to start. i read the wikipedia again and agian, but i still don't understand what i'm meant to be doing...


[Tomorrow I will publish more hints. Harry]

Posted by: laura at November 28, 2005 08:54 PM

Does the inverse matrix have to be all whole numbers for this cipher to work??

[Yes! Harry]

Posted by: Alex at November 28, 2005 08:52 PM

Nice post Jason!

I suppose it would be possible to write a program to solve simultaneous equations, you'd just have to multiply through to eliminate variables and so on. However, it would probably take at least an hour to get right, and then of course if you're at that stage you don't know how many you need it to solve (probably).

I tend to actually only use Notepad and my own programs, except when it's just easier to do a Find/Replace in Word to convert the 011020100202 etc to .--./.-.././ etc. Although I would quite like to learn to use Excel in clever ways in the future.

Posted by: Ian at November 28, 2005 07:46 PM

OK, I thought I should point a few things out:
Harry said that having 1 letter short leaves you with one entry in the matrix which you don't know, but in actual fact it leaves you down an equation needed for the entire bottom row! However, there is no need to guess (or go through each one)! You can work it out since you have 2/3 of the letters already, enough to make it readable in fact!!!
Working out inverses isn't even necessary: you can try each value for x between 1 and 26 and see which gives you the answer!
I didn't actually use a program for this challenge, although it would have been quicker!
You can learn programming by yourself with a few books. Understanding examples will help.
Excel is great for doing systematic calculations.
Word is great for converting text->table table->text
Notepad is great for holding text, without any danger
Inverting the matrix is pointless. You only need the decryption matrix! If you work out the decryption matrix to start with then there's your answer. On the other hand, see Wikipedia, it gives you a formula for each element of an inversed 3*3 matrix!
If you don't know the size of the matrix by now, you haven't read the comments
(7A) Use frequency analysis on every n letters starting at each position 1 to n rather than cribs (n is the keyword length which should be found using Kasiski method)
(7A) My program actually draws the graphs to let me determine the shift! The go through every keyword length method is faster for 6B without a proper Kasiski program.

More on modular arithmetic:
Adding together (and subtracting) mods is very simple: just add the numbers together!
11(mod26)+17(mod26)=28(mod26)=2(mod26) 7(mod26)-16(mod26)=-9(mod26)=17(mod26)
Multiplying is just as easy since all the 26s just go to 0(mod26) with the rest remaining
So 19(mod26)*2=38(mod26)=12(mod26) 5(mod26)*2(mod26)=10(mod26)

Questions for the more knowledgable:
How do you write a program to solve equations WITHOUT brute force? A form of declarative programming? If so, where can you get one of these.

Posted by: Jason at November 28, 2005 06:12 PM

Harry, this Fialka machine that we can be expecting on 8B - are we given more details on it - because it's not clear how simplified the weather station's version is; especially with details such as do all the wheels rotate in the same direction

[8A will contain more info about the machine and extra settings will be drip fed. OK? Harry]

Posted by: Stephen Harris at November 28, 2005 05:44 PM

Originally I intended to solve the equations for the encryption codes and then find the inverse, but I realised that that was silly and just solved for decryption, bang there's the answer really.

To laura, what exactly do you have at the moment to find the inverse of?

Posted by: Ian at November 28, 2005 05:26 PM

thanks harry ,that's done. only now, i dont know where to start. how do i work out the inverse to start decoding?
this is so confusing. i spent my entire lunchtime in the school library trying to find a good book to help me.

Posted by: laura at November 28, 2005 05:17 PM

To people stuck on 7A, the way I tend to manually solve Cipher Challenge Vigenères is to split the message up into 2 parts, into 3 parts, into 4 parts (not in half, the railfence way), and then look at the letter frequency graphs. Then it's a case of flat graph = wrong, peaky graph = right, and just look at the Caesar shifts to determine the keyword.

That's probably a less effective way than Kasiski, but less programming skill required and it's just nice to see the graphs anyway.

Posted by: Ian at November 28, 2005 04:49 PM

i highly recommend searching "simon singh black chamber" in google and having a look hugh, and, as harry has already said its a vigenere, remember that when looking round the contents area good luck

Posted by: martyn compton at November 28, 2005 04:49 PM

harry,
how do we know what size the matrix is? (3*3, 2*2, etc.)???
is it normally 3*3?

[You would expect it to be a divisor of the number of characters in the text, and not too big. In this case it means it should be 2*2 or 3*3. Why not play around and see. Harry]

Posted by: laura at November 28, 2005 04:36 PM

Hey
I am feeling really stupid here but all of you seem to have done part A already and i am having a little problem getting the key word. Any ideas on how to get it as my usual crib doesn't seem to work or can you tell me what the crib is this time to get me going. I know what sort of cipher it is, it is just so anoying
Thanks, Hugh

Posted by: Hugh at November 28, 2005 04:08 PM

Excel is very useful when working with matrices, but you have to know what Excel arrays are: if you want to do the same operation to each piece of data in a grid, you could:

a) create a formula with a relative address to one piece of data in the source grid, and copy to all the other cells in the answer grid; or,

b) use an array. This does the same thing, but you enter a range (not a single address). Press Enter and you will probably get an error: #VALUE! or something. Select all the cells in the answer-grid-to-be, press F2 (to edit the cell with the formula), and press Ctrl + Shift + Enter. This puts the formula into EVERY cell with {curly brackets} around it. If you try to change the formula, you get an error: You cannot change part of an array. To counter this, make sure the cells that make up the array are selected, press F2, change the formula and press Ctrl + Shift + Enter again.

Back to matrices. The MDETERM() function accepts a matrix as an argument, and returns the determinant. The TRANSPOSE() function transposes a matrix (you need to use the array entering trick explained above to use this). The MINVERSE() function inverts a matrix and the MMULT() function multiplies two matrices together. Of course, you can MOD() the results in the answer matrix:
{=MOD(MMULT(A1:C3,D1:F3),26)}

[Thanks for this Alex. Harry]

Posted by: Alex at November 28, 2005 02:48 PM