C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

C programming, need help..

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ Language (Moderated)
View previous topic :: View next topic  
Author Message
Tiza Naziri
Guest





PostPosted: Mon Mar 14, 2005 9:02 am    Post subject: C programming, need help.. Reply with quote



Hi,

I'm Siti Zarina from Malaysia. Currently I involve in a research
project on Advanced Encryption Standard (AES).

I'm not really good in C/C++ programming. I need some advice on how to
represent the finite field GF(2^Cool operations (such as addition,
inversion, multiplication) in binary representation in C language.
Another thing is how to represent the pseudocode for generating
multiplicative inverse below:

remainder[1] = f(x)
remainder[2] = a(x)
auxiliary[1] = 0
auxiliary[2] = 1

i = 2

do while remainder[i] <> 1
i = i + 1
remainder[i] = remainder(remainder[i-2] / remainder[i-1])
quotient[i] = quotient(remainder[i-2] / remainder[i-1])
auxiliary[i] = quotient[i] * auxiliary[i-1] + auxiliary[i-2]
inverse = auxiliary[i]

For AES, the f(x) = x^8 + x^4 + x^3 + x + 1.

Consideration and help is greatly appreciated.

Thank you.

Regards.

Siti Zarina


[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

Back to top
Ben Hutchings
Guest





PostPosted: Mon Mar 14, 2005 9:34 pm    Post subject: Re: C programming, need help.. Reply with quote



Tiza Naziri wrote:
Quote:
Hi,

I'm Siti Zarina from Malaysia. Currently I involve in a research
project on Advanced Encryption Standard (AES).

I'm not really good in C/C++ programming. I need some advice on how to
represent the finite field GF(2^Cool operations (such as addition,
inversion, multiplication) in binary representation in C language.
snip


C and C++ are quite different languages. A natural implementation of
an algorithm in C++ may well not be valid C code. If you need C
code, this is not the place to ask.

--
Ben Hutchings
Having problems with C++ templates? Your questions may be answered by
<http://womble.decadentplace.org.uk/c++/template-faq.html>.

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

Back to top
Marcin Mañk
Guest





PostPosted: Tue Mar 15, 2005 8:34 pm    Post subject: Re: C programming, need help.. Reply with quote




"Tiza Naziri" <watija (AT) yahoo (DOT) com> wrote

Quote:
Hi,

I'm Siti Zarina from Malaysia. Currently I involve in a research
project on Advanced Encryption Standard (AES).

Hello
There are many C implementations of AES on the web (from very verbose to
very speed-optimized) . Browsing the code would give you many hints.
Also try searching under 'rijndael' .

Greetings
Marcin



[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]


Back to top
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ Language (Moderated) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.