1.2 Accounts
This is where the previous chapter 0.3 on Elliptic Curve Cryptography will be super useful, make sure you have it in mind.
Aleo Fundamental Objects
Let's start with defining some useful mathematical objects.
Fields
We'll start with the most fundamental object. Since the underlying constraint system of Aleo is R1CS, programs are essentially represented as sets of linear equations over a field. This makes elements of this field very special. They are simply called fields, for short, and represent elements of base field of the elliptic curve that Aleo accounts are based upon.
Every other types that are available on Aleo are derived from this one, in order for the instructions that involve those extra types to be reduced to linear equations over the base field.
Fields are the elements of with:
Group
For reference here are the elliptic curves used in Aleo:
Edwards BLS12
BLS12-377
Curve Type
Twisted Edwards
Barreto-Lynn-Scott
Scalar Field Size
251 bits
253 bits
Base Field Size
253 bits
377 bits
G1 Compressed Size*
32 bytes
48 bytes
G2 Compressed Size*
N/A
96 bytes
Group elements represent points from a specific sub-group of the group of points on the Edwards BLS12 elliptic curve. This sub-group is generated by a generator point noted G1.
Scalar
The sub-group described above has order:
This means that when adding the generator with itself successively: , by definition, we end up reaching every element of the group, until reaching . This set of integer by which we can multiply is hence simply the field , called the set of scalar.
Accounts
Traditional Accounts
On traditional blockchains accounts can be simply made the following way, once an appropriate elliptic curve has been chosen, with fast scalar multiplication and hard ECDLP:
User generates a uniformly random 256 bits number .
It can be encoded in a human friendly way, by representing it a sequence of 24 words taken from a list of 2048 possible words. Since we can store 264 bits of information using that sentence of words (called seed phrase).
User then carefully saves that sequence. Any number of accounts can be generated with it:
Generate private key
Generate address
Aleo Accounts
On Aleo things are done a bit differently in order to include privacy features. Instead of having just a private key and an address, accounts also have two extra keys called the View Key and Compute Key.
Private Key: The private key's, as with traditional chains, is used to authenticate transactions.
Address: The address serves as an identifier for users accounts. If you want to a user to send you some assets, you simply give him you address. Although, with just your address, this user will not be able to see all your past private transactions and the private state that involves your account.
View Key: The view key is used to decrypt all the private state on chain owned by your account. With it you can discover all your private holdings and state.
Compute Key: The compute key is used for proving a zkVM execution. It can be provided when delegating a transaction proof for instance.
Account Generation
User generates a uniformly random field element (the seed that can be encoded as words as above).
Private Key:
User computes a signature secret key (scalar):
and a signature randomizer (scalar):
Where and are constants.
Compute Key:
User computes signature public key (group):
and a signature public randomizer (group):
and a pseudo random secret key (scalar):
View Key (scalar):
Address (group):


Last updated