forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Enigma

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General
View previous topic :: View next topic  
Author Message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2001
Location: Yateley, Hants, UK

PostPosted: Fri Jan 25, 2019 3:38 pm    Post subject: Enigma Reply with quote

On the grounds that this part of the Forum really does mean 'anything that meets your fancy', I have a problem. I visited Bletchley Park a week ago, and since then I've not been able to tear my thoughts away from Bombes, Collossus, Banburismus and the EINS catalogue.

Does anyone know where there are Fortran simulators for any of the Bletchley Park code-breaking algorithms?

I was particularly taken by the EINS catalogue. Apparently, 90% of the messages transmitted include the word EINS. For a 3 rotor original Enigma there are apparently only 17,576 ways that EINS can be encoded. It seems to me to be a rather trivial job for a current model PC with FTN95 to go through a set of intercepts looking for possible coded EINS sequences 4 characters at a time, especially as:

1. Enigma never encodes a character as itself, so the first test must be to see if the first character is E, or the second I, etc.

2. The catalogue can be sorted so that the test is only required on the subset of the catalogue that begins with the same letter as the first one of the 4-character segment . Presumably this would require less than 1000 tests, even if one was no cleverer in writing the Fortran code.

It seems that the 17,576 is 26^3. Even pushing the problem to a 4 rotor machine only makes the number of ways EINS can be cyphered to 456,976, which doesn't seem to be an insuperable problem for a modest PC (and is 26^4). Are either of the EINS catalogues downloadable, or is there an algorithm to generate them?

Doing it with today's technology, presumably the Enigma settings could be deduced from EINS catalogue searches of enough messages with the day's settings, or another program could be written to simulate the operation of a Bombe.

If only it were possible to return to Bletchley some 80 years ago with my laptop, let alone the desktop! (But I would have to cut the 13 amp UK plug off the kettle lead and replace it with the 15 amp 3 pin plug that was the standard at the time).

Perhaps someone can explain why the catalogue contains 26^n entries for n rotors.

Eddie
Back to top
View user's profile Send private message
mecej4



Joined: 31 Oct 2006
Posts: 1155

PostPosted: Fri Jan 25, 2019 6:14 pm    Post subject: Reply with quote

Eddie, before working on an EINS catalogue, you will probably need to have an Enigma machine (from eBay?) or an Enigma simulator, just to test out some ideas.

If you relax the requirement from "in Fortran" to "in Fortran or C", you will find many more links than if you insist on pure Fortran. There is a simulator on line at

https://www.dcode.fr/enigma-machine-cipher

and C source code at

https://www.codeproject.com/Articles/831015/ENIGMA

The former should show you that there were a number of variants of Enigma, and those machines had some configuration settings (PARAMETER or INI file in code).

As a Saxon, at least in pseudonym, you are probably better positioned to peruse decoded messages to judge whether those contained reasonable German text, etc.

Someone may have already performed a frequency analysis of decoded captured Enigma-encoded messages. I wonder if EINS showed the highest frequency there.

I think that, for me anyway, not having an appropriate cultural background (for evaluating partially decoded text) would be a bigger handicap than not knowing the relevant algorithms.
Back to top
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2001
Location: Yateley, Hants, UK

PostPosted: Fri Jan 25, 2019 7:54 pm    Post subject: Reply with quote

Hi Mecej4,

Thanks for the reply.

Litus Saxonicum is the 'Saxon Shore', commanded at the end of the Roman Period in Britain by a Comes (Count) and which stretches from East Anglia round to the South Coast of England. His military commands were based in a number of forts constructed in the 3rd Century, some of which survive in a ruined state. I have several connections, and thus the pseudonym. My command of German is limited, sadly, and I'm a mixture of Anglo-Saxon, Norman and Huguenot. My German connection comes from being born there.

My study/office is rather full of old and new computers (I spent today puzzling over why I can't resurrect one of them), and there isn't room for a real Enigma, even if one could be had, but a simulator seems a good idea. Bletchley Park claims to have the largest public collection of Enigma machines, but I doubt if they would lend one out. The difficulty with writing a simulator, and it would have to be in Fortran, because C seems to me to be rather like Klingon, although I might try Algol 60 if I could find a compiler. I'd rather have the algorithm. Programming for me is more of a hobby than a job, and even then, I'm far more interested in interfaces and graphics than calculating. My insistence on Fortran is even more restrictive, because it would have to be FTN95 compilable!

EINS appears to be the most frequent 4-letter word in German Enigma-coded messages, but I take it on trust (from reading displays at Bletchley Park and the Internet) that it appears in 90% of the intercepts. Apparently it is that way because the numerals were spelled out and so numerals don't appear. Finding a match with an entry in the EINS catalogue only gives you a crib, and isn't the whole of a decode by any means.

On the basis of this being a timewaster pastime, writing the search routine for the EINS strings in an intercept given the catalogue only took a very short time when I got bored with my non-working hardware, and I certainly don't ever intend to try to emulate the whole set of Bletchley algorithms. What I did today, however, in between other things, convinced me that the EINS catalogue search is a trivial job if one has a modern PC.

Oddly enough, despite there being various models of Enigma machine, the only thing the EINS catalogue length depends on is the number of 26 character rotors. I haven't got to the bottom of that!

Eddie
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 1146
Location: Aerospace Valley

PostPosted: Tue Jan 29, 2019 8:28 pm    Post subject: Reply with quote

TuringSaxonicum,

The enigma machine is reputed to have been conceived by one Wilhelm Tore, who passed on his 'knowledge' to his epynonymouse son who is considered to be a very enigmatic figure of his time.

... maybe this sheds more light on the algorithm, and more importantly your needs before starting.

http://www.practicalcryptography.com/ciphers/enigma-cipher/

Lots of references at the end which might convince you in advance you're onto a loser !? (I assume that the sryptoanalysis they're talking about is attempts to crack wthout any info. to help)

I suppose that Turing and Al (whoever he was) maybe had possession of some of the input data .... ah the glory of mint spies and douvýbl agents ! :O)

Maybe you should consume plenty of Einsekin before commencing ... apparently it refreshes the rotors in ways other beverages can't reach Smile ;O) Wink ;O) Smile

Footnote:
William Tore Jr.,, a reclusive figure of our times, as recently seen at a famous ski resort recently ....

_________________
''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... Smile "
Back to top
View user's profile Send private message
silicondale



Joined: 15 Mar 2007
Posts: 235
Location: Matlock, Derbyshire, UK

PostPosted: Sun Feb 03, 2019 1:32 pm    Post subject: Reply with quote

Hi Eddie -
I just noticed your mention of Algol 60. Algol was my first love too - it was the language for all the statistical coding I used in my PhD thesis in the 1960s (on an English Electric KDF9 at Nottingham University), and I also wrote programs for processing XRF analysis data. There are still compilers available...

https://www.thefreecountry.com/compilers/algol.shtml

... though I don't have any of the old coding available to test them on. It was all on paper tape that got recycled long ago as Christmas decorations.

I only switched to Fortran when in my first job in the real world - what was then the Australian Bureau of Mineral Resources (since renamed Geoscience Australia). The CDC3600 in Canberra didn't have an Algol compiler.
_________________
(Steve)
Back to top
View user's profile Send private message Visit poster's website
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2001
Location: Yateley, Hants, UK

PostPosted: Mon Feb 04, 2019 12:52 pm    Post subject: Reply with quote

Hi Silicondale,

I had used if briefly on an Elliot 803. Later, I used it on an Elliot/NCR 4120, and once on a 4130. Then the machine I was using suffered fire damage, and it was replaced by a grossly inferior IBM 1130. That made me switch to Fortran, which I found was the lingua franca of computing, as it worked on everything. The ICL 1900 series had Algol-68, but there seemed to be no Algol on American computers. Later I had access to a different 4120, but I discovered several things. Firstly, it also had great Fortran (although support from the computer people at The University of Kent stopped abruptly when the corner of the building that housed their Elliot collapsed into an abandoned railway tunnel under the site). Secondly, Algol allowed you to very easily write code that worked fine on a test, but failed disastrously on real world problems due to shortage of memory, as one by one the allocations got bigger and bigger. It made me a fan of static allocation of memory so that I knew in advance whether it would fit or not.

Most of the changes in recent versions of Fortran seem to me to be a reversion to things one could do in Algol a half century or more ago.

But, in referring to Algol as a "first love", you can stretch the analogy to remind yourself that one day, that beautiful partner deserted you, taking everything you ever owned (i.e. all the software you wrote). Fortran, for all that it is plain verging on ugly, has acne and some very irritating personal habits, is at least faithful and never minded moving house! (But no wonder you still hanker after that first love!)

Eddie
Back to top
View user's profile Send private message
silicondale



Joined: 15 Mar 2007
Posts: 235
Location: Matlock, Derbyshire, UK

PostPosted: Mon Feb 04, 2019 1:23 pm    Post subject: Reply with quote

Good point, Eddie, about the first love. While my Algol software finished up as Christmas decorations, I still use some of the Fortran coding from my first job in the real world. 1971 vintage and still does what it was written for!

But it's nice to see that what was so beautiful about Algol - its clean logical structure - is now appearing in Fortran as well.
_________________
(Steve)
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group