Historically, Elliptic Curve Cryptography (ECC) is an active field of applied cryptography where recent focus is on high speed, constant time, and formally verified implementations. While there are a handful of outliers where all these concepts join and land in real-world deployments, these are generally on a case-by-case basis: e.g. a library may feature such X25519 or P-256 code, but not for all curves. In this work, we propose and implement a methodology that fully automates the implementation, testing, and integration of ECC stacks with the above properties. We demonstrate the flexibility and applicability of our methodology by seamlessly integrating into three real-world projects: OpenSSL, Mozilla's NSS, and the GOST OpenSSL Engine, achieving roughly 9.5x, 4.5x, 13.3x, and 3.7x speedup on any given curve for key generation, key agreement, signing, and verifying, respectively. Furthermore, we showcase the efficacy of our testing methodology by uncovering flaws and vulnerabilities in OpenSSL, and a specification-level vulnerability in a Russian standard. Our work bridges the gap between significant applied cryptography research results and deployed software, fully automating the process.
翻译:历史上, Elliptic Curve 密码学(ECC) 是应用密码学的一个活跃领域,最近的重点是高速、恒定时间和正式核查的实施。虽然有少数外部用户将所有这些概念结合并降落在现实世界的部署中,但通常都是在个案基础上进行:例如,图书馆可能具有X25519或P-256的代码,但并非所有曲线都使用这种代码。在这项工作中,我们提议并实施一种方法,使ECC堆的安装、测试和整合与上述属性完全自动化。我们通过无缝地融入三个现实世界项目,显示了我们的方法的灵活性和适用性:OpenSSL、Mozilla的NSS和GOST OpenSSL 引擎,在关键一代的任何给定曲线上达到大约9.5x、4.5x、13.3x和3.7x的加速度。此外,我们通过发现OpenSSL的缺陷和脆弱性以及俄罗斯标准中的规格脆弱性,展示了我们的测试方法的功效。我们的工作缩小了在应用的软件中的巨大差距。