Problem hidden
This problem was hidden by Editorial Board member probably because it has incorrect language version or invalid test data, or description of the problem is not clear.

Problem hidden

AES64KE - AES-64K Encryption

no tags 

Encrypt up to 64Kb of data using AES (ECB mode) as described in (fips-197.pdf). Extend the implementation to support 128bit, 192bit, 256bit, ... up to 64Kb keys. Assume Nr = Nk + 6.

Input

The length of the key in bytes: |K| = 64j, 2 ≤ j ≤ 27

|K| bytes of the key in hexadecimal: K1, K2, ... , K64j

The length of the data in bytes: |D| = 16i, 1 ≤ i < 29

|D| bytes of data in hexadecimal: D1, D2, ... , D16i

Output

|D| bytes of encrypted hexadecimal data: E1, E2, ... , E16i

Example

Input:
32
00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f
16
00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee ff

Output:
8e a2 b7 ca 51 67 45 bf ea fc 49 90 4b 49 60 89

Additional languages available upon request.


Added by:Jared Deckard
Date:2012-11-11
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:ASM32 C C++ 4.3.2
Resource:http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf