Skip to content

crypto: x86/blowfish - Cleanup and convert to ECB/CBC macros

Peter Lafreniere linux-crypto 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 2 repliesIn review
  2. v13 patches 0 repliesSuperseded

Changes in v2 from the cover letter

- Fixed typo that caused an assembler failure
- Added note about performance to cover letter

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3crypto: x86/blowfish - Remove unused encode parameterarch/x86/crypto/blowfish-x86_64-asm_64.S arch/x86/crypto/blowfish_glue.c+7 -570 replies
2/3crypto: x86/blowfish - Convert to use ECB/CBC helpersarch/x86/crypto/blowfish-x86_64-asm_64.S arch/x86/crypto/blowfish_glue.c+58 -1680 replies
3/3crypto: x86/blowfish - Eliminate use of SYM_TYPED_FUNC_START in asmarch/x86/crypto/blowfish-x86_64-asm_64.S+4 -50 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchArd Biesheuvel
SeriesT-b A-b
1/3
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/3] crypto: x86/blowfish - Cleanup and convert to ECB/CBC macros

We can acheive a reduction in code size by cleaning up unused logic in assembly functions, and by replacing handwritten ECB/CBC routines with helper macros from 'ecb_cbc_helpers.h'.

Additionally, these changes can allow future x86_64 optimized implementations to take advantage of blowfish-x86_64's fast 1-way and 4-way functions with less code churn.

When testing the patch, I saw a few percent lower cycle counts per iteration on Intel Skylake for both encryption and decryption. This is merely a single observation and this series has not been rigorously benchmarked, as performance changes are not expected.

v1 -> v2:
- Fixed typo that caused an assembler failure
- Added note about performance to cover letter

Peter Lafreniere (3):
crypto: x86/blowfish - Remove unused encode parameter
crypto: x86/blowfish - Convert to use ECB/CBC helpers
crypto: x86/blowfish - Eliminate use of SYM_TYPED_FUNC_START in asm

 arch/x86/crypto/blowfish-x86_64-asm_64.S |  71 ++++----
 arch/x86/crypto/blowfish_glue.c          | 200 +++--------------------
 2 files changed, 55 insertions(+), 216 deletions(-)
Signature · 1 line
2.39.1