#!/usr/bin/perl

printf("%4s %4s %20s %20s %20s\n","r","n","keysize","memory","setups");

$roundlow = 8;
$roundhigh = 32;
$roundinc = 4;

$blklow = 8;
$blkhigh = 160;
$blkinc = 8;

for($r = $roundlow;$r <= $roundhigh; $r += $roundinc) 
	{
	for($n = $blklow ; $n <= $blkhigh; $n += $blkinc)
		{
		$keysize = ($r - 2) * ($n / 2);
		$sboxspace = (2**($n/8+2)+$r+2)*$n/16;
		$setups = 2**($n/8+1)+($r/2)+1;
		printf("%4d %4d %20d %20d %20d\n",
                        $r,$n,$keysize,$sboxspace,$setups);
		}
	}
