Difference between revisions of "Team:Groningen/Coding"

(Created page with "<html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>SpyGEM coding</title> <style> body{ font-family: sans-serif; font-...")
 
Line 160: Line 160:
 
<script src="eightbit.js"></script>
 
<script src="eightbit.js"></script>
 
<script src="exfour.js"></script>
 
<script src="exfour.js"></script>
<script src="aes.js"></script>
+
<script src="/Template:Groningen/aes_js.txt?action=raw&ctype=text/javascript"></script>
 
<script src="aes-ctr.js"></script>
 
<script src="aes-ctr.js"></script>
 
<script src="splitter.js"></script>
 
<script src="splitter.js"></script>

Revision as of 10:33, 7 July 2016

SpyGEM coding

SpyGEM coding & crypting


Sub-coding:

Message

Key

Formatted

Encoded

This page demonstrates the encoding and decoding of text messages into DNA, optionally with AES-256 encryption.

Enter a message into the Message field to have it encoded, or enter an encoded message into the Encoded field to have it decoded. The Key field is used for encryption & decryption and the Formatted field shows more details about the message block.

Different encodings for the message are possible. Both 'Six-four' and 'Ex-four' use 6 bits (3 base-pairs) per character, but are limited in the characters they allow. 'Six-four' allows only upper- and lower-case letters, digits, space and full-stop. 'Ex-four' is somewhat experimental and allows more characters (all of ASCII and a few more), but needs 12 bits for some characters, most notably for upper-case.

'Eight-bit' uses 8 bits (4 base-pairs) but allows every character.

The fully encoded message block is formatted as follows:

  1. The letters 'Spy' (always in 'Six-four'): 3 × 3 base pairs.
  2. The length of the encoded message: 16-bit number (8 base pairs).
  3. The checksum of the encoded message: 16-bit number (8 base pairs).
  4. The message: 3 - 4 base pairs per character.
  5. The letters 'GEM' (always in 'Six-four'): 3 × 3 base pairs.

The total overhead is 34 base pairs and the maximum message length is 65535 characters.

Encryption requires 'Eight-bit' as the sub-coding and has an additional 8 characters (32 base-pairs) overhead, regardless of key or message length.