cancel
Showing results for 
Search instead for 
Did you mean: 

How can I represent multiplicative inverse in GF(2^8)?

qcho.1
Associate II

Hi, I'm here to seek help.

I would like to represent multiplicative inverse in GF(2^8), using textLCD in mCube cortex m4 with stm32407vg.

I'll use functions, unsinged char xtimes(); and unsigned char inv(unsigned char a);

And also, I want to represent result value of inv() seems like [inv : (value)] on textLCD.

Is there the way to input value using my mCube cortext m4, and represent result value?

6 REPLIES 6

Could you use sprintf() and sscanf() ?

What's your input device?

How is the Galois Field stuff related to your ability to display things on the screen? ​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

I changed the way I had it in mind: using 2 buttons on the keypad to increment/decrement each value and display the inverse directly on the textLCD or 7-seg.

1) How can the result be displayed if I use sprintf()?

2) The input/output device is mCube micro processor.

3) The multiplicative inverse of GF(2^8) should be displayed on the device.

Presumably sprintf() could create a message string that you subsequent paint on the screen in the format you want.

What is an "mCube micro processor", you mean mBed or or CubeMX ?

Provide a web link to what you're talking about.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

0693W00000WK0yOQAT.jpgI can't proper link about mCube micro processor, so I attach photo of it.

It's made in Korea, so you may not know.​

Ok, so some MCU training board in a case. Indeed Google here was unfruitful.

Assume also we can't see your code, or the libraries your using.

Perhaps use pastebin or GitHub, it easier to get contextual clues about the forms of commands and methods if they are shown rather than described out of any context.

Here perhaps create a string that you send to the screen functions?

char string[32];

sprintf(buffer, "[inv : (%02X)]", inv() );

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

hmm...

That's right, it's training board, I think.

I'll use your method, like :

"Original : 1" >> sprintf(buffer, "Original : %02x", operand);

"inv : 8d" >> sprintf(buffer, "Inv : %02x", inv(operand);

Then, the last task left for me is to properly connect the IO port to the TextLCD and write the code.

It's late now in Korea, so I'll continue writing the code tomorrow and post the question again.

Thank you very much for your help.