Add a benchmark
This commit is contained in:
parent
16b2087627
commit
c62029ee91
14 changed files with 148 additions and 0 deletions
11
Cargo.toml
11
Cargo.toml
|
@ -22,3 +22,14 @@ blake3 = { version = "1.5.0", default-features = false }
|
|||
chacha20poly1305 = { version = "0.10.1", default-features = false, features = ["std"] }
|
||||
getrandom = { version = "0.2.12", default-features = false }
|
||||
thiserror = { version = "1.0.57", default-features = false }
|
||||
|
||||
[dev-dependencies]
|
||||
criterion = "0.5.1"
|
||||
|
||||
[[bench]]
|
||||
name = "decryption"
|
||||
harness = false
|
||||
|
||||
[[bench]]
|
||||
name = "encryption"
|
||||
harness = false
|
||||
|
|
47
benches/data.rs
Normal file
47
benches/data.rs
Normal file
|
@ -0,0 +1,47 @@
|
|||
pub const MEASUREMENT_TIME: u64 = 30;
|
||||
pub const KEY_CTX: [&str; 3] = ["database_name", "table_name", "column_name"];
|
||||
pub const DATA_CTX: [&str; 2] = [
|
||||
"b3b21eb1-70d7-4dc6-9a2a-439e17d8491d",
|
||||
"8dfa06bc-de19-455a-8e43-2f5d8019442f",
|
||||
];
|
||||
// created_at: Sunday 21 February 2021 10:21:42
|
||||
// expire_at: Thursday 10 February 2180 10:21:42
|
||||
// is_revoked: false
|
||||
pub const IKML_XCHACHA20POLY1305_BLAKE3: &str =
|
||||
"AQAAAA:AwAAAAEAAAAMoNIW9gIGkzegUDEsU3N1Rf_Zz0OMuylUSiQjUzLXqzY0MmAAAAAANsk0iwEAAAAA";
|
||||
pub const IKMLS: &[(&str, &str)] =
|
||||
&[("XChaCha20Poly1305WithBlake3", IKML_XCHACHA20POLY1305_BLAKE3)];
|
||||
pub const PLAIN_INPUTS: &[(&str, &str)] = &[
|
||||
("01 - 12 B", include_str!("data/plain_01_xs.txt")),
|
||||
("02 - 60 B", include_str!("data/plain_02_s.txt")),
|
||||
("03 - 500 B", include_str!("data/plain_03_m.txt")),
|
||||
("04 - 3 KB", include_str!("data/plain_04_l.txt")),
|
||||
("05 - 1 MB", include_str!("data/plain_05_xl.txt")),
|
||||
];
|
||||
pub const XCHACHA20POLY1305_BLAKE3_INPUTS: &[(&str, &str)] = &[
|
||||
(
|
||||
"01 - 12 B",
|
||||
include_str!("data/xchacha20poly1305-blake3_01_xs.txt"),
|
||||
),
|
||||
(
|
||||
"02 - 60 B",
|
||||
include_str!("data/xchacha20poly1305-blake3_02_s.txt"),
|
||||
),
|
||||
(
|
||||
"03 - 500 B",
|
||||
include_str!("data/xchacha20poly1305-blake3_03_m.txt"),
|
||||
),
|
||||
(
|
||||
"04 - 3 KB",
|
||||
include_str!("data/xchacha20poly1305-blake3_04_l.txt"),
|
||||
),
|
||||
(
|
||||
"05 - 1 MB",
|
||||
include_str!("data/xchacha20poly1305-blake3_05_xl.txt"),
|
||||
),
|
||||
];
|
||||
|
||||
pub struct Data<'a> {
|
||||
pub ikml: &'a str,
|
||||
pub input: &'a str,
|
||||
}
|
1
benches/data/plain_01_xs.txt
Normal file
1
benches/data/plain_01_xs.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Lorem ipsum
|
1
benches/data/plain_02_s.txt
Normal file
1
benches/data/plain_02_s.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Lorem ipsum dolor sit amet, consectetur adipiscing: elit...
|
1
benches/data/plain_03_m.txt
Normal file
1
benches/data/plain_03_m.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum sit ultrices ultricies libero, sit amet porta egestas.
|
11
benches/data/plain_04_l.txt
Normal file
11
benches/data/plain_04_l.txt
Normal file
|
@ -0,0 +1,11 @@
|
|||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
||||
|
||||
Integer ligula sem, laoreet non velit id, aliquet iaculis nunc. Proin vel mollis lectus. Fusce non arcu eget mi vehicula pretium. Lorem ipsum dolor sit amet, consectetur adipiscing elit. In blandit porta ante et varius. Etiam commodo quis lectus ut efficitur. Mauris dictum pellentesque convallis. Quisque nunc justo, tristique sollicitudin eros id, porttitor scelerisque dui. Duis non rutrum ex. Nunc sed est est.
|
||||
|
||||
Donec in risus diam. Praesent sed faucibus dui, vitae dignissim dolor. Fusce vitae dapibus neque. Suspendisse imperdiet tellus nec velit ornare vehicula non quis enim. Cras consequat dapibus justo, nec eleifend nulla hendrerit ut. Morbi ut risus magna. Donec sit amet volutpat magna. In sed felis mi quam.
|
||||
|
||||
Quisque congue eros at sollicitudin sollicitudin. Integer blandit augue id imperdiet viverra. Donec posuere enim ac odio sodales ullamcorper. Pellentesque lacus mauris, suscipit ut libero ut, congue consequat nunc. Cras consequat lacus vitae fringilla imperdiet. Sed aliquam massa quis lacus ultricies, quis molestie lacus condimentum. Sed egestas egestas sapien, eget luctus nisi ornare sed. Vestibulum ante massa, luctus in ex vitae, hendrerit dictum leo. Aliquam erat volutpat. Fusce pretium maximus lorem eget vehicula. Curabitur aliquam vulputate lorem sed laoreet. Nam fringilla, quam eu dictum bibendum, sem nisi ornare purus, sed tristique nibh sapien sit amet tortor.
|
||||
|
||||
Etiam convallis velit arcu, et malesuada magna tempor a. Mauris a pulvinar arcu. In pharetra lorem nec mi blandit feugiat. Suspendisse vitae mollis turpis, in elementum tortor. Nunc eleifend sapien ipsum, sed sollicitudin purus tempor ac. Phasellus faucibus, tortor eget vehicula consequat, lorem sapien sodales neque, vel efficitur odio massa sit amet nisi. Morbi in purus a quam porta consectetur eget tristique justo. Aliquam ac mi ac nisl imperdiet ultricies. Quisque porttitor metus ac tellus interdum, ac interdum est volutpat. Ut sit amet tortor vel mi convallis vulputate. Fusce dignissim fermentum mauris eget consectetur.
|
||||
|
||||
Praesent congue leo quis risus laoreet, in molestie tellus tempus. Maecenas placerat libero a fermentum faucibus. Fusce iaculis turpis ipsum, ac aliquet nisi finibus at. Aenean eu rhoncus erat. Vivamus dapibus purus id orci feugiat, a finibus lectus scelerisque. Cras ipsum ante, interdum in congue nec, pellentesque malesuada mi. Aenean ut blandit nisi, et gravida erat. Morbi dolor erat, sagittis sit amet lacus vel, consectetur consectetur diam. Praesent ligula metus, lacinia eget tincidunt vitae, rutrum nec nibh.
|
1
benches/data/plain_05_xl.txt
Normal file
1
benches/data/plain_05_xl.txt
Normal file
File diff suppressed because one or more lines are too long
1
benches/data/xchacha20poly1305-blake3_01_xs.txt
Normal file
1
benches/data/xchacha20poly1305-blake3_01_xs.txt
Normal file
|
@ -0,0 +1 @@
|
|||
AwAAAA:Q9TJeX_KGBucWMli8d404kSV-TJFgicF:nR740UIAmppof4WN1bpydFQQv_LKt-cM8PEFjQ:NgAAAAAAAAA
|
1
benches/data/xchacha20poly1305-blake3_02_s.txt
Normal file
1
benches/data/xchacha20poly1305-blake3_02_s.txt
Normal file
|
@ -0,0 +1 @@
|
|||
AwAAAA:9m3uAZhTprOS5PdNQaBhfIUlC1G9kLum:hlcq7_3NIE9Ko9fGB0v3I0uSFl0asAb6AgCV8guUMv-Oh7n_62c704mvw8lbHkjI3_vcavAudq2wTGSUzZ9D0mdKsul0vqDYgPMjYA:NgAAAAAAAAA
|
1
benches/data/xchacha20poly1305-blake3_03_m.txt
Normal file
1
benches/data/xchacha20poly1305-blake3_03_m.txt
Normal file
|
@ -0,0 +1 @@
|
|||
AwAAAA:HwA75VWzRDdlxuwdkYWG1LTp4hIrY5bl:DsREVoEjFXFT34tF82fiODGefo_haCAGxtrDQiaa5M-2YaMVC6ghQNkvah_qXVrN2b34t8dLBfZjl-q4rtaKl_TfePrDrwm0aBa3dNZEVBhWy1LoiWoFtTJMGxUgHUOEGeHp2GGwY-AyU72EfDDec7F4KcrlWqC420fOfq3tRVRyfu97J-_XeA317n4DfdeUobzmqMPB7148PjEv4R0jnUIXRi0kPHyMICrlBWM1nWUgZyV_jr1y_BTFdnG6jJhXFDD7g1f6vI4huD6qx6aa-trHJpwbf_HBhDploMUKBJmZW4IZQGdjrupeuHny-CVOns20X8LAyaZJQseqnE5Xnq5hbdvfzZ7LChc2ZcmmavX1XKxZQk84cHz3sjDG4YAHW1W2zau2c_naNuoS6b9s72VEafyATLq2gKmtWRBqhHPu99-oUdiC6H_rTXnqh_DQY98Y6lu6OD0Q1-_8w9MrOu2gQlLw09EZoNBuoXRuqV4T7N1o1o2_tBsvIYqJW9-YmX05UBl20v4PdP8EFP4llk29KYcvuUiugbf9uYCA1uiXGl2rnwabu-WC5GLr8Ds63KsxpBlVG0BaloN8BMu5CJi-mIZuqDjwLWkw_G0LlvMpwfCoyvExMywfaNyTWEQlOznObPYSSW5gH2a76mFe_BfWztFl37BWE5AOfWhl12EDyhCT:NgAAAAAAAAA
|
1
benches/data/xchacha20poly1305-blake3_04_l.txt
Normal file
1
benches/data/xchacha20poly1305-blake3_04_l.txt
Normal file
|
@ -0,0 +1 @@
|
|||
AwAAAA:GAtNXahbJsma1y8aRtqxhNl9Gwbg1OPn:i-98-DmoLr7BdpYpLwVQGUZ8zCu5GClckmeXGEb3jcFuKDtuX6sxBnV1Q_XR6BH3kdFOYofqSn0eN-_yN7jS7y3avgNlV8ePqKWH4FwNhZXseA4ebp9PZ1_eR541-jOLx2UX7xaG27w6w9zhl4wgypNVpoPALo4bYT9gYbTZ2yOR6SlgisGSXVm1uYjMQ7XtNRaj9PB1jFdx9OR1sOqM5f0iHozY8pD_u3VMWn1FZ4dmO5mpkYfkLLPjI52X6OC9entu2ork8_xMQpNHWgICUBIPKn2Tm1PAI2JFgnrSSVPo7Isne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_AwI6FVvtr6jNvsBJ6P1kWaP3b5gdOOlDqMeyhJaa0R8QJmtR57ti16F-QeSt-nPlCKVyluNxvNjLvYAH-BrNSLr-SVl4lUu82G9mCBhX3UnUgfSAk85z-egw0jjMJmJyI9aJ8wpLOtNXUkwwFc6juOWk7VRXEMnzw5eQaZlfkepNt5gARhbJNGkw5ZW9gCpsLlhbY6tJjKob9DvswkhpSt1qWiX1a7IMvN13-Q5MD5hVk0Zsx2Bciq6Kfp-AXd5_JA5_DSITkLps_li2HPZHz4caYQAhjdHXKLmjxp7xDPIeyt6wF_sFmCdvSLuVF33zP4Rp5YOigt1mnQ0dvq8vDFtlqNAmMlw43_LYS0qKCdGhEF7ylZ1pES8lbpS5f0Efhvhav9E3Fy7NWyayISPlnpKryp9jPKGjhbDCmbroTYn2zs2bNAXCpqNEUk6ruF0cvVBDLKjenE_5iig2xLI_gU7TLePG6mfmSQ0uA:NgAAAAAAAAA
|
1
benches/data/xchacha20poly1305-blake3_05_xl.txt
Normal file
1
benches/data/xchacha20poly1305-blake3_05_xl.txt
Normal file
File diff suppressed because one or more lines are too long
38
benches/decryption.rs
Normal file
38
benches/decryption.rs
Normal file
|
@ -0,0 +1,38 @@
|
|||
mod data;
|
||||
|
||||
use coffio::{CipherBox, DataContext, InputKeyMaterialList, KeyContext};
|
||||
use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion};
|
||||
use data::{
|
||||
Data, DATA_CTX, IKML_XCHACHA20POLY1305_BLAKE3, KEY_CTX, MEASUREMENT_TIME,
|
||||
XCHACHA20POLY1305_BLAKE3_INPUTS,
|
||||
};
|
||||
use std::time::Duration;
|
||||
|
||||
fn decrypt_coffio(ikml: &str, input: &str) {
|
||||
let ikm = InputKeyMaterialList::import(ikml).unwrap();
|
||||
let key_ctx = KeyContext::from(KEY_CTX);
|
||||
let data_ctx = DataContext::from(DATA_CTX);
|
||||
let cb = CipherBox::new(&ikm);
|
||||
if let Err(e) = cb.decrypt(&key_ctx, input, &data_ctx) {
|
||||
assert!(false, "{e}");
|
||||
}
|
||||
}
|
||||
|
||||
pub fn decryption_benchmark(c: &mut Criterion) {
|
||||
let mut group = c.benchmark_group("Decryption");
|
||||
group.measurement_time(Duration::from_secs(MEASUREMENT_TIME));
|
||||
for (input_name, input) in XCHACHA20POLY1305_BLAKE3_INPUTS.iter() {
|
||||
let data = Data {
|
||||
ikml: IKML_XCHACHA20POLY1305_BLAKE3,
|
||||
input,
|
||||
};
|
||||
group.bench_with_input(
|
||||
BenchmarkId::new("XChaCha20Poly1305WithBlake3", input_name),
|
||||
&data,
|
||||
|b, i| b.iter(|| decrypt_coffio(i.ikml, i.input)),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
criterion_group!(benches, decryption_benchmark);
|
||||
criterion_main!(benches);
|
32
benches/encryption.rs
Normal file
32
benches/encryption.rs
Normal file
|
@ -0,0 +1,32 @@
|
|||
mod data;
|
||||
|
||||
use coffio::{CipherBox, DataContext, InputKeyMaterialList, KeyContext};
|
||||
use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion};
|
||||
use data::{Data, DATA_CTX, IKMLS, KEY_CTX, MEASUREMENT_TIME, PLAIN_INPUTS};
|
||||
use std::time::Duration;
|
||||
|
||||
fn encrypt_coffio(ikml: &str, input: &str) {
|
||||
let ikm = InputKeyMaterialList::import(ikml).unwrap();
|
||||
let key_ctx = KeyContext::from(KEY_CTX);
|
||||
let data_ctx = DataContext::from(DATA_CTX);
|
||||
let cb = CipherBox::new(&ikm);
|
||||
if let Err(e) = cb.encrypt(&key_ctx, input, &data_ctx) {
|
||||
assert!(false, "{e}");
|
||||
}
|
||||
}
|
||||
|
||||
pub fn encryption_benchmark(c: &mut Criterion) {
|
||||
let mut group = c.benchmark_group("Encryption");
|
||||
group.measurement_time(Duration::from_secs(MEASUREMENT_TIME));
|
||||
for (alg_name, ikml) in IKMLS.iter() {
|
||||
for (input_name, input) in PLAIN_INPUTS.iter() {
|
||||
let data = Data { ikml, input };
|
||||
group.bench_with_input(BenchmarkId::new(*alg_name, input_name), &data, |b, i| {
|
||||
b.iter(|| encrypt_coffio(i.ikml, i.input))
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
criterion_group!(benches, encryption_benchmark);
|
||||
criterion_main!(benches);
|
Loading…
Reference in a new issue