Follow-up: Ed25519-Blake2b variant for threshold Schnorr (Nano still unsupported)

Hi all, and @andrea @eichhorl,

In January 2024 I asked about chain-key Ed25519 support for integrating Nano (XNO) (original thread), and the team kindly confirmed it was on the roadmap. Thanks for delivering threshold Ed25519; it has opened up Solana and several other chains.

Unfortunately, it turns out Nano can’t use it. Nano signs with an Ed25519 variant that uses Blake2b-512 in place of SHA-512, so signatures from the current ed25519 algorithm are rejected by Nano nodes. I’d like to propose a small extension to close that gap.

The problem
Nano and its forks, such as Banano, use the same curve and key format as standard Ed25519. The only difference is the hash function. Canisters can already derive valid Nano public keys, but they can’t produce signatures Nano nodes will accept. That’s the sole blocker to trustless Nano custody on ICP.

The proposed change
Add an algorithm variant, for example:

type schnorr_algorithm = variant { bip340secp256k1; ed25519; ed25519blake2b };

As I understand the protocol:

  • Key generation and derivation are unchanged. Nano verification only needs the public key point A, so existing Ed25519 key derivation works as-is.
  • Nonces are unaffected. They come from the IDKG protocol, not from hashing the secret key, so the signing path is untouched.
  • Only the challenge hash changes: k = H(R ‖ A ‖ M), computed with Blake2b-512 instead of SHA-512.
  • Key management. Whether this should reuse the existing Ed25519 master key or use a separate key ID for domain separation is a call for the crypto team.

What it enables

  • A ckNANO minter following the ckBTC and ckETH model: trustless deposits and withdrawals, and an ICRC token usable across ICP DeFi.
  • Feeless, near-instant Nano payments in canister apps, well suited to micropayments.
  • Support for the wider Nano-derived ecosystem (Banano and others) at no extra cost.

Why now
Nano’s fast finality and lack of fees make it an unusually good fit for chain-key integration. Its state is also simple to verify in a canister: blocks and representative votes are self-authenticating, so HTTPS outcalls only need to fetch data, not be trusted. With the recent threshold signing throughput improvements, capacity is no longer a concern either. The missing piece is purely the hash variant.

I’d be glad to help with testing, test vectors, or a reference ckNANO minter design. Would the crypto team consider this, and would an NNS motion proposal help gauge community support?

Thanks!

Plain Ed25519 as mentioned in the forum thread you linked has been supported for quite a while now, and is used productively in the Solana integration. As you point out, plain Ed25519 does not suffice to support Nano. We are developing several features for cross-chain integrations at the moment, all of which are targeting chains with larger user bases, so we don’t have the capacity to take this up in the near future.

Thanks @bjoern, understood, and I appreciate the clear answer. If priorities shift, or if the team would ever be open to reviewing a community-contributed implementation of the variant, I’d be glad to help with code, test vectors or a reference minter. In the meantime we’ll continue experimenting with chain-key custody for our base currency. Thanks again to the crypto team for threshold Ed25519; it’s been a big unlock for ICP.

The only aspect that would need a protocol extension would be, as you write above, the change in the challenge hash computation. Re-using the same keys should be safe under the assumption that SHA-512 and Blake2b-512 behave as independent random oracles; this does not seem much stronger than assuming they behave like random oracles individually. So this would seem plausible, at least based on my high-level analysis. And the additional maintenance burden here is also manageable.

What seems more difficult is everything beyond: There needs to be a way to interact with the target chains; like the direct integration that ICP has for Bitcoin, or RPC-style integration like those for Ethereum and Solana. Those integrations are a significant effort to maintain. The effort for the minter/ledger infrastructure on top depends mostly on how different the chain is from ones with existing integrations, on the underlying infrastructure, and on how much the other chain evolves.

In summary, I am not so worried about the changes to the core cryptographic protocols. While some deeper analysis needs to be done before actually implementing this, it looks fairly safe and maintainable. However, for this to make sense, there would need to be someone who can shoulder the implementation and maintenance (this likely involves the need for 24/7 alerting) of the network integration and the upper layers.

@bjoern Our plan is to take on the parts you described:

  1. Network integration first, on a variant that needs no protocol change. We’re building RPC-style integration for a Nano-protocol network that uses standard Ed25519, so it works with ICP’s existing threshold keys today: HTTPS outcalls to multiple independent nodes, with blocks and representative votes verified inside the canister.
  2. Minter and ICRC ledger on top, open source, with public monitoring and 24/7 alerting that we operate.
  3. Then the Blake2b variant. Once that stack has a production track record, the same integration extends to Nano and Banano with minimal changes, and we’d maintain those too.

So the ask would only come once the integration and operations side is already running. If there’s anything specific you’d want to see by then (time in production, an audit, an alerting standard), we’ll be eager to hear it. Thanks