[FFmpeg-devel] Help: AES GF Multiply
Michael Niedermayer
michaelni at gmx.at
Mon Jul 30 17:13:26 CEST 2012
On Mon, Jul 30, 2012 at 04:56:05PM +0200, Michael Niedermayer wrote:
> On Mon, Jul 30, 2012 at 11:49:51PM +1000, Peter Ross wrote:
> > Gents,
> >
> > In my spare time I am toying with an obscure remote desktop protocol called
> > PCoIP. The format encrypts its packets with Salsa20, AES-128 or 256 crypto,
> > which are simple enough to decode. Alas, I am stuck implementing the checksum
> > algorithm used with the AES-128/256 packets.
> >
> > The checksum value is 16-byte wide, and is calculated by xor'ing each 16-byte
> > block of ciphertext *and* then performing an 'AES GF multiplication' over checksum
> > value. The AES instanced used to perform the multiplication is loaded with the
> > same keymaterial used to decode the actual payload.
> >
> > Within PCoIP the GF multiplication function is called 'gf_multi_h'. There are
> > mmx and x86 variants of this within the reference .so/dll blob file.
> >
> > libavutil/aes.c is performing GF multiplication, but its not obvious to
> > me how to access this functionality. The math is especially foreign. Any
> > pointers on how aes.c can be modified to provide such a function?
>
> GF multiplication really behaves the same as normal multiplication in
> a field. the common "laws" hold
> a*1=1*a = a
> a*b=b*a
> a*(a^-1) = 1 | a != 0
and of course i forgot to list one: a*(b*c) = (a*b)*c
0 and 1 in above are the identity elements of + and *
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Rewriting code that is poorly written but fully understood is good.
Rewriting code that one doesnt understand is a sign that one is less smart
then the original author, trying to rewrite it will not make it better.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120730/223d7b64/attachment.asc>
More information about the ffmpeg-devel
mailing list