eprintid: 10198603
rev_number: 8
eprint_status: archive
userid: 699
dir: disk0/10/19/86/03
datestamp: 2024-10-18 08:41:46
lastmod: 2024-10-18 09:01:54
status_changed: 2024-10-18 08:41:46
type: proceedings_section
metadata_visibility: show
sword_depositor: 699
creators_name: Chalkias, Kostas Kryptos
creators_name: Lindstrøm, Jonas
creators_name: Maram, Deepak
creators_name: Riva, Ben
creators_name: Roy, Arnab
creators_name: Sonnino, Alberto
creators_name: Wang, Joy
title: Fastcrypto: Pioneering Cryptography Via Continuous Benchmarking
ispublished: pub
divisions: UCL
divisions: B04
divisions: F48
keywords: Blockchain; continuous benchmarking; 
cryptanalysis; crypto audits; 
cryptography; rust language; 
supply chain attacks
note: This version is the author accepted manuscript. For information on re-use, please refer to the publisher’s terms and conditions.
abstract: In the rapidly evolving fields of encryption and blockchain technologies, the efficiency and security of cryptographic schemes significantly impact performance. This paper introduces a comprehensive framework for continuous benchmarking in one of the most popular cryptography Rust libraries, \textttfastcrypto. What makes our analysis unique is the realization that automated benchmarking is not just a performance monitor and optimization tool, but it can be used for cryptanalysis and innovation discovery as well. Surprisingly, benchmarks can uncover spectacular security flaws and inconsistencies in various cryptographic implementations and standards, while at the same time they can identify unique opportunities for innovation not previously known to science, such as providing a) hints for novel algorithms, b) indications for mix-and-match library functions that result in world record speeds, and c) evidences of biased or untested real world algorithm comparisons in the literature.
Our approach transcends traditional benchmarking methods by identifying inconsistencies in multi-threaded code, which previously resulted in unfair comparisons. We demonstrate the effectiveness of our methodology in identifying the fastest algorithms for specific cryptographic operations like signing, while revealing hidden performance characteristics and security flaws. The process of continuous benchmarking allowed \textttfastcrypto to break many crypto-operations speed records in the Rust language ecosystem. A notable discovery in our research is the identification of vulnerabilities and unfair speed claims due to missing padding checks in high-performance Base64 encoding libraries. We also uncover insights into algorithmic implementations such as multi-scalar elliptic curve multiplications, which exhibit different performance gains when applied in different schemes and libraries. This was not evident in conventional benchmarking practices. Further, our analysis highlights bottlenecks in cryptographic algorithms where pre-computed tables can be strategically applied, accounting for L1 and L2 CPU cache limitations.
Our benchmarking framework also reveals that certain algorithmic implementations incur additional overheads due to serialization processes, necessitating a refined 'apples to apples' comparison approach. We identified unique performance patterns in some schemes, where efficiency scales with input size, aiding blockchain technologies in optimal parameter selection and data compression.
Crucially, continuous benchmarking serves as a tool for ongoing audit and security assurance. Variations in performance can signal potential security issues during upgrades, such as cleptography, hardware manipulation or supply chain attacks. This was evidenced by critical private key leakage vulnerabilities we found in one of the most popular EdDSA Rust libraries. By providing a dynamic and thorough benchmarking approach, our framework empowers stakeholders to make informed decisions, enhance security measures, and optimize cryptographic operations in an ever-changing digital landscape.
date: 2024-05
date_type: published
publisher: ACM (Association for Computing Machinery)
official_url: http://dx.doi.org/10.1145/3629527.3652266
oa_status: green
full_text_type: other
language: eng
primo: open
primo_central: open_green
verified: verified_manual
elements_id: 2284458
doi: 10.1145/3629527.3652266
isbn_13: 9798400704451
lyricists_name: Sonnino, Alberto
lyricists_id: AMNSO92
actors_name: Sonnino, Alberto
actors_id: AMNSO92
actors_role: owner
full_text_status: public
pres_type: paper
publication: COMPANION OF THE 15TH ACM/SPEC INTERNATIONAL CONFERENCE ON PERFORMANCE ENGINEERING, ICPE COMPANION 2024
place_of_pub: New York, NY, United States
pagerange: 227-234
pages: 8
event_title: ICPE '24: 15th ACM/SPEC International Conference on Performance Engineering
event_location: ENGLAND, Imperial Coll London, London
event_dates: 7 May 2024 - 11 May 2024
book_title: ICPE '24 Companion: Companion of the 15th ACM/SPEC International Conference on Performance Engineering
citation:        Chalkias, Kostas Kryptos;    Lindstrøm, Jonas;    Maram, Deepak;    Riva, Ben;    Roy, Arnab;    Sonnino, Alberto;    Wang, Joy;      (2024)    Fastcrypto: Pioneering Cryptography Via Continuous Benchmarking.                     In:  ICPE '24 Companion: Companion of the 15th ACM/SPEC International Conference on Performance Engineering.  (pp. pp. 227-234).  ACM (Association for Computing Machinery): New York, NY, United States.       Green open access   
 
document_url: https://discovery.ucl.ac.uk/id/eprint/10198603/1/fasctrypto-benchmarks.pdf