GithubHelp home page GithubHelp logo

m6sig / siemens-halske-t52-sim Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 34 KB

A simulator for the Siemens & Halske Schlüsselfernschreibmaschine T52 Teleprinter-Cipher all in one machine written in Python3.

License: GNU General Public License v3.0

Python 100.00%

siemens-halske-t52-sim's Introduction

siemens-halske-t52-sim

A simulator for the Siemens & Halske Schlüsselfernschreibmaschine T52 Teleprinter-cipher all in one machine written in Python3.

This project is to all crypto analyser and breaker who broke them during the WW2.

Available model

siemens_halske-t52a.py: Siemens & Halske SFM T52a

Note

There are two things that differ from the real machine:

  1. Wheel order and indicator layout generated by the --keygen option is not in the A B C D E F G H I K order but in teleprinter bits stream order, xor function followed by swap function instead.
  2. It is very diffcult to change the order and purpose of generated wheel setting file. In the real machine you just need to reconnect those jumper. BTW: All wheels are from facture and not designed to be rewired by user. But wheel settings can be customised.

Usage

$ python3 siemens_halske-t52a.py [-h] [--keygen <key file>]
                                      [--encrypt <input file> <key file> <output file>]
                                      [--decrypt <input file> <key file> <output file>]
                                      [--readtape <input file>]

optional arguments:
  -h, --help            show this help message and exit
  --keygen <key file>   Creates a random key file with normal SZ40 teeth
                        counts and sets random indicators. Edit the file to
                        suit.
  --encrypt <input file> <key file> <output file>
                        Encode ASCII plaintext to Baudot code (5 bits per
                        byte) and encrypt with wheel settings in key file,
                        writing ciphertext to output file.
  --decrypt <input file> <key file> <output file>
                        Decrypt the input file with wheel settings in key
                        file, decode from Baudot code and and output ASCII
                        plaintext to output file.
  --readtape <input file>
                        Read input file in Baudot code and display ASCII
                        equivalent.

Example:
  python3 siemens_halske-t52a.py --keygen <key file>
  python3 siemens_halske-t52a.py --encrypt <input file> <key file> <output file>
  python3 siemens_halske-t52a.py --decrypt <input file> <key file> <output file>
  python3 siemens_halske-t52a.py --readtape <input file>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.