Hoskinson Wants to Rewrite Cardano’s Cryptography

The Cardano founder demonstrated an experimental digital signature implementation and reported a result of 519,000 signatures per second. He plans to expand Silverfire for Cardano and Midnight and have the library externally audited before version 1.0.

By SongMarketCap

Updated:

Cardano News - Hoskinson Wants to Rewrite Cardano’s Cryptography

Charles Hoskinson has outlined plans to use Silverfire, a cryptographic library he is developing, to reimplement cryptographic components for Cardano and Midnight. In a new video, he demonstrated an experimental digital signature implementation that runs in a browser and explained how he is combining performance testing with formal methods.

Hoskinson described Silverfire as a library for building cryptographic tools on top of the MoonBit programming language. He intends to continue developing it with cryptography experts and eventually seek external audits.

A Digital Signature Tool for Browsers

The implementation Hoskinson demonstrated uses ECDSA, a digital signature algorithm that helps establish whether a message or transaction was authorized by the holder of a private key.

For a Bitcoin wallet, a digital signature allows a transaction to be authorized without revealing the private key itself. Hoskinson focused on an ECDSA implementation using the secp256k1 elliptic curve and addressed developers building Bitcoin wallets that operate in browsers.

He demonstrated a signing tool using WebAssembly, a technology that allows software to run inside a browser. According to Hoskinson, the implementation uses a dedicated area of memory and overwrites sensitive data as part of its handling of signing operations.

He explained that the approach includes measures intended to prevent keys from being improperly reused or exposed during signing. He compared the intended standard of protection to the care used in trusted execution environments.

Hoskinson reported testing the implementation across several browsers and devices, including an iPhone, a Samsung Galaxy phone, and computers using Windows and macOS.

Hoskinson Reports 519,000 Signatures per Second

Hoskinson highlighted Silverfire’s ability to use multiple processor cores and pointed to a result of approximately 519,000 signatures per second.

He claimed that his implementation had outperformed libsecp256k1, a cryptographic library used by Bitcoin Core. To the best of his knowledge, he described it as the fastest implementation available.

Hoskinson also identified constant time operation as a feature of the implementation. This approach is designed to limit information that could be exposed through differences in how long sensitive operations take.

He raised the possibility of using a graphics processor to increase performance further. He presented that as a potential next step, rather than a completed implementation.

Formal Methods and the Role of Jasmin

A central part of Hoskinson’s approach is the use of formal methods, which apply mathematical techniques to describe and check properties of software.

He explained that developers typically write cryptographic algorithms in a programming language that is then translated into instructions a machine can execute. A question arises over whether the resulting low level implementation retains the security properties developers intended.

To address that challenge, Hoskinson incorporated Jasmin into the Silverfire development process. He described Jasmin as a language designed to support verification of low level cryptographic code while preserving speed.

Hoskinson claimed that the implementation connects correctness proofs from its higher level design down to assembly code. He also reported combining 11 verification and testing frameworks, including Lean, Quint, model checking and fuzzing.

Fuzzing tests software with many different inputs to uncover unexpected behavior. Model checking examines whether a system satisfies specified rules across the states covered by the model.

Hoskinson also discussed using AI during optimization. Each attempt to make code faster can introduce a mistake, he explained. His approach is to run checks as the implementation changes, helping developers assess whether an optimization has preserved the properties the software is intended to have.

[NEWSBREAK]

From Browsers to Multiple Programming Languages

Hoskinson described Silverfire as a portable development framework that can run in a browser, on a phone or as a native program. He also identified JavaScript as a compilation target.

The project includes interfaces for Rust, C, C++, Haskell and TypeScript, allowing developers to work with the implementation from different programming environments. Hoskinson invited developers to download the ECDSA implementation, inspect the code and report any bugs.

He also described using checking tools on those interfaces. One of them is CBMC, a model checker for C programs, which he identified as part of the process for examining how components connect.

The Plan for Cardano and Midnight

Hoskinson wants to continue investing in Silverfire until he is comfortable with the development tools and the code they produce. He then plans to use the library to reimplement cryptographic components for Cardano and Midnight, with the possibility of extending it to other blockchains.

He also described an experimental implementation of the Cardano Conway ledger that he built using Silverfire to test some of its mechanics and rules.

Beyond blockchain cryptography, Hoskinson suggested that the same combination of mathematical models, verification tools and testing could be adapted to other kinds of software. He presented that idea as an open area for discussion.

External Audits Planned Before Version 1.0

Hoskinson emphasized that the implementation is a prototype and should not yet be trusted in production applications.

His next step is to work with Input Output specialists who have experience in cryptanalysis and implementing cryptographic algorithms. He also plans to expand the library and strengthen the evidence supporting its behavior.

Hoskinson’s goal is for Silverfire version 1.0 to be an externally audited library. The project is available in his Selûne repository for developers to inspect, test and adapt.

Watch on YouTube