Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Asking a favour
#1
Good day!

I would like to ask a massive favour from you guys. Could someone be kind and write a very small, simple Python program for me please? Those who are familiar with Python can probably write it in about five minutes.

Long story short, I have downloaded a really interesting and fun historical TSEC / KL-7 Adonis cipher machine simulator. It has a number of settings, called "key" that can be changed. The "key" was changed on a daily basis. Right now I have been using the random.org website to get new settings but it is very time consuming, I definitely wouldn't change my "key" every day since it takes 10-15 minutes to generate them, given the amount of options the machine has. However, a small program could generate random new keys at a press of a button and I could just copy/paste them straight into my "code book". Would someone please be kind and write a small program that could generate these random keys?

The settings, in a nutshell, without going into details, would be the following.

There are 8 encryption rotors. However, the 4th rotor has only two settings available so the NOTCH RING and NOTCH RING SET values are not calculated for the 4th rotor.

1st line -ROTOR CORE
Eight values are needed, each value can be letter A, B, C, D, E, F, G, H, I, J, K and L. Each value can occur only once, so no two rotor core can use the same letter. An option to include a thirteenth letter, which is letter M would be awesome but not essential.

2nd line -ALPHABET RING SET
Again, eight values are needed. Each value can be a number between 1-36, however, this time, a value can occur multiple times.

3rd line -NOTCH RING
Only seven values are needed here (the 4th rotor is fixed) and each value can be a number between 1-11 and each value can occur only once.

4th line -NOTCH RING SET
Seven values are needed (same as above), each value can be any of these: A, B, B+, C, D, E, E+, F, G, G+, H, I, J, J+, K, L, M, M+ N, O, O+, P, Q, R, R+, S, T, T+, U, V, W, W+, X, Y, Z, Z+. Each value can occur multiple times.

That is it. I would image a .py program which, after pressing RUN, gives a random result that looks something like this, nicely formatted so that each value is displayed under the relevant encryption rotor (couldn't format the below so it does not display it nicely but you get the idea):

1 2 3 4 5 6 7 8 <---Encryption rotor
-----------------------------
D B F L E A K G <--- 1st line, ROTOR CORE
11 8 34 32 35 3 20 15 <--- 2nd line, ALPHABET RING SET
7 10 3 11 1 5 2 <--- 3rd line, NOTCH RING
W+ H A S B+ U S <--- 4th line, NOTCH RING SET

Thank you kindly for your attention and I am looking forward to hearing from you.
Reply


Messages In This Thread
Asking a favour - by kityatyi - Dec-14-2018, 04:51 PM
RE: Asking a favour - by Larz60+ - Dec-14-2018, 05:55 PM
RE: Asking a favour - by kityatyi - Dec-14-2018, 06:02 PM
RE: Asking a favour - by Gribouillis - Dec-14-2018, 07:23 PM
RE: Asking a favour - by kityatyi - Dec-14-2018, 07:24 PM
RE: Asking a favour - by kityatyi - Dec-14-2018, 08:47 PM
RE: Asking a favour - by Gribouillis - Dec-14-2018, 09:23 PM
RE: Asking a favour - by kityatyi - Dec-14-2018, 09:25 PM
RE: Asking a favour - by Gribouillis - Dec-14-2018, 09:34 PM
RE: Asking a favour - by kityatyi - Dec-14-2018, 09:36 PM
RE: Asking a favour - by Gribouillis - Dec-14-2018, 09:53 PM
RE: Asking a favour - by kityatyi - Dec-14-2018, 10:35 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020