Skip to content

Performance optimization of SM4-XTS encryption and decryption on RISC-V#6

Open
zl523856 wants to merge 1 commit into
baseline-aesfrom
optimize_sm4_xts
Open

Performance optimization of SM4-XTS encryption and decryption on RISC-V#6
zl523856 wants to merge 1 commit into
baseline-aesfrom
optimize_sm4_xts

Conversation

@zl523856

Copy link
Copy Markdown
Collaborator

This module implements hardware instruction acceleration for SM4-XTS encryption and decryption calculations.

Code from the OpenAnolis community at https://gitee.com/src-anolis-os/openssl/pulls, jointly developed by Alibaba DAMO Academy and ZTE.

Hardware simulation environment verification data:

Encrypt Test Baseline Optimized Improvement ratio
16 bytes 7678.64k 9123.29k 19%
64 bytes 13388.16k 27949.34k 109%
256 bytes 16292.61k 60993.07k 274%
1024 bytes 17157.58k 67229.52k 292%
8192 bytes 17506.3k 73404.54k 319%
16384 bytes 17503.3k 73679.28k 321%
Decrypt Test Baseline Optimized Improvement ratio
16 bytes 7571.44k 10867.31k 44%
64 bytes 13108.21k 31051.57k 137%
256 bytes 16308.99k 59285.31k 264%
1024 bytes 17143.38k 70561.16k 312%
8192 bytes 17612.8k 73996.33k 320%
16384 bytes 17661.95k 74066.56k 319%
Test Verification
All relevant tests pass in the default build configuration: make test

99-test_fuzz_x509.t ...................... ok
All tests successful.
Files=350, Tests=4030, 7925 wallclock secs (93.00 usr 24.55 sys + 5698.70 cusr 1960.42 csys = 7776.67 CPU) Result: PASS

Checklist
  • documentation is added or updated
  • tests are added or updated

This module implements hardware instruction acceleration for SM4-XTS encryption and decryption calculations.

Code from the OpenAnolis community at https://gitee.com/src-anolis-os/openssl/pulls, jointly developed by Alibaba DAMO Academy and ZTE.

Hardware simulation environment verification data:

Encrypt Test Baseline Optimized Improvement ratio
16 bytes 7678.64k 9123.29k 19%
64 bytes 13388.16k 27949.34k 109%
256 bytes 16292.61k 60993.07k 274%
1024 bytes 17157.58k 67229.52k 292%
8192 bytes 17506.3k 73404.54k 319%
16384 bytes 17503.3k 73679.28k 321%
Decrypt Test Baseline Optimized Improvement ratio
16 bytes 7571.44k 10867.31k 44%
64 bytes 13108.21k 31051.57k 137%
256 bytes 16308.99k 59285.31k 264%
1024 bytes 17143.38k 70561.16k 312%
8192 bytes 17612.8k 73996.33k 320%
16384 bytes 17661.95k 74066.56k 319%
Test Verification
All relevant tests pass in the default build configuration: make test

99-test_fuzz_x509.t ...................... ok
All tests successful.
Files=350, Tests=4030, 7925 wallclock secs (93.00 usr 24.55 sys + 5698.70 cusr 1960.42 csys = 7776.67 CPU) Result: PASS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant