Digital Signature Library with Dilithium
Abstract
As quantum computers become more powerful, they pose a real threat to the security of today’s widely used cryptographic systems, such as RSA and ECC. To address this, researchers and institutions like NIST are developing post-quantum cryptographic algorithms that can withstand these new threats. This paper focuses on building a secure document signing application using Dilithium 3, a lattice-based digital signature algorithm selected by NIST for its strong resistance to quantum attacks. Specifically, we develop a digital signature library that serves as a secure signing oracle and horizontal software for a broad range of critical industries and applications, such as private company databases, forensics, and even health science databases. Our application is built using Rust with the Actix-Web framework for backend development and PostgreSQL for data storage. It lets users register, generate secure cryptographic keys, sign documents, and verify signatures. Private keys are protected using AES-GCM encryption, and user access is secured through one-time passwords (OTP) sent via email. This system uses a detached signature approach to ensure documents remain unchanged while still allowing independent signature verification. The goal is to provide a transparent and trustworthy solution that ensures document authenticity, integrity, and non-repudiation – both now and in a future where quantum computing is mainstream. Ultimately, this paper demonstrates how practical and accessible post-quantum security can be in real-world applications.