Line 1: | Line 1: | ||
+ | {{blank}} | ||
<html> | <html> | ||
<head> | <head> |
Revision as of 10:52, 7 July 2016
SpyGEM coding & crypting
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:
- The letters
'Spy'
(always in 'Six-four'): 3 × 3 base pairs. - The length of the encoded message: 16-bit number (8 base pairs).
- The checksum of the encoded message: 16-bit number (8 base pairs).
- The message: 3 - 4 base pairs per character.
- 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.