Re: (long) An AES implementation for 32-bit platforms
From: Richard Heathfield (dontmail_at_address.co.uk.invalid)
Date: 06/11/03
- Next message: Richard Heathfield: "Re: (long) An AES implementation for 32-bit platforms"
- Previous message: Richard Heathfield: "Re: (long) An AES implementation for 32-bit platforms"
- In reply to: Mok-Kong Shen: "Re: (long) An AES implementation for 32-bit platforms"
- Next in thread: Shill: "Re: (long) An AES implementation for 32-bit platforms"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Wed, 11 Jun 2003 06:35:23 +0000 (UTC)
Mok-Kong Shen wrote:
>
>
> Richard Heathfield wrote:
>>
>> Mok-Kong Shen wrote:
>>
>> >
>> > Recently in discussions in another thread I suggested
>> > that unions are well suited for byte-array implementations
>> > of AES.
>>
>> Your code generated many dozens of compiler errors on gcc (in conforming
>> mode). I suggest you increase your warning level.
>
> Many thanks for that information. Could you manage to
> e-mail me the compiler output so that I could make
> corresponding changes in the code. (I have only run the
> code on VC++ on an Intel machine.)
Ah, I see. I didn't know you'd written it only for Intel machines with
Microsoft operating systems. I won't trouble you with the gcc output, then,
until you've fixed the bugs that even the MS compiler reports:
First Program:
mok1.c
mok1.c(1) : warning C4001: nonstandard extension 'single line comment' was
used
mok1.c(77) : error C2061: syntax error : identifier 't0'
mok1.c(77) : error C2059: syntax error : ';'
mok1.c(77) : error C2059: syntax error : ','
mok1.c(84) : error C2065: 't0' : undeclared identifier
mok1.c(84) : error C2224: left of '.bm' must have struct/union type
mok1.c(84) : error C2224: left of '.bm' must have struct/union type
mok1.c(84) : error C2224: left of '.bm' must have struct/union type
mok1.c(85) : error C2224: left of '.bm' must have struct/union type
mok1.c(87) : error C2065: 'v0' : undeclared identifier
mok1.c(87) : error C2224: left of '.bm' must have struct/union type
mok1.c(87) : error C2224: left of '.bm' must have struct/union type
mok1.c(88) : error C2224: left of '.bm' must have struct/union type
mok1.c(88) : error C2224: left of '.bm' must have struct/union type
mok1.c(90) : error C2065: 't1' : undeclared identifier
mok1.c(90) : error C2224: left of '.bm' must have struct/union type
mok1.c(90) : error C2224: left of '.bm' must have struct/union type
mok1.c(91) : error C2065: 't2' : undeclared identifier
mok1.c(91) : error C2224: left of '.bm' must have struct/union type
mok1.c(91) : error C2224: left of '.bm' must have struct/union type
mok1.c(92) : error C2065: 't3' : undeclared identifier
mok1.c(92) : error C2224: left of '.bm' must have struct/union type
mok1.c(92) : error C2224: left of '.bm' must have struct/union type
mok1.c(93) : error C2065: 'v1' : undeclared identifier
mok1.c(93) : error C2224: left of '.bm' must have struct/union type
mok1.c(93) : error C2224: left of '.bm' must have struct/union type
mok1.c(94) : error C2065: 'v2' : undeclared identifier
mok1.c(94) : error C2224: left of '.bm' must have struct/union type
mok1.c(94) : error C2224: left of '.bm' must have struct/union type
mok1.c(95) : error C2065: 'v3' : undeclared identifier
mok1.c(95) : error C2224: left of '.bm' must have struct/union type
mok1.c(95) : error C2224: left of '.bm' must have struct/union type
mok1.c(103) : warning C4244: '=' : conversion from 'int' to 'byte', possible
loss of data
mok1.c(110) : error C2065: 't0' : undeclared identifier
mok1.c(110) : error C2224: left of '.b' must have struct/union type
mok1.c(110) : warning C4022: 'fwrite' : pointer mismatch for actual
parameter 1
mok1.c(110) : warning C4047: 'function' : 'size_t' differs in levels of
indirection from 'FILE *'
mok1.c(110) : error C2198: 'fwrite' : too few actual parameters
mok1.c(110) : error C2065: 't1' : undeclared identifier
mok1.c(110) : error C2224: left of '.b' must have struct/union type
mok1.c(110) : warning C4022: 'fwrite' : pointer mismatch for actual
parameter 1
mok1.c(110) : warning C4047: 'function' : 'size_t' differs in levels of
indirection from 'FILE *'
mok1.c(110) : error C2198: 'fwrite' : too few actual parameters
mok1.c(111) : error C2065: 't2' : undeclared identifier
mok1.c(111) : error C2224: left of '.b' must have struct/union type
mok1.c(111) : warning C4022: 'fwrite' : pointer mismatch for actual
parameter 1
mok1.c(111) : warning C4047: 'function' : 'size_t' differs in levels of
indirection from 'FILE *'
mok1.c(111) : error C2198: 'fwrite' : too few actual parameters
mok1.c(111) : error C2065: 't3' : undeclared identifier
mok1.c(111) : error C2224: left of '.b' must have struct/union type
mok1.c(111) : warning C4022: 'fwrite' : pointer mismatch for actual
parameter 1
mok1.c(111) : warning C4047: 'function' : 'size_t' differs in levels of
indirection from 'FILE *'
mok1.c(111) : error C2198: 'fwrite' : too few actual parameters
mok1.c(112) : error C2065: 'v0' : undeclared identifier
mok1.c(112) : error C2224: left of '.b' must have struct/union type
mok1.c(112) : warning C4022: 'fwrite' : pointer mismatch for actual
parameter 1
mok1.c(112) : warning C4047: 'function' : 'size_t' differs in levels of
indirection from 'FILE *'
mok1.c(112) : error C2198: 'fwrite' : too few actual parameters
mok1.c(112) : error C2065: 'v1' : undeclared identifier
mok1.c(112) : error C2224: left of '.b' must have struct/union type
mok1.c(112) : warning C4022: 'fwrite' : pointer mismatch for actual
parameter 1
mok1.c(112) : warning C4047: 'function' : 'size_t' differs in levels of
indirection from 'FILE *'
mok1.c(112) : error C2198: 'fwrite' : too few actual parameters
mok1.c(113) : error C2065: 'v2' : undeclared identifier
mok1.c(113) : error C2224: left of '.b' must have struct/union type
mok1.c(113) : warning C4022: 'fwrite' : pointer mismatch for actual
parameter 1
mok1.c(113) : warning C4047: 'function' : 'size_t' differs in levels of
indirection from 'FILE *'
mok1.c(113) : error C2198: 'fwrite' : too few actual parameters
mok1.c(113) : error C2065: 'v3' : undeclared identifier
mok1.c(113) : error C2224: left of '.b' must have struct/union type
mok1.c(113) : warning C4022: 'fwrite' : pointer mismatch for actual
parameter 1
mok1.c(113) : warning C4047: 'function' : 'size_t' differs in levels of
indirection from 'FILE *'
mok1.c(113) : error C2198: 'fwrite' : too few actual parameters
Second program:
mok2.c
mok2.c(1) : warning C4001: nonstandard extension 'single line comment' was
used
mok2.c(25) : error C2061: syntax error : identifier 'aesin'
mok2.c(25) : error C2059: syntax error : ';'
mok2.c(25) : error C2059: syntax error : ','
mok2.c(61) : error C2061: syntax error : identifier 't0'
mok2.c(61) : error C2059: syntax error : ';'
mok2.c(61) : error C2059: syntax error : ','
mok2.c(72) : error C2065: 't0' : undeclared identifier
mok2.c(72) : error C2224: left of '.b' must have struct/union type
mok2.c(72) : warning C4022: 'fread' : pointer mismatch for actual parameter
1
mok2.c(72) : warning C4047: 'function' : 'size_t' differs in levels of
indirection from 'FILE *'
mok2.c(72) : error C2198: 'fread' : too few actual parameters
mok2.c(72) : error C2065: 't1' : undeclared identifier
mok2.c(72) : error C2224: left of '.b' must have struct/union type
mok2.c(72) : warning C4022: 'fread' : pointer mismatch for actual parameter
1
mok2.c(72) : warning C4047: 'function' : 'size_t' differs in levels of
indirection from 'FILE *'
mok2.c(72) : error C2198: 'fread' : too few actual parameters
mok2.c(73) : error C2065: 't2' : undeclared identifier
mok2.c(73) : error C2224: left of '.b' must have struct/union type
mok2.c(73) : warning C4022: 'fread' : pointer mismatch for actual parameter
1
mok2.c(73) : warning C4047: 'function' : 'size_t' differs in levels of
indirection from 'FILE *'
mok2.c(73) : error C2198: 'fread' : too few actual parameters
mok2.c(73) : error C2065: 't3' : undeclared identifier
mok2.c(73) : error C2224: left of '.b' must have struct/union type
mok2.c(73) : warning C4022: 'fread' : pointer mismatch for actual parameter
1
mok2.c(73) : warning C4047: 'function' : 'size_t' differs in levels of
indirection from 'FILE *'
mok2.c(73) : error C2198: 'fread' : too few actual parameters
mok2.c(74) : error C2065: 'v0' : undeclared identifier
mok2.c(74) : error C2224: left of '.b' must have struct/union type
mok2.c(74) : warning C4022: 'fread' : pointer mismatch for actual parameter
1
mok2.c(74) : warning C4047: 'function' : 'size_t' differs in levels of
indirection from 'FILE *'
mok2.c(74) : error C2198: 'fread' : too few actual parameters
mok2.c(74) : error C2065: 'v1' : undeclared identifier
mok2.c(74) : error C2224: left of '.b' must have struct/union type
mok2.c(74) : warning C4022: 'fread' : pointer mismatch for actual parameter
1
mok2.c(74) : warning C4047: 'function' : 'size_t' differs in levels of
indirection from 'FILE *'
mok2.c(74) : error C2198: 'fread' : too few actual parameters
mok2.c(75) : error C2065: 'v2' : undeclared identifier
mok2.c(75) : error C2224: left of '.b' must have struct/union type
mok2.c(75) : warning C4022: 'fread' : pointer mismatch for actual parameter
1
mok2.c(75) : warning C4047: 'function' : 'size_t' differs in levels of
indirection from 'FILE *'
mok2.c(75) : error C2198: 'fread' : too few actual parameters
mok2.c(75) : error C2065: 'v3' : undeclared identifier
mok2.c(75) : error C2224: left of '.b' must have struct/union type
mok2.c(75) : warning C4022: 'fread' : pointer mismatch for actual parameter
1
mok2.c(75) : warning C4047: 'function' : 'size_t' differs in levels of
indirection from 'FILE *'
mok2.c(75) : error C2198: 'fread' : too few actual parameters
mok2.c(98) : error C2065: 'UU' : undeclared identifier
mok2.c(98) : error C2146: syntax error : missing ';' before identifier
'temp'
mok2.c(98) : error C2144: syntax error : '<Unknown>' should be preceded by
'<Unknown>'
mok2.c(98) : error C2144: syntax error : '<Unknown>' should be preceded by
'<Unknown>'
mok2.c(98) : error C2143: syntax error : missing ';' before 'identifier'
mok2.c(98) : error C2065: 'temp' : undeclared identifier
mok2.c(99) : error C2275: 'byte' : illegal use of this type as an expression
mok2.c(11) : see declaration of 'byte'
mok2.c(99) : error C2146: syntax error : missing ';' before identifier 't'
mok2.c(99) : error C2144: syntax error : '<Unknown>' should be preceded by
'<Unknown>'
mok2.c(99) : error C2144: syntax error : '<Unknown>' should be preceded by
'<Unknown>'
mok2.c(99) : error C2143: syntax error : missing ';' before 'identifier'
mok2.c(99) : error C2065: 't' : undeclared identifier
mok2.c(100) : error C2143: syntax error : missing ';' before 'type'
mok2.c(102) : error C2065: 'i' : undeclared identifier
mok2.c(104) : error C2224: left of '.w' must have struct/union type
mok2.c(106) : error C2224: left of '.b' must have struct/union type
mok2.c(106) : error C2224: left of '.b' must have struct/union type
mok2.c(106) : error C2224: left of '.b' must have struct/union type
mok2.c(107) : error C2224: left of '.b' must have struct/union type
mok2.c(107) : error C2224: left of '.b' must have struct/union type
mok2.c(107) : error C2224: left of '.b' must have struct/union type
mok2.c(107) : error C2224: left of '.b' must have struct/union type
mok2.c(108) : error C2224: left of '.b' must have struct/union type
mok2.c(110) : error C2224: left of '.b' must have struct/union type
mok2.c(110) : error C2224: left of '.b' must have struct/union type
mok2.c(110) : error C2224: left of '.b' must have struct/union type
mok2.c(110) : error C2224: left of '.b' must have struct/union type
mok2.c(111) : error C2224: left of '.b' must have struct/union type
mok2.c(111) : error C2224: left of '.b' must have struct/union type
mok2.c(111) : error C2224: left of '.b' must have struct/union type
mok2.c(111) : error C2224: left of '.b' must have struct/union type
mok2.c(113) : error C2224: left of '.w' must have struct/union type
mok2.c(121) : error C2065: 'UU' : undeclared identifier
mok2.c(121) : error C2146: syntax error : missing ';' before identifier
'temp'
mok2.c(121) : error C2144: syntax error : '<Unknown>' should be preceded by
'<Unknown>'
mok2.c(121) : error C2144: syntax error : '<Unknown>' should be preceded by
'<Unknown>'
mok2.c(121) : error C2143: syntax error : missing ';' before 'identifier'
mok2.c(121) : error C2065: 'temp' : undeclared identifier
mok2.c(122) : error C2275: 'byte' : illegal use of this type as an
expression
mok2.c(11) : see declaration of 'byte'
mok2.c(122) : error C2146: syntax error : missing ';' before identifier 'rr'
mok2.c(122) : error C2144: syntax error : '<Unknown>' should be preceded by
'<Unknown>'
mok2.c(122) : error C2144: syntax error : '<Unknown>' should be preceded by
'<Unknown>'
mok2.c(122) : error C2143: syntax error : missing ';' before 'identifier'
mok2.c(122) : error C2065: 'rr' : undeclared identifier
mok2.c(122) : error C2065: 'r' : undeclared identifier
mok2.c(122) : error C2065: 'a' : undeclared identifier
mok2.c(122) : error C2065: 'b' : undeclared identifier
mok2.c(123) : error C2143: syntax error : missing ';' before 'type'
mok2.c(126) : error C2065: 'ii1' : undeclared identifier
mok2.c(126) : error C2065: 'ii2' : undeclared identifier
mok2.c(127) : error C2065: 'ii' : undeclared identifier
mok2.c(128) : error C2224: left of '.w' must have struct/union type
mok2.c(129) : error C2065: 'i' : undeclared identifier
mok2.c(131) : error C2065: 'j' : undeclared identifier
mok2.c(132) : error C2224: left of '.b' must have struct/union type
mok2.c(139) : warning C4244: '=' : conversion from 'int' to 'byte', possible
loss of data
mok2.c(151) : error C2146: syntax error : missing ')' before identifier
'kind'
mok2.c(151) : error C2144: syntax error : '<Unknown>' should be preceded by
'<Unknown>'
mok2.c(151) : error C2144: syntax error : '<Unknown>' should be preceded by
'<Unknown>'
mok2.c(151) : error C2143: syntax error : missing ')' before 'identifier'
mok2.c(151) : error C2061: syntax error : identifier 'kind'
mok2.c(151) : error C2059: syntax error : ';'
mok2.c(151) : error C2059: syntax error : ')'
mok2.c(152) : error C2449: found '{' at file scope (missing function
header?)
mok2.c(158) : error C2059: syntax error : '}'
mok2.c(252) : warning C4013: 'aeskeyschedule' undefined; assuming extern
returning int
mok2.c(253) : error C2065: 'aesin' : undeclared identifier
mok2.c(253) : error C2224: left of '.b' must have struct/union type
mok2.c(254) : error C2224: left of '.b' must have struct/union type
mok2.c(254) : warning C4047: 'function' : 'byte *' differs in levels of
indirection from 'int'
mok2.c(254) : error C2198: 'display' : too few actual parameters
mok2.c(255) : warning C4013: 'aesprocess' undefined; assuming extern
returning int
mok2.c(256) : error C2065: 'aesout' : undeclared identifier
mok2.c(256) : error C2224: left of '.b' must have struct/union type
mok2.c(256) : warning C4047: 'function' : 'byte *' differs in levels of
indirection from 'int'
mok2.c(256) : error C2198: 'display' : too few actual parameters
mok2.c(256) : fatal error C1003: error count exceeds 100; stopping
compilation
-- Richard Heathfield : binary@eton.powernet.co.uk "Usenet is a strange place." - Dennis M Ritchie, 29 July 1999. C FAQ: http://www.eskimo.com/~scs/C-faq/top.html K&R answers, C books, etc: http://users.powernet.co.uk/eton
- Next message: Richard Heathfield: "Re: (long) An AES implementation for 32-bit platforms"
- Previous message: Richard Heathfield: "Re: (long) An AES implementation for 32-bit platforms"
- In reply to: Mok-Kong Shen: "Re: (long) An AES implementation for 32-bit platforms"
- Next in thread: Shill: "Re: (long) An AES implementation for 32-bit platforms"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|