add benchmark data on chaffing

unchaffed AES is 5.36us/block
chaffed AES is 10.27us/block

so ~2x overhead for chaffing - about what we expect for the
implementation.
This commit is contained in:
bunnie 2025-12-02 01:05:26 +08:00
parent da44e98257
commit 5b4d6c1932
2 changed files with 8 additions and 2 deletions

View file

@ -30,7 +30,9 @@ rand = { version = "0.8.5", features = ["getrandom"], optional = true }
rand_chacha = { version = "0.3.1", optional = true }
rand_core = "0.6.4"
aes = { path = "../aes", default-features = false, optional = true }
aes = { path = "../aes", default-features = false, optional = true, features = [
"chaffing",
] }
# time testing
chrono = "0.4.33"
@ -82,4 +84,4 @@ rramtests = []
# loaded and run.
duart-debug-hal = ["bao1x-hal/debug-print-duart"]
default = ["with-pddb"]
default = ["with-pddb", "aestests"]

View file

@ -168,6 +168,10 @@ with vex bao1x CPU (400MHz)
hardware 4.65µs/block enc+dec AES256
software 45.79µs/block enc+dec AES256
with vex bao1x CPU (350MHz)
hardware 5.36µs/block enc+dec AES256
software 52.45µs/block enc+dec AES256
hardware - with chaffing - 10.27µs/block enc+dec AES256
*/
pub fn benchmark_thread(sid0: usize, sid1: usize, sid2: usize, sid3: usize) {
let sid = xous::SID::from_u32(sid0 as u32, sid1 as u32, sid2 as u32, sid3 as u32);