# How can Shamir's method for secret sharing work in the GF(256)?

I have been reading about Shamir's secret sharing, and maybe i completely misunderstand something, but the field is meant to be a prime. However, when i look at the implementations of this algorithm, they all use GF(256).

I do understand the beauty of such field, since that's the best compromise between the size of the chunk of the data and the number of keys that one can generate, but i was unable to find how they got around the requirement of a prime.

Alternatively, of course, i have misread something.

• You can use any field. Prime order fields are nice because you can use standard modular arithmetic, whereas other fields are a bit tricky to understand. But fields exist for all prime powers p^n. The most common choices p=2 (binary fields like the 2^8 you're talking about) or n=1 (prime fields). Nov 26 '13 at 17:14
• Ah, ok. You should have answered as an answer rather than a comment. I could accept that then.
– Volodya
Nov 26 '13 at 17:30
• And if i understood you correctly GF(6) would not be allowed.
– Volodya
Nov 26 '13 at 17:34
• Yes, there is no GF(6) since you can't write it as p^n. Nov 26 '13 at 17:37

• @PaŭloEbermann: Shamir's secret sharing requires that the secret polynomial be selected from a uniform distribution; it turns out that's impossible for the rationals (or any other set of size $\aleph_0$). As for the reals, well, that can be defined, but the fact that you cannot express (almost all) elements in a finite number of bits is a bit of a drawback. Hence, in both cases, you could say that Shamir's secret sharing "doesn't work" Nov 26 '13 at 20:29