Skip to content

Instantly share code, notes, and snippets.

@MarekKnapek
Created November 24, 2023 16:13
Show Gist options
  • Save MarekKnapek/2a90ace29ee4db6a5bfac93a87c4697a to your computer and use it in GitHub Desktop.
Save MarekKnapek/2a90ace29ee4db6a5bfac93a87c4697a to your computer and use it in GitHub Desktop.
mkcc-performance
  • Download oldver verison of my tool from GitHub actions artifacts. https://github.com/MarekKnapek/mk_clib/suites/18431986431/artifacts/1068471379
  • Download newer version of my tool from https://github.com/MarekKnapek/mk_clib/suites/18473732200/artifacts/1071599132
  • Find some large file on your hard disk (>1GB) or create new one.
    • You can use the dd tool for Windows from http://www.chrysocome.net/dd to create new file.
    • dd bs=1M count=1k if=/dev/random of=plaintext.bin --progress
  • Encrypt the file with the Serpent cipher using the CTR mode and measure how long it took.
    • I'm using the unix time utility from https://github.com/skeeto/w64devkit
    • Command to encrypt:
    • c:\path\to\w64devkit64\bin\time.exe .\mkcc-release-x64.exe /direction encrypt /alg serpent /padding pkcs7 /mode ctr /kdf pbkdf2_sha2_512_256 /password Hunter2 /salt cryptor /cost 1000 /input plaintext.bin /output ciphertext.bin
    • Repeat the measurement with newver version of my tool. This version is able to detect and use the AVX-512F insturction set.
    • Hopefully there should be around 2x performance improvement (if not held back by slow hard disk).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment