One of the questions we receive a lot in regard to our Secret NFTs is how they will be kept secret in the advent of quantum computing. At Ternoa, we’re focused on using the best available tools to make true secret NFTs possible. To ensure we’re prepared for any cryptographic challenges, we’ve brought Amin on board, who has over a decade of experience working in the field.
Read on to learn more about our in-house cryptographer, the rationale behind choosing TEEs as environments, and how we’re preparing for any threats posed by Quantum Computing.
Can you share some of your background and experience working in the field of cryptography?
I studied electronics engineering and have a master’s in Computer Science and mathematics. After 3 years of working in DSP, in 2009, I entered the cryptography and hardware security field, which includes everything from theoretical research to designing and implementing secure firmware, FPGA, and ASIC design, running on low power and with limited resources. Hardware still has its own vulnerabilities, which have been at the center of my career. In 2016 I decided to enter the blockchain industry. I developed many platforms & architectures, educational tokens, solar and renewable energy systems, food supply-chain and fruits cold-chains, worked on DeFi, on Bitcoin, and now creating confidential NFTs with Ternoa.
What is Intel SXG, and how does it work?
HSM (hardware security module) and TPM (trusted platform module) have been used mostly in banking and the military to store secure data. Top secret information needs to be stored in hardware modules because they are harder to access and only can be accessed by certified people.
SXG is an additional module in some Intel server CPUs, similar to embedded systems for security. In the beginning, it was created for every CPU in PC and laptop, but then security holes were discovered in the design, so Intel decided to focus on servers and cloud providers.
In the SXG system, we can create secure black boxes, a.k.a enclaves which are protected areas for computing and storage. No one can access and read inside an enclave; only the person who created the code knows what’s going on in there. The developer, of course, creates secure channels for enclave applications to talk to the outside.
Intel provides an SDK for developers to use SGX capabilities. One of the most important features of Intel SGX is remote attestation, where you can ask Intel to approve the validity of a specific enclave before trusting it. The other capability of the SGX module is sealing the data on disk with a secret key that is known only to the CPU itself and no other person or entity in the universe. So only that CPU with the same enclave can decrypt the sealed data.
What problems can be solved with Intel SGX and using Enclave?
Cryptography has always been trying to solve this problem: how can you store your precious secure data on your enemy’s computer or outsource and delegate (storage or processing) your top secret data in a public place?
In general, there are four answers to that, FHE, SMPC, ZKP, and hardware security. The first 2 are very complex, and yet really not feasible. ZKP had some progress in limited applications. Only secure hardware has constantly been used for outsourcing and processing with an untrusted party and has a longstanding track record.
Why is Ternoa using Trusted Execution Environments?
There is no other solution “today” to solve what we’re trying to do with the secret NFTs. There are many claims with ZKP or Secure Multi-party computation, but both are very limited, slow, and not provable in some cases.
TEE by Intel is a proven solution maintained by Intel. Scalability is a challenge because it’s tied to a server geographically. Apart from that, there is no other solution to store data associated with an NFT in an untrusted area.
Other clouds like Azure are also using the same technology to create secure databases. The only solution where only the owner can access is SGX machines. With Intel SGX, there are many guarantees and proofs that the solution will be maintained. Many companies are using TEEs, big and small.
Which risks are associated with using TEEs?
The limitation any hardware solution has is being tied to one machine. Security and encryption require a key to decrypt. Hardware solutions have keys stored in them, meaning only that key can decrypt. If hardware is turned off or destroyed, there is no way to decrypt the data. Being confined to a specific machine is definitely the biggest challenge for hardware-based security.
Beyond that, every design has vulnerabilities. Intel’s design has been attacked many times and has been consistently patched with newer versions. It is a natural process in cryptography. Every algorithm can be broken. AES is used everywhere and trusted because so far, no one has hacked it, but who knows if it remains that way.
We don’t claim that we’re unbreakable, and neither can anyone else. To use SXG, we will have to use SDKs — that software might have problems itself. We use something called Gramin, which is based on an SDK; this software might have issues too. We assess code every day and are very careful, sticking to best security practices.
What is Shamir Secret Sharing used for on Ternoa?
I prefer to refer to it as a threshold scheme instead of using Shamir secret sharing, as it’s a better way to express what we do in terms of cryptography. We know that hardware and its owners are not perfect. Adding secret sharing adds another level of security. When the secret NFT owner wants to put their encryption key on an enclave, we let them split it into pieces.
It’s based on a level of confidence, 5 parts are sufficient for most, put on 5 different SGX machines around the world. Even if 1 or 2 are compromised, the attackers can’t recover the whole key because the threshold is 3, 4, or 5 to decrypt. The number can be increased further for heightened security requirements.
How realistic is it that Quantum Computing advances so far it cracks blockchains’ in the next 10 years?
I hope so. I like fast progress in science and quantum computing. In 10 years, the optimistic people will say yes, it might crack blockchain. But there are difficulties. To break the RSA, ECC, or any signature in the blockchain, we need to have one thousand qubits. But to have 13,000,000 physical qubits, the problem will be controlling them, and many say it’ll be impossible for us to control them. Therefore it’s not a concern for the near future.
Anyway, if Quantum computing can break public key infrastructure, the banking system will be broken first. That’s not a problem specific to Ternoa, not even to the blockchain itself. It’s a general concern, but it’s also worth highlighting that not all cryptographic code will be affected.
On Ternoa, we rely more on symmetric algorithms, which are immune to quantum computing. The people’s code won’t be discovered even with quantum computers because it’ll be safely sealed in the enclave.
Already from my first day, I’ve started working on a branch for quantum computing on the dev branch, including NTRU, which is a proposal for quantum secure schemes for signatures.
Eventually, everyone will use them if it comes to that. That means at Ternoa; we can switch to a quantum secure signature scheme very fast if needed. Cryptography has many tools for signatures, and even with quantum computing, we’ll have ways to maintain secrecy. I, for one, feel we might need to be more worried about the power AI is gaining.
For any further questions, don’t hesitate to reach out to us on our community channels.