Line 69: | Line 69: | ||
</head> | </head> | ||
<body> | <body> | ||
− | <div | + | <div class="column full_size"> |
<h1>SpyGEM coding & crypting</h1> | <h1>SpyGEM coding & crypting</h1> | ||
− | < | + | <div class="column half_size"> |
− | + | <p><div> | |
− | <p><div | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
<span> | <span> | ||
<input type="checkbox" id="crypt" /> | <input type="checkbox" id="crypt" /> | ||
Line 108: | Line 94: | ||
<p><div id="err"></div></p> | <p><div id="err"></div></p> | ||
</div> | </div> | ||
− | <div | + | <div class="column half_size"> |
<p>This page demonstrates the encoding and decoding of text messages | <p>This page demonstrates the encoding and decoding of text messages | ||
into DNA, optionally with AES-256 encryption.</p> | into DNA, optionally with AES-256 encryption.</p> | ||
Line 115: | Line 101: | ||
The Key field is used for encryption & decryption and the | The Key field is used for encryption & decryption and the | ||
Formatted field shows more details about the message block.</p> | Formatted field shows more details about the message block.</p> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<p>To counter restriction enzymes a sequence of 'A'-bases is | <p>To counter restriction enzymes a sequence of 'A'-bases is | ||
inserted whereever the sequence for a restriction-enzyme occurs. | inserted whereever the sequence for a restriction-enzyme occurs. |
Revision as of 13:41, 22 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.
To counter restriction enzymes a sequence of 'A'-bases is inserted whereever the sequence for a restriction-enzyme occurs. When decoding the message these sequences are removed. The length of the substitution sequence is the shortest sequence of 'A' that does not occur in the encoded message.
The encoding requires 4 bases per character.
The fully encoded message block is formatted as follows:
- The letters
'Spy'
: 3 × 4 bases. - Padding: 4 'A' bases.
- The length of the restriction-substitutes: 8-bit number (4 bases).
- The length of the encoded message: 16-bit number (8 bases).
- The checksum of the encoded message: 16-bit number (8 bases).
- The message: 4 bases per character.
- The letters
'GEM'
: 3 × 4 bases.
The total overhead is 48 bases and the maximum message length is 65535 characters.
Encryption has an additional 8 characters (48 bases) overhead, regardless of key or message length.