# Tag Info

5

It's generally strongly recommended you use an existing library for your crypto, instead of trying to reimplement it. One big advantage of a widely used existing library is that it's been improved over time to deal with new threats. You may be aware of timing attacks as a current weakness, but these libraries have already solved those problems and many ...

3

The RELIC library has support for binary fields. Check the functions fb_inv_exgcd for inversion and fb_mul_lodah (which calls fb_muln_low and fb_rdcn_low) for multiplication. There is even a ATMega128 backend written in assembly, though it does not support 128-bit fields (but should give you a head start if you need to write it). You will need to make a few ...

3

That sort of thing is known as multi-party computation, and you should use a Socialist Millionaire Protocol for your particular instance.

3

Almost all other languages can call C code, so using C is a safe bet. Serpent, Twofish, Threefish and scrypt all provide C implementations. (See the links.) Some even provide optimized code. Writing objC or C++ wrappers seems unnecessary since both can call C funtions. The sleep(3) library function is part of POSIX. So you'll find it on linux, mac, *BSD but ...

2

The formula you are looking for is Lagrange Basis Polynomials. Essentially, each share consists of two values, an x coordinate and an y coordinate. The x coordinate might, depending on your specific needs, be implicitly determined by context, such as a preexisting identifier for the entity holding the share. The only requirement is that it is non-zero and ...

2

Suppose $s_0, s_1, s_2, \ldots, s_{k-1}$ are elements from the finite field you are working in, where $s_0$ is the secret to be shared, and the $s_i, i > 0$ are randomly chosen nonzero elements of the field. Then, the polynomial used to construct the shares is $$S(x) = s_0 + s_1x + s_2x^2+ \cdots + s_{k-1}x^{k-1}$$ and the shares themselves are \$y_i = ...

1

Yes, there is. I'm assuming your broadcast stream is (or can be) somehow broken up in smaller messages (or "packets"), and you don't need to retire a key before a message is finished. Then you produce a random session key for each message, and encrypt this session key with each of the subscribers' keys, prepend them (together with some tagging) to the ...

1

The easy way to reconstruct the secret is using Neville's algorithm. Basically, let the array y contain n shares (assumed to be represented as the type gf_t here), let the array x contain the points at which the polynomial was evaluated to generate those shares, and let sub(), mul() and inv() be functions/macros that perform the appropriate finite field ...

Only top voted, non community-wiki answers of a minimum length are eligible