2 Just run the sketch after loading the libraries.
12 What to do after changes to the library
21 What to do after changes to a sketch
37 This is a derived work from Brian Gladman's AES implementation for byte-oriented
38 processors, here's the licence terms:
41 ---------------------------------------------------------------------------
42 Copyright (c) 1998-2008, Brian Gladman, Worcester, UK. All rights reserved.
46 The redistribution and use of this software (with or without changes)
47 is allowed without the payment of fees or royalties provided that:
49 1. source code distributions include the above copyright notice, this
50 list of conditions and the following disclaimer;
52 2. binary distributions include the above copyright notice, this list
53 of conditions and the following disclaimer in their documentation;
55 3. the name of the copyright holder is not used to endorse products
56 built using this software without specific written permission.
60 This software is provided 'as is' with no explicit or implied warranties
61 in respect of its properties, including, but not limited to, correctness
62 and/or fitness for purpose.
63 ---------------------------------------------------------------------------
66 This is an AES implementation that uses only 8-bit byte operations on the
67 cipher state (there are options to use 32-bit types if available).
69 The combination of mix columns and byte substitution used here is based on
70 that developed by Karl Malbrain. His contribution is acknowledged.
73 /* This version derived by Mark Tillotson 2012-01-23, tidied up, slimmed down
74 and tailored to 8-bit microcontroller abilities and Arduino datatypes.
76 The s-box and inverse s-box were retained as tables (0.5kB PROGMEM) but all
77 the other transformations are coded to save table space. Many efficiency
78 improvments to the routines mix_sub_columns() and inv_mix_sub_columns()
79 (mainly common sub-expression elimination).
81 Only the routines with precalculated subkey schedule are retained (together
82 with set_key() - this does however mean each AES object takes 240 bytes of
85 The CBC routines side-effect the iv argument (so that successive calls work
88 All the encryption and decryption routines work with plain == cipher for
89 in-place encryption, note.