Commit Graph

6 Commits

Author SHA1 Message Date
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>
2022-02-24 12:56:49 +01:00
Sebastian Kirmayer dfd06ee710 avutil/twofish: Fixed decryption
The previous implementation swapped the two halves of the plaintext. The
existing tests only decrypted data with a plaintext of all zeroes, which is
not affected by swapping the halves. Tests which detect the old buggy behavior
have been added.

Signed-off-by: Sebastian Kirmayer <ffmpeg@kirmayer.eu>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-12-19 01:02:59 +01:00
Derek Buitenhuis 96d616052b Merge commit 'd12b5b2f135aade4099f4b26b0fe678656158c13'
* commit 'd12b5b2f135aade4099f4b26b0fe678656158c13':
  build: Split test programs off into separate files

Some conversions done by: James Almer <jamrial@gmail.com>
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-05-11 19:13:03 +01:00
Ganesh Ajjanagadde 07d4fe3a87 avutil: use EINVAL instead of -1 for the return code of crypto related init functions
These functions return an error typically when the key size is an
incorrect number. AVERROR(EINVAL) is more specific than -1.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-18 15:17:58 -04:00
Supraja Meedinti 092ee6cd32 libavutil: optimize twofish cipher
before:
lavu       TWOFISH      size: 1048576  runs:   1024  time:   90.052 +- 4.630
after:
lavu       TWOFISH      size: 1048576  runs:   1024  time:   18.085 +- 0.241
gcrypt     TWOFISH      size: 1048576  runs:   1024  time:   25.666 +- 0.307
tomcrypt   TWOFISH      size: 1048576  runs:   1024  time:   18.428 +- 0.363

Signed-off-by: Supraja Meedinti <supraja0493@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-18 00:59:55 +01:00
Supraja Meedinti 6ad749b533 libavutil: Added twofish symmetric block cipher
Signed-off-by: Supraja Meedinti <supraja0493@gmail.com>
Reviewed-by: Giorgio Vazzana <mywing81@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-29 01:56:11 +01:00