Skip to content

Instantly share code, notes, and snippets.

@robey
Created May 10, 2012 06:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robey/2651420 to your computer and use it in GitHub Desktop.
Save robey/2651420 to your computer and use it in GitHub Desktop.
AES encryption for the DCPU
;----------------------------------------------------------------------------
; AES encryption for the DCPU.
;----------------------------------------------------------------------------
; Fits into 0x400 words, with its tables and key buffer.
; Initialize with a key, for encryption or decryption, then feed it a buffer
; of 16 bytes (8 words) at a time. Check out the unit tests at the end for
; example usage.
;
; Speed: SLOW!
; set_key varies from 3400-4400 cycles for encryption (based on key size);
; 10k-14k cycles for decryption. encrypting one block varies from 11k-15k
; cycles; decrypting 14k-15k cycles. that's nearly 1k cycles per byte, so
; you probably only want to encrypt tiny things. :)
;----------------------------------------------------------------------------
jmp tests
block_size = 16
:clear_w
set push, i
set push, a
set i, w
set a, 0
:clear_w.1
sti [i], a
ifl i, w.end
bra clear_w.1
set a, pop
set i, pop
ret
; key must be 8, 12, or 16 words.
; [I] = key, A = key size in words, B = 1 if decrypting or 0 if encrypting
:set_key
; first, zero out w & dw
jsr clear_w
set [words], a
; rounds = (words / 2) + 6
shr a, 1
add a, 6
set [rounds], a
:expand_key
; fill in w, with x as index
set x, 0
:expand_key.1
sti [w+x], [i]
add x, 1
ifl x, [words]
bra expand_key.1
; until (block_size / 2) * (rounds + 1):
set z, [rounds]
add z, 1
mul z, (block_size / 2)
:expand_key.2
set i, [(w - 2) + x]
set j, [(w - 1) + x]
set a, x
mod a, [words]
ifn a, 0
bra expand_key.3
; t = self.subword(self.rotwordL(t)) ^ (self.RCON[i // self.key_words - 1] << 24L)
jsr rotL
jsr sub32
set a, x
div a, [words]
sub a, 1
jsr rcon8
shl a, 8
xor i, a
bra expand_key.4
:expand_key.3
ifl [words], 16
bra expand_key.4
set a, x
mod a, [words]
ifn a, 8
bra expand_key.4
jsr sub32
:expand_key.4
; w[i - self.key_words] ^ t
set a, x
sub a, [words]
set [w + x], [w + a]
xor [w + x], i
set [(w + 1) + x], [(w + 1) + a]
xor [(w + 1) + x], j
add x, 2
ifl x, z
jmp expand_key.2
; if we're decrypting, a bit more work.
ife b, 0
bra expand_key.out
set z, 1
:expand_key.5
set a, z
shl a, 3
set x, w
add x, a
jsr inverse_mix_columns
add z, 1
ifl z, [rounds]
bra expand_key.5
:expand_key.out
ret
; encipher a block of 128 bits (8 words)
; data is in [I]
; 8may2011: this takes a bit over 12k cycles.
:encipher
set push, i
add i, 8
set push, i
; xor w into the data
set x, pick 1
set y, pick 0
set j, w
:encipher.1
xor [x], [j]
add x, 1
add j, 1
ifl x, y
bra encipher.1
; count rounds in z
set z, 0
:encipher.2
set x, pick 1
set y, pick 0
:encipher.3
set i, [x]
set j, [x+1]
jsr sub32
set [x], i
set [x+1], j
add x, 2
ifl x, y
bra encipher.3
; shift rows
set ex, 0
set x, pick 1
jsr shift_rows
set x, pick 1
set a, [rounds]
sub a, 1
ifl z, a
jsr mix_columns
; add round key
set x, pick 1
set y, pick 0
set j, z
add j, 1
shl j, 3
:encipher.4
xor [x], [w+j]
add x, 1
add j, 1
ifl x, y
bra encipher.4
add z, 1
ifl z, [rounds]
jmp encipher.2
set x, pop
set x, pop
ret
; encipher a block of 128 bits (8 words)
; data is in [I]
:decipher
set push, i
add i, 8
set push, i
; xor the final round
set x, pick 1
set y, pick 0
set j, [rounds]
shl j, 3
:decipher.1
xor [x], [w+j]
add x, 1
add j, 1
ifl x, y
bra decipher.1
; count rounds in z
set z, [rounds]
:decipher.2
set x, pick 1
:decipher.3
set i, [x]
set j, [x+1]
jsr rsub32
set [x], i
set [x+1], j
add x, 2
ifl x, y
bra decipher.3
; inverse shift rows
set ex, 1
set x, pick 1
jsr shift_rows
set x, pick 1
ifg z, 1
jsr inverse_mix_columns
; add round key
set x, pick 1
set y, pick 0
set j, z
sub j, 1
shl j, 3
:decipher.4
xor [x], [w+j]
add x, 1
add j, 1
ifl x, y
bra decipher.4
sub z, 1
ifg z, 0
jmp decipher.2
set x, pop
set x, pop
ret
#macro lookup8(table, r) {
shr r, 1
set r, [table + r]
ife ex, 0
shr r, 8
and r, 0xff
}
#macro lookup16(table, r, r_trash) {
set r_trash, r
and r, 0xff
lookup8(table, r)
shr r_trash, 8
lookup8(table, r_trash)
shl r_trash, 8
bor r, r_trash
}
; turn I, J into SUB of themselves (trash: A)
:sub32
lookup16(SUB, i, a)
lookup16(SUB, j, a)
ret
; turn I, J into RSUB of themselves (trash: A)
:rsub32
lookup16(RSUB, i, a)
lookup16(RSUB, j, a)
ret
; rotate I, J left 8 bits, as a 32-bit word
:rotL
shl i, 8
set push, ex
shl j, 8
bor i, ex
bor j, pop
ret
; rotate I, J right 8 bits, as a 32-bit word
:rotR
shr i, 8
set push, ex
shr j, 8
bor i, ex
bor j, pop
ret
:rcon8
shr a, 1
set a, [RCON + a]
ife ex, 0
shr a, 8
and a, 0xff
ret
; take the block in [X], and do the "shift rows" operation (trash: A B C X Y I J)
; if EX=1, do "unshift rows" instead.
:shift_rows
set push, z
set z, shift_offset
ife ex, 1
set z, unshift_offset
set i, shiftbuf
set a, 0
:shift_rows.clear
sti [i], a
ifl i, shiftbuf.end
bra shift_rows.clear
set y, x
add y, 8
:shift_rows.1
set i, [z]
:shift_rows.2
set a, [x]
set b, a
and b, 0xff00
shl i, 4
set c, ex
bor [shiftbuf+c], b
set b, a
and b, 0xff
shl i, 4
set c, ex
bor [shiftbuf+c], b
add x, 1
ife x, y
bra shift_rows.out
ifn i, 0
bra shift_rows.2
add z, 1
bra shift_rows.1
:shift_rows.out
set i, x
sub i, 8
set j, shiftbuf
:shift_rows.3
sti [i], [j]
ifl j, shiftbuf.end
bra shift_rows.3
set z, pop
ret
:shiftbuf dat 0, 0, 0, 0, 0, 0, 0, 0
:shiftbuf.end
:shift_offset dat 0x0653, 0x2075, 0x4217, 0x6431
:unshift_offset dat 0x0257, 0x2471, 0x4613, 0x6035
; take the next block of bytes (8 words), and replace every 32-bit word M
; with: M2 ^ rotL(M3) ^ swapwords(M) ^ rotR(M)
; where Mn = the nth power of M in the galois field.
; address in X (trash: ...)
:mix_column
set i, [x]
set j, [x + 1]
; swapwords(M)
set b, j
set c, i
; rotR(M)
jsr rotR
xor b, i
xor c, j
; M2
set i, [x]
set j, [x + 1]
jsr mul2
xor b, i
xor c, j
; rotL(M3)
xor i, [x]
xor j, [x + 1]
jsr rotL
xor b, i
xor c, j
set [x], b
set [x + 1], c
ret
:mix_columns
set y, x
add y, 8
:mix_columns.1
jsr mix_column
add x, 2
ifl x, y
bra mix_columns.1
ret
; take the next block of bytes (8 words), and replace every 32-bit word M
; with: ME ^ rotL(MB) ^ swapwords(MD) ^ rotR(M9).
; where Mn = the nth power of M in the galois field.
; address in X (trash: A B C I J X Y)
:inverse_mix_column
set push, y
set push, z
set i, [x]
set j, [x + 1]
; YZ = M1, push = M1
set y, i
set z, j
set push, i
set push, j
; IJ = M2, BC = M2, YZ = M3
jsr mul2
set b, i
set c, j
xor y, i
xor z, j
; IJ = M4, BC = M6, push = M4
jsr mul2
xor b, i
xor c, j
set push, i
set push, j
; IJ = M8, BC = ME, push = M8
jsr mul2
xor b, i
xor c, j
set push, i
set push, j
; IJ = rotL(MB), BC = ME ^ rotL(MB)
xor i, y
xor j, z
jsr rotL
xor b, i
xor c, j
; YZ = M8, IJ = M8
set z, pop
set y, pop
set i, y
set j, z
; YZ = MC, IJ = M9
xor z, pop
xor y, pop
xor j, pop
xor i, pop
; BC = ME ^ rotL(MB) ^ rotR(M9)
jsr rotR
xor b, i
xor c, j
; YZ = MD, BC = all
xor y, [x]
xor z, [x + 1]
xor b, z
xor c, y
set [x], b
set [x + 1], c
set z, pop
set y, pop
ret
:inverse_mix_columns
set y, x
add y, 8
:inverse_mix_columns.1
jsr inverse_mix_column
add x, 2
ifl x, y
bra inverse_mix_columns.1
ret
; multiply I,J's bytes by {02} (trash: A)
:mul2
set a, i
and i, 0x7f7f
shl i, 1
ifb a, 0x8000
xor i, 0x1b00
ifb a, 0x0080
xor i, 0x001b
set a, j
and j, 0x7f7f
shl j, 1
ifb a, 0x8000
xor j, 0x1b00
ifb a, 0x0080
xor j, 0x001b
ret
org 0x0200
; buffer may need to be up to (block size / 2) * (rounds + 1) = 8 * 14 = 112
:w
dat 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
dat 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
dat 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
dat 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
dat 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
dat 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
dat 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
dat 0, 0, 0, 0, 0, 0, 0, 0
:w.end
:words dat 0
:rounds dat 0
:unused dat 0, 0, 0, 0, 0, 0
; this is an, um, affine transformation of the bytes of, um, some stuff, i
; think. the gritty details start on page 15 of the FIPS-197 spec for AES,
; but on page 16 they have this nifty chart that neanderthals like me can
; just copy without thinking.
:SUB
dat 0x637c, 0x777b, 0xf26b, 0x6fc5, 0x3001, 0x672b, 0xfed7, 0xab76
dat 0xca82, 0xc97d, 0xfa59, 0x47f0, 0xadd4, 0xa2af, 0x9ca4, 0x72c0
dat 0xb7fd, 0x9326, 0x363f, 0xf7cc, 0x34a5, 0xe5f1, 0x71d8, 0x3115
dat 0x04c7, 0x23c3, 0x1896, 0x059a, 0x0712, 0x80e2, 0xeb27, 0xb275
dat 0x0983, 0x2c1a, 0x1b6e, 0x5aa0, 0x523b, 0xd6b3, 0x29e3, 0x2f84
dat 0x53d1, 0x00ed, 0x20fc, 0xb15b, 0x6acb, 0xbe39, 0x4a4c, 0x58cf
dat 0xd0ef, 0xaafb, 0x434d, 0x3385, 0x45f9, 0x027f, 0x503c, 0x9fa8
dat 0x51a3, 0x408f, 0x929d, 0x38f5, 0xbcb6, 0xda21, 0x10ff, 0xf3d2
dat 0xcd0c, 0x13ec, 0x5f97, 0x4417, 0xc4a7, 0x7e3d, 0x645d, 0x1973
dat 0x6081, 0x4fdc, 0x222a, 0x9088, 0x46ee, 0xb814, 0xde5e, 0x0bdb
dat 0xe032, 0x3a0a, 0x4906, 0x245c, 0xc2d3, 0xac62, 0x9195, 0xe479
dat 0xe7c8, 0x376d, 0x8dd5, 0x4ea9, 0x6c56, 0xf4ea, 0x657a, 0xae08
dat 0xba78, 0x252e, 0x1ca6, 0xb4c6, 0xe8dd, 0x741f, 0x4bbd, 0x8b8a
dat 0x703e, 0xb566, 0x4803, 0xf60e, 0x6135, 0x57b9, 0x86c1, 0x1d9e
dat 0xe1f8, 0x9811, 0x69d9, 0x8e94, 0x9b1e, 0x87e9, 0xce55, 0x28df
dat 0x8ca1, 0x890d, 0xbfe6, 0x4268, 0x4199, 0x2d0f, 0xb054, 0xbb16
; this is the inverse of SUB. since each possible 8-bit value appears in
; SUB exactly once, you can invert it. RSUB[SUB[i]] = i.
:RSUB
dat 0x5209, 0x6ad5, 0x3036, 0xa538, 0xbf40, 0xa39e, 0x81f3, 0xd7fb
dat 0x7ce3, 0x3982, 0x9b2f, 0xff87, 0x348e, 0x4344, 0xc4de, 0xe9cb
dat 0x547b, 0x9432, 0xa6c2, 0x233d, 0xee4c, 0x950b, 0x42fa, 0xc34e
dat 0x082e, 0xa166, 0x28d9, 0x24b2, 0x765b, 0xa249, 0x6d8b, 0xd125
dat 0x72f8, 0xf664, 0x8668, 0x9816, 0xd4a4, 0x5ccc, 0x5d65, 0xb692
dat 0x6c70, 0x4850, 0xfded, 0xb9da, 0x5e15, 0x4657, 0xa78d, 0x9d84
dat 0x90d8, 0xab00, 0x8cbc, 0xd30a, 0xf7e4, 0x5805, 0xb8b3, 0x4506
dat 0xd02c, 0x1e8f, 0xca3f, 0x0f02, 0xc1af, 0xbd03, 0x0113, 0x8a6b
dat 0x3a91, 0x1141, 0x4f67, 0xdcea, 0x97f2, 0xcfce, 0xf0b4, 0xe673
dat 0x96ac, 0x7422, 0xe7ad, 0x3585, 0xe2f9, 0x37e8, 0x1c75, 0xdf6e
dat 0x47f1, 0x1a71, 0x1d29, 0xc589, 0x6fb7, 0x620e, 0xaa18, 0xbe1b
dat 0xfc56, 0x3e4b, 0xc6d2, 0x7920, 0x9adb, 0xc0fe, 0x78cd, 0x5af4
dat 0x1fdd, 0xa833, 0x8807, 0xc731, 0xb112, 0x1059, 0x2780, 0xec5f
dat 0x6051, 0x7fa9, 0x19b5, 0x4a0d, 0x2de5, 0x7a9f, 0x93c9, 0x9cef
dat 0xa0e0, 0x3b4d, 0xae2a, 0xf5b0, 0xc8eb, 0xbb3c, 0x8353, 0x9961
dat 0x172b, 0x047e, 0xba77, 0xd626, 0xe169, 0x1463, 0x5521, 0x0c7d
; these are the powers of 2, starting at 2**1, modulo 0x11b, "in the field
; GF(2^8)" meaning basically that when you multiply by 2, if the high bit
; was set before the multiplication, XOR with 0x1b and ignore the high byte
; of the result, to get the number back into 8 bits.
:RCON
dat 0x0102, 0x0408, 0x1020, 0x4080, 0x1b36, 0x6cd8, 0xab4d, 0x9a2f
dat 0x5ebc, 0x63c6, 0x9735, 0x6ad4, 0xb37d, 0xfaef, 0xc591, 0x3972
dat 0xe4d3, 0xbd61, 0xc29f, 0x254a, 0x9433, 0x66cc, 0x831d, 0x3a74
dat 0xe8cb, 0x8d01, 0x0204, 0x0810, 0x2040, 0x801b, 0x366c, 0xd8ab
dat 0x4d9a, 0x2f5e, 0xbc63, 0xc697, 0x356a, 0xd4b3, 0x7dfa, 0xefc5
dat 0x9139, 0x72e4, 0xd3bd, 0x61c2, 0x9f25, 0x4a94, 0x3366, 0xcc83
dat 0x1d3a, 0x74e8, 0xcb8d, 0x0102, 0x0408, 0x1020, 0x4080, 0x1b36
dat 0x6cd8, 0xab4d, 0x9a2f, 0x5ebc, 0x63c6, 0x9735, 0x6ad4, 0xb37d
dat 0xfaef, 0xc591, 0x3972, 0xe4d3, 0xbd61, 0xc29f, 0x254a, 0x9433
dat 0x66cc, 0x831d, 0x3a74, 0xe8cb, 0x8d01, 0x0204, 0x0810, 0x2040
dat 0x801b, 0x366c, 0xd8ab, 0x4d9a, 0x2f5e, 0xbc63, 0xc697, 0x356a
dat 0xd4b3, 0x7dfa, 0xefc5, 0x9139, 0x72e4, 0xd3bd, 0x61c2, 0x9f25
dat 0x4a94, 0x3366, 0xcc83, 0x1d3a, 0x74e8, 0xcb8d, 0x0102, 0x0408
dat 0x1020, 0x4080, 0x1b36, 0x6cd8, 0xab4d, 0x9a2f, 0x5ebc, 0x63c6
dat 0x9735, 0x6ad4, 0xb37d, 0xfaef, 0xc591, 0x3972, 0xe4d3, 0xbd61
dat 0xc29f, 0x254a, 0x9433, 0x66cc, 0x831d, 0x3a74, 0xe8cb, 0x8d01
;-----------------------------------------------------------------------
; everything below this point is unit tests, not needed for actual use.
;-----------------------------------------------------------------------
:tests
; generate w/dw for simple 16-byte key
:test1_encrypt
set a, 8
set b, 0
set i, key1
jsr set_key
set i, w
set j, w_key1
set z, w_key1.end
jsr must_equal
:test1_decrypt
set a, 8
set b, 1
set i, key1
jsr set_key
set i, w
set j, dw_key1
set z, dw_key1.end
jsr must_equal
; generate w/dw for simple 32-byte key
:test2_encrypt
set a, 16
set b, 0
set i, key2
jsr set_key
set i, w
set j, w_key2
set z, w_key2.end
jsr must_equal
:test2_decrypt
set a, 16
set b, 1
set i, key2
jsr set_key
set i, w
set j, dw_key2
set z, dw_key2.end
jsr must_equal
; encipher ECB test from FIPS-197
:test3
set a, 8
set b, 0
set i, key3
jsr set_key
set i, data3
set j, buf1
jsr copy
set i, buf1
jsr encipher
set i, buf1
set j, encrypt3
set z, encrypt3 + 8
jsr must_equal
set i, data3a
set j, buf1
jsr copy
set i, buf1
jsr encipher
set i, buf1
set j, encrypt3a
set z, encrypt3a + 8
jsr must_equal
set i, data3b
set j, buf1
jsr copy
set i, buf1
jsr encipher
set i, buf1
set j, encrypt3b
set z, encrypt3b + 8
jsr must_equal
; decipher ECB test from FIPS-197
:test4
set a, 8
set b, 1
set i, key3
jsr set_key
set i, encrypt3
set j, buf1
jsr copy
set i, buf1
jsr decipher
set i, buf1
set j, data3
set z, data3 + 8
jsr must_equal
set i, encrypt3a
set j, buf1
jsr copy
set i, buf1
jsr decipher
set i, buf1
set j, data3a
set z, data3a + 8
jsr must_equal
set i, encrypt3b
set j, buf1
jsr copy
set i, buf1
jsr decipher
set i, buf1
set j, data3b
set z, data3b + 8
jsr must_equal
brk
:check_key1
ifn [i], [j]
brk
add i, 1
add j, 1
ifl j, w_key1.end
bra check_key1
brk
; [I] must equal [J] up to Z
:must_equal
ifn [i], [j]
brk
add i, 1
add j, 1
ifl j, z
bra must_equal
ret
; copy [I] to [J] for 8 bytes
:copy
set push, x
set x, i
add x, 8
:copy.1
sti [j], [i]
ifl i, x
bra copy.1
set x, pop
ret
:buf1 dat 0, 0, 0, 0, 0, 0, 0, 0
;-----------
; test data
;-----------
:key1
dat 0x0102, 0x0304, 0x0506, 0x0708, 0x090a, 0x0b0c, 0x0d0e, 0x0f10
:w_key1
dat 0x0102, 0x0304, 0x0506, 0x0708, 0x090a, 0x0b0c, 0x0d0e, 0x0f10
dat 0xab74, 0xc9d3, 0xae72, 0xcedb, 0xa778, 0xc5d7, 0xaa76, 0xcac7
dat 0x9100, 0x0f7f, 0x3f72, 0xc1a4, 0x980a, 0x0473, 0x327c, 0xceb4
dat 0x858b, 0x825c, 0xbaf9, 0x43f8, 0x22f3, 0x478b, 0x108f, 0x893f
dat 0xfe2c, 0xf796, 0x44d5, 0xb46e, 0x6626, 0xf3e5, 0x76a9, 0x7ada
dat 0x3df6, 0xa0ae, 0x7923, 0x14c0, 0x1f05, 0xe725, 0x69ac, 0x9dff
dat 0x8ca8, 0xb657, 0xf58b, 0xa297, 0xea8e, 0x45b2, 0x8322, 0xd84d
dat 0x5fc9, 0x55bb, 0xaa42, 0xf72c, 0x40cc, 0xb29e, 0xc3ee, 0x6ad3
dat 0xf7cb, 0x3395, 0x5d89, 0xc4b9, 0x1d45, 0x7627, 0xdeab, 0x1cf4
dat 0x8e57, 0x8c88, 0xd3de, 0x4831, 0xce9b, 0x3e16, 0x1030, 0x22e2
dat 0xbcc4, 0x1442, 0x6f1a, 0x5c73, 0xa181, 0x6265, 0xb1b1, 0x4087
:w_key1.end
:dw_key1
dat 0x0102, 0x0304, 0x0506, 0x0708, 0x090a, 0x0b0c, 0x0d0e, 0x0f10
dat 0x2a08, 0xd93e, 0x4d58, 0xa478, 0x6e6c, 0x8d42, 0x91e4, 0x48ec
dat 0x4e51, 0x09f7, 0x0309, 0xad8f, 0x6d65, 0x20cd, 0xfc81, 0x6821
dat 0x8fe2, 0x338e, 0x8ceb, 0x9e01, 0xe18e, 0xbecc, 0x1d0f, 0xd6ed
dat 0x3903, 0x4dc4, 0xb5e8, 0xd3c5, 0x5466, 0x6d09, 0x4969, 0xbbe4
dat 0x4596, 0x495f, 0xf07e, 0x9a9a, 0xa418, 0xf793, 0xed71, 0x4c77
dat 0x9bf2, 0x309c, 0x6b8c, 0xaa06, 0xcf94, 0x5d95, 0x22e5, 0x11e2
dat 0xd5ac, 0x2f2e, 0xbe20, 0x8528, 0x71b4, 0xd8bd, 0x5351, 0xc95f
dat 0x9465, 0x7f14, 0x2a45, 0xfa3c, 0x5bf1, 0x2281, 0x08a0, 0xebde
dat 0x40c4, 0xe3ba, 0x6a81, 0x1986, 0x3170, 0x3b07, 0x39d0, 0xd0d9
dat 0xbcc4, 0x1442, 0x6f1a, 0x5c73, 0xa181, 0x6265, 0xb1b1, 0x4087
:dw_key1.end
:key2
dat 0x0102, 0x0304, 0x0506, 0x0708, 0x090a, 0x0b0c, 0x0d0e, 0x0f10
dat 0x0102, 0x0304, 0x0506, 0x0708, 0x090a, 0x0b0c, 0x0d0e, 0x0f10
:w_key2
dat 0x0102, 0x0304, 0x0506, 0x0708, 0x090a, 0x0b0c, 0x0d0e, 0x0f10
dat 0x0102, 0x0304, 0x0506, 0x0708, 0x090a, 0x0b0c, 0x0d0e, 0x0f10
dat 0xab74, 0xc9d3, 0xae72, 0xcedb, 0xa778, 0xc5d7, 0xaa76, 0xcac7
dat 0xad3a, 0x77c2, 0xa83c, 0x70ca, 0xa136, 0x7bc6, 0xac38, 0x74d6
dat 0xaee6, 0x3f42, 0x0094, 0xf199, 0xa7ec, 0x344e, 0x0d9a, 0xfe89
dat 0x7a82, 0xcc65, 0xd2be, 0xbcaf, 0x7388, 0xc769, 0xdfb0, 0xb3bf
dat 0x4d8b, 0x37dc, 0x4d1f, 0xc645, 0xeaf3, 0xf20b, 0xe769, 0x0c82
dat 0xee7b, 0x3276, 0x3cc5, 0x8ed9, 0x4f4d, 0x49b0, 0x90fd, 0xfa0f
dat 0x11a6, 0x41bc, 0x5cb9, 0x87f9, 0xb64a, 0x75f2, 0x5123, 0x7970
dat 0x3f5d, 0x8427, 0x0398, 0x0afe, 0x4cd5, 0x434e, 0xdc28, 0xb941
dat 0x35f0, 0xc23a, 0x6949, 0x45c3, 0xdf03, 0x3031, 0x8e20, 0x4941
dat 0x26ea, 0xbfa4, 0x2572, 0xb55a, 0x69a7, 0xf614, 0xb58f, 0x4f55
dat 0x6674, 0x3eef, 0x0f3d, 0x7b2c, 0xd03e, 0x4b1d, 0x5e1e, 0x025c
dat 0x7e98, 0xc8ee, 0x5bea, 0x7db4, 0x324d, 0x8ba0, 0x87c2, 0xc4f5
dat 0x0368, 0xd8f8, 0x0c55, 0xa3d4, 0xdc6b, 0xe8c9, 0x8275, 0xea95
:w_key2.end
:dw_key2
dat 0x0102, 0x0304, 0x0506, 0x0708, 0x090a, 0x0b0c, 0x0d0e, 0x0f10
dat 0x2b3c, 0x2132, 0x6750, 0x7d46, 0x2334, 0x293a, 0xff88, 0xc5ae
dat 0x2a08, 0xd93e, 0x4d58, 0xa478, 0x6e6c, 0x8d42, 0x91e4, 0x48ec
dat 0xf444, 0x6af8, 0x9314, 0x17be, 0xb020, 0x3e84, 0x4fa8, 0xfb2a
dat 0xca6f, 0x31a1, 0x8737, 0x95d9, 0xe95b, 0x189b, 0x78bf, 0x5077
dat 0x9040, 0x8405, 0x0354, 0x93bb, 0xb374, 0xad3f, 0xfcdc, 0x5615
dat 0x77f1, 0x57fc, 0xf0c6, 0xc225, 0x199d, 0xdabe, 0x6122, 0x8ac9
dat 0x81de, 0xe46a, 0x828a, 0x77d1, 0x31fe, 0xdaee, 0xcd22, 0x8cfb
dat 0x1337, 0xd7b9, 0xe3f1, 0x159c, 0xfa6c, 0xcf22, 0x9b4e, 0x45eb
dat 0xb294, 0x9077, 0x301e, 0xe7a6, 0x01e0, 0x3d48, 0xccc2, 0xb1b3
dat 0x9b5f, 0x16ef, 0x78ae, 0x0373, 0x82c2, 0xcc51, 0x198c, 0x89ba
dat 0xc256, 0xeead, 0xf248, 0x090b, 0xf3a8, 0x3443, 0x3f6a, 0x85f0
dat 0xb83b, 0x7d3d, 0xc095, 0x7e4e, 0x4257, 0xb21f, 0x5bdb, 0x3ba5
dat 0xdd61, 0xf08c, 0x2f29, 0xf987, 0xdc81, 0xcdc4, 0xe3eb, 0x4834
dat 0x0368, 0xd8f8, 0x0c55, 0xa3d4, 0xdc6b, 0xe8c9, 0x8275, 0xea95
:dw_key2.end
:key3
dat 0, 0, 0, 0, 0, 0, 0, 0
:data3
dat 0xf344, 0x81ec, 0x3cc6, 0x27ba, 0xcd5d, 0xc3fb, 0x08f2, 0x73e6
:encrypt3
dat 0x0336, 0x763e, 0x966d, 0x9259, 0x5a56, 0x7cc9, 0xce53, 0x7f5e
:data3a
dat 0x9798, 0xc464, 0x0bad, 0x75c7, 0xc322, 0x7db9, 0x1017, 0x4e72
:encrypt3a
dat 0xa9a1, 0x631b, 0xf499, 0x6954, 0xebc0, 0x9395, 0x7b23, 0x4589
:data3b
dat 0x96ab, 0x5c2f, 0xf612, 0xd9df, 0xaae8, 0xc31f, 0x30c4, 0x2168
:encrypt3b
dat 0xff4f, 0x8391, 0xa6a4, 0x0ca5, 0xb25d, 0x23be, 0xdd44, 0xa597
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment