/*
 *  FIPS-197 compliant AES implementation
 *
 *  Copyright (C) 2001-2003  Christophe Devine
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

#include "aes.h"

#include <string.h>
#include <stdio.h>

/*
 * Rijndael Monte Carlo Test: ECB mode
 * source: NIST - rijndael-vals.zip
 */

int main( void )
{
    int m, n, i, j;
    aes_context ctx;
    unsigned char buf[16];
    unsigned char out[16];
    unsigned char key[32];

    memset( buf, 0, 16 );
    memset( key, 0x0f, 16 );

	for (i = 0; i < 1024000; i += 16)
	{
		aes_set_key( &ctx, key, 128 );
		aes_encrypt( &ctx, buf, buf );
		for (m = 0; m < 16; m++)
		{
			printf("%c", buf[m]);
			key[m] = buf[m];
		}
	}
    return( 0 );
}

