The Most Significant TVM Update So Far – Extended Cryptography, Arbitrary-Precision Arithmetic, and New Instructions

Article image

Today, we are unveiling the biggest TON Virtual Machine (TVM) update ever. This update will make TVM one of the most versatile virtual machines around and allow users to create an even more diverse range of smart contracts, services, and products on TON.

To start with, let’s talk about the new extended cryptography.

TON uses modern and fast Ed25519 cryptography.

During TON’s development, we identified the need to incorporate additional cryptographic algorithms. For instance, certain hardware wallet and device manufacturers expressed a desire to support TON, but lacked Ed25519 compatibility on their hardware. Furthermore, the development of cross-chain solutions necessitates the utilization of crypto-primitives employed by other blockchains, such as Ethereum and Bitcoin.

Therefore, we have added to TVM the widest possible range of existing cryptography methods.

Hash functions over an unlimited number of bytes:

Cryptographic primitives on the following curves:

  • secp256k1 - bitcoin/ethereum signatures
  • secp256r1 - usefull for hardware wallets
  • Ristretto - fast and safe operations on elliptic curves
  • BLS12-381 - curve operations with pairing support

But we have not stopped here; we have also introduced support for arbitrary-precision arithmetic operators.

Furthermore, we have added several new instructions to simplify the process of writing smart contracts on TON as well as some other improvements that will enhance security.

Finally, you can now safely run TVM from inside TVM!

You can find the full list of improvements here.

Today, we have updated the testnet, and in about six weeks, this functionality will be accessible on the mainnet.

We invite everyone to take part in the programming contest and showcase their best use of the new TVM features for a chance to win a share of a 30,000 TON prize pool. More details can be found here.

If you find vulnerabilities or bugs in new TVM features on the testnet, you may be eligible to receive a bug bounty reward.