Andreas Rheinhardt
636631d9db
Remove unnecessary libavutil/(avutil|common|internal).h inclusions
...
Some of these were made possible by moving several common macros to
libavutil/macros.h.
While just at it, also improve the other headers a bit.
Reviewed-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
3 years ago
Diego Biurrun
d12b5b2f13
build: Split test programs off into separate files
...
This avoids spurious library rebuilds when only the test program
code is changed and simplifies the build system.
9 years ago
Martin Storsjö
92d107a171
xtea: Add functions for little endian mode
...
Signed-off-by: Martin Storsjö <martin@martin.st>
9 years ago
James Almer
3d1690b8c6
avutil: undo FF_API_CRYPTO_CONTEXT deprecation
...
It's been argued that the benefits of the current implementation far outweight
those of making the structs opaque.
This deprecation is not present in any release, so it can be safely removed.
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
9 years ago
James Almer
5d8bea3bb2
xtea: add av_xtea_alloc()
...
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
9 years ago
Timothy Gu
486e3649ce
xtea: Add Doxy @file and group
11 years ago
Timothy Gu
50f52a5498
avutil/xtea: add Doxy @file and group
...
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Diego Biurrun
a0b901a348
Drop pointless directory name prefixes from #includes in the current dir
11 years ago
Michael Niedermayer
0e98a13322
avutil/xtea: make const tables static const
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
c5bea1b02b
xtea: fix unused variable warning for config_small
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
cb45553f57
Remove pointless #undefs of previously forbidden functions.
12 years ago
Michael Niedermayer
43bbc3f477
xtea: give constants the correct type
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
f0fce9f33e
xtea: Test inplace decryption
...
Based on test code by: Giorgio Vazzana <mywing81@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Michael Niedermayer
b434500431
xtea: Fix CBC decryption when src==dst
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Martin Storsjö
ca074cc313
xtea: Factorize testing into a separate function
...
Based on a patch by Michael Niedermayer.
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Giorgio Vazzana
a8cb21fd62
xtea: fix decryption with --enable-small
...
iv decrypt handling code needs to be executed regardless of CONFIG_SMALL
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
48154c2594
xtea: move iv decrypt handling code into xtea_crypt_ecb()
...
this simplifies things are avoids a temporary
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
a4dcdd04d7
xtea-test: test inplace decryption
...
Based on test code by: Giorgio Vazzana <mywing81@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Giorgio Vazzana
8c3ee93be5
xtea: fix CBC mode when src=dst
...
In CBC mode, when src=dst and we are decrypting a block different
from the first one, we need to save the current block of ciphertext
(which will constitute the initialization vector for the next block)
before we overwrite it.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
a0321dadfd
xtea-test: factorize test code
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
bb4ddeea5f
xtea: optimize core, about 4-5% faster.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Samuel Pitoiset
983db9b2b4
xtea: Make the count parameter match the documentation
...
Previously it was interpreted as number of bytes, while the
documentation stated that it was the number of 8 byte blocks.
This makes it behave similarly to the existing AES code.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Luca Barbato
f6687bf5f8
xtea: invert branch and loop precedence
...
Should slightly improve performance depending on the compiler used.
13 years ago
Samuel Pitoiset
8c14f7a593
Add XTEA encryption support in libavutil
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago