Skip to content
This repository has been archived by the owner on Jul 25, 2019. It is now read-only.

g^510 and g^511 #12

Closed
fcorneli opened this issue Apr 30, 2019 · 5 comments
Closed

g^510 and g^511 #12

fcorneli opened this issue Apr 30, 2019 · 5 comments

Comments

@fcorneli
Copy link

When I calculate g^510 and g^511 manually, I get values 1 and 3. Why does the EXP table contain values 0 and 0 here?

(byte) 0x24, (byte) 0x6c, (byte) 0xb4, (byte) 0xc7, (byte) 0x52, (byte) 0xf6, (byte) 0x00,

@codahale
Copy link
Owner

Those are never actually referenced, since EXP only extends to 255+255.

This table was generated using the procedure specified here: https://github.com/rsc/qr/blob/master/gf256/gf256.go#L21

@fcorneli
Copy link
Author

Sure that g^510 is not required for 255+255?

@fcorneli
Copy link
Author

Put g^510 and g^511 there and you can kick out an ifin mul... no?

@codahale
Copy link
Owner

You’re missing the point — it’s a lookup table for the results of everything except a=0 or b=0, so it only needs to be 510 elements long. Please stop opening issues unless you can write a test demonstrating a problem with the code.

Repository owner locked as resolved and limited conversation to collaborators Apr 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants