Ethereum

Stateful Turing complete policy | Ethereum Foundation Blog

One of the Internet’s major security challenges over the past 20 years has been the rather simple problem of user account security. Today, users have accounts with hundreds of websites and dozens of passwords, which can lead to large in size number ~ Of hacking Individual websites run by people who are not particularly skilled in the finer points of encryption and Internet security are increasingly being exploited by clever hackers, and users are often making it simple or make them all the same – often very unfortunate result. Over time, a patchwork of temporary solutions has certainly developed, including using email accounts as a general-purpose backup and “password manager” software like Lastpass. But it costs a lot. They can provide password-based access or give centralized companies a very high level of control over your online life.

I get a lot of calls asking questions. get Remove ~ Of password, but the question is what to replace it with. There are a lot of ideas out there, from “one single password to rule them all” to smartphone authentication, special hardware devices and biometrics, and all kinds of multi-factor M-of-N policies, but by far these more complex configurations are also commonly used. It is done. By Application: Many banks now provide special access devices that allow you to log into your bank account, but you can’t even use them to access your email if you trust their security. In general, the problem of how to best manage user access control and minimize the risk of key loss and theft is too complex to be solved “completely,” so the best way to solve it is to allow it. Allowing a free market of solutions to thrive and allowing each user to choose the solution that is best for them. But here’s how to actually make it happen: Unbundle The “Access Control Solutions” market in the “Services” market. That’s exactly what most of us do ~ no I’m doing it right now.



This is a hardware access device to my UBS bank account. Why can’t I use this feature to secure my domain on Namecheap?


Then what should I do? The first step is to properly use Turing-complete code, the ultimate abstraction. Rather than allowing the user to specify a password at the protocol level, providing a pre-selected set of providers, or providing a standard that relies on communication with a server of the user’s choosing, it allows the code to specify access policies. It runs on a deterministic virtual machine (EVM is a good place to start). Your code may include digital signature verification using: any Encryption algorithms, potentially including keys stored on the user’s computer, directly derived keys (with free future compatibility with quantum-safe cryptography) in password, a key stored on a hardware device, or an arbitrary policy containing a combination of the above. In this way, innovation can occur in access control mechanisms. without need Ensures that the website (or any other system that requires authentication) can do whatever it takes to accommodate new changes. Besides, the system is clean group You can use multi-user access control right out of the box without any integration.

The next step is Turing-complete task-dependent code. Many applications require the ability to grant some users permission to perform some tasks and not others. For example, you might want to give your system administrator the ability to change the IP address that your domain name points to, but not sell the domain outright. To accommodate this, the abstraction needs to change. A simple “Turing-complete-code as signature” setup could have the form:

VM(code, server-provided nonce ++ signature) ?= 1

where VM It is a virtual machine that executes code by receiving the nonce and signature provided by the server as input, and the verification check is to check whether the output is 1 or not. A simple example is: password What you can put in is an elliptic curve digital signature verifier. To allow different authentication requirements depending on the task, you want:

VM(code, server-provided nonce ++ operation_data ++ signature) ?= 1

Any action a user wishes to perform must be accompanied by a signature (this has the advantage of providing clear third-party verification evidence that the action was authorized). Operation data (function name and arguments Ethereum-style ABI) is added as an argument to the virtual machine and the signature must be above both the nonce and the task data.

This can get you pretty far, but in some cases it may not be enough. One simple example is: What if you want to give someone permission to withdraw small amounts of money, but not large amounts? Withdrawal limit? The problem to overcome in this case is simple. What if someone with a $100 withdrawal limit tries to circumvent this by running a script over and over that simply withdraws $90? To solve this, smarter withdrawal limits are needed. Essentially something like “up to $100 per day”. Another natural case is key revocation. If your keys are hacked or lost, you want to replace them, and you want the world to know that your policy has changed so that attackers can’t try to impersonate you under the old policy.

To get over this final hurdle, we need to go one step further. That is, it requires Turing-complete task dependence. save state Policy; That is, actions must be able to change the policy state. And this is where not only cryptography but especially blockchain comes into play. Of course, you can have a central server manage everything, and it’s okay for a lot of people to trust that central server. Blockchain is moderately valuable This is because it is more convenient, provides reliable neutrality, and is easier to standardize. Ultimately, permanently choosing “one blockchain to rule them all” can be very detrimental to innovation, so what we want to standardize is a mechanism for users to download modules to support. any You can use blockchain or centralized solutions as per your choice.

For blockchain-based applications, it makes sense to enforce stateful policies directly on the blockchain. There’s no need to involve another special layer of intermediaries, and people can get started right now. Using the abstraction of “accounts” that Ethereum provides, it is very easy to work with this approach. If your application works with a simple user holding a private key, it also works with almost any kind of private, multi-party, hardware-centric, military. Ratings or whatever other policy users might come up with in the future.

For other applications, users may want privacy both in the state change operations they perform and in the nature of the policy at any given point in time. For this reason, you’ll want a solution like this: hawkBlockchain still ensures the security of the process, but thanks to the wonders of zero-knowledge proof technology. You have no idea what is protected; Before Hawk is implemented, simple forms of encryption such as ring signatures may be sufficient.

Other applications

Account security is the first and most basic application of the code-as-policy concept, there are others as well. One of the simple ones is domain name registration. Onename, one of the popular ‘decentralized name registration’ services, is currently planning to implement a feature that will allow top-level domains to choose a fee policy for their subdomains based on the number of letters, consonants, and vowels. This is useful, but of course it is not economically sound. In addition to letters, consonants, and vowels, there are hundreds of characteristics that can affect domain name prices, and people may also want to experiment with other registration strategies, such as: Different types of auctions.

Again, a much better solution is to apply some simple modularity. That means allowing people to create their own namespaces in stateful Turing-complete code. If you’re doing this on a platform where stateful Turing-complete code exists, you can simply allow the address to control the subdomain. This will already support stateful Turing-complete subdomain policies. This is the essence of object-oriented programming. The idea is to expose an interface and allow other objects, which may have arbitrarily complex internal code, to satisfy that interface.

Another is individual stock trading. Stock trading, especially for unlisted companies, is not and cannot be completely free or unrestricted like cryptocurrency trading. Companies often want to limit:

  • Give stock to employees and allow them to sell it only after a certain period of time.
  • New shareholders must obtain approval from existing shareholders, and such approval may limit the number of shares that a particular holder may own.
  • Compulsory purchase procedure
  • Limiting the maximum rate at which shares may be sold (i.e., withdrawal limits), requiring waiting periods, or providing rights of first refusal to certain other holders;

Of course, you could create a private blockchain-based stock trading platform for one client and provide whatever restrictions that client desires. But what if different customers want different limits? At least it eliminates the problem early on at the “core application layer” and ensures that each individual stock represented by the sub-currency is Expressed limitations With stateful Turing-complete code.

This functionality can be expressed as a “token” API by extending it, for example:

  • getMinimumBalance(account): Get the minimum balance the current account can have.
  • getMaximumBalance(account): Get the maximum balance the current account can have.

That is, the application has no policy. Applications are interactive objects (User accounts, currencies, etc.) and objects have policies. Or even shorter:




Are you building a blockchain-based financial derivatives application and someone is asking you to add a feature that allows voting across multiple data feed providers instead of just one? Don’t even think about it. Instead, set up one data feed provider address and allow users to create their own policies. The advantage is that whatever code they use or write can be used to more securely provide data feeds for moderation dapps. Are you building a DNS system and someone is asking you to introduce support for a specific auction type for subdomains? Don’t do it at the root DNS level. Instead, it allows subdomains to be addresses and allows users to create their own auction algorithms. Whatever algorithm you develop, you can also use it as a registry for decentralized chat usernames.

This is the benefit of abstraction. Account security policy design can be an independent field of study in its own right, and whatever new solution is developed, it can be applied anywhere and immediately. Some people will want to trust a third party. Others will want multi-signature authentication between five different devices, and some will want their own keys, with the option for three of the five friends to get together and reset the keys to new devices. Some people will want an access policy where if they don’t make a deal within 12 months they will be considered dead and their lawyers will get access to enforce their will. every For any and all of your digital assets, you will want a policy that provides full control of one key for applications that declare low security and two of the three keys for applications that declare high security. Designing a name registration pricing policy can also be self-contained. Policies to limit digital asset ownership are likewise an area of ​​interest to everyone, from traditional corporations large and small to community-based DAOs. This is the power of stateful Turing-complete code.

Related Articles

Back to top button