1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3 4<head> 5<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 6<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows"> 7<META http-equiv="Content-Style-Type" content="text/css"> 8<title>AESCounter</title> 9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 10</head> 11 12<body> 13 14<h1 align="left">AESCounter <IMG src="../../image/TWL.gif" width="23" height="12" border="0" align="middle"></h1> 15<h2>Syntax</h2> 16 17<dl> 18 <dd> 19 <pre><CODE>#include <twl/aes.h> 20 21#define AES_COUNTER_SIZE 16 // 128 bit 22 23typedef union AESCounter 24{ 25 u8 bytes[AES_COUNTER_SIZE]; 26 u32 words[AES_COUNTER_SIZE/sizeof(u32)]; 27} 28AESCounter; 29</CODE></pre><br> 30</dd> 31</dl> 32 33<H2>Members</H2> 34<TABLE border="1" width="100%" class="members"> 35 <TBODY> 36 <TR> 37 <TH>bytes</TH> 38 <TD>AES initial counter value, expressed as a byte array.</TD> 39 </TR> 40 <TR> 41 <TH>words</TH> 42 <TD>AES initial counter value, expressed as a word array. Note that the TWL is a little-endian machine.</TD> 43 </TR> 44 </TBODY> 45</TABLE> 46 47<H2>Description</H2> 48<P> 49Union for storing the initial counter value used to scramble the encryption results of CTR-mode AES. 50</P> 51 52<H2>Revision History</H2> 53<P> 542007/12/25 Initial version. 55</P> 56<hr><p>CONFIDENTIAL</p></body> 57</HTML> 58