Unlocking the power of Aleo Accounts: your gateway to secure transactions

HEORHII YABLONSKYI
4 min readAug 28, 2023

In the digital age, where security and privacy are paramount, Aleo introduces a transformative concept — Aleo Accounts.

This article delves into the essence of Aleo Accounts, their significance, advantages, and the steps to create one.

Aleo Accounts: your crypto Identity

Creating a secure Identity: At the heart of the Aleo Network lies Aleo Accounts, your digital identity. These accounts enable you to engage in a world of privacy-centric transactions, executions, and interactions. An Aleo Account is not just a token; it’s your gateway to an ecosystem of secure operations.

Advantages of Aleo Accounts

  1. Ultimate Security: Aleo Accounts ensure security at every level. The private key is the root of your account, assuring the utmost protection. Data breaches and unauthorized access are things of the past.
  2. Privacy at Its Core: With the view key, you can selectively unveil your records, ensuring your data remains private while engaging in secure transactions.
  3. Empowered Transactions: The compute key empowers you to transact and execute programs trustlessly. Your actions are your own, backed by cryptography.
  4. Global Identification: Your Aleo Address makes you part of the Aleo community. Receive official Aleo credits and engage in unique data exchanges.

Keys that empower: From a single private key, the Aleo Account derives several keys that empower you to interact with the Aleo Network:

  1. Private Key: The cornerstone of your identity, this key authorizes program execution and transactions. Protect it with the utmost care.
  2. View Key: Derived from the private key, the view key unveils your records and transaction data while keeping your identity secure.
  3. Compute Key: A trustless powerhouse, this key fuels application execution and transaction generation on your behalf.
  4. Address: This public address identifies you on the network, enabling you to receive Aleo credits and unique data from other zero-knowledge Aleo programs.
  5. All of these keys can be created using the account object:
import { Account } from '@aleohq/sdk';

const account = new Account();

// Individual keys can be then be accessed through the following methods
const privateKey = account.privateKey();
const viewKey = account.viewKey();
const address = account.address();
Creating Aleo Account using Aleo SDK

Secure Storage: Remember, these keys are sensitive information. Store them securely to ensure the sanctity of your Aleo Account.

Creating Your Aleo Account: A Step-by-Step Guide

Given global instantiated Aleo parameters and subroutines.

Generate a Private Key

  1. Sample a 32 byte seed from random
  2. Construct private key components
  • sk_sig = BLAKE2s(seed | 0)
  • sk_prf = BLAKE2s(seed | 1)
  • r_pk = BLAKE2s(seed | counter)

where | denotes concatenation, and where BLAKE2s denotes unkeyed BLAKE2s-256, as defined in RFC 7693.

3.private_key = (seed, sk_sig, sk_prf, r_pk)

The process of calculating sk_sigand sk_prf involves encoding the binary values of 0 and 1 as unsigned 16-bit integers, which are then transformed into two bytes each, following little-endian order. These byte sequences are concatenated with the seed. Subsequently, the combined byte sequence undergoes the BLAKE2s hashing procedure.

Similarly, the calculation of r_pkinvolves using a counter, initially set as an unsigned 16-bit integer, which is also converted into two bytes using little-endian order. This byte representation is joined with the seed and processed through BLAKE2s. The counter iterates, commencing from 2, until a valid view_key can be derived from the private key.

Learn more about BLAKE2s here.

Generate a View Key

  1. Construct pk_sig = AccountSignature.GeneratePublicKey(ppaccount_sig, sk_sig)
  2. view_key = AccountCommitment.Commit(ppaccount_cm, (pk_sig, sk_prf), r_pk)

Generate an Address

  1. address = AccountEncryption.GeneratePublicKey(ppaccount_enc, view_key)

In conclusion, Aleo Accounts serve as the foundational gateway to secure and private transactions within the Aleo network. These cryptographic identities are the bedrock upon which users can engage in zero-knowledge web applications while ensuring the utmost security, privacy, and authenticity.

By encapsulating crucial elements such as private keys, view keys, compute keys, and public addresses, Aleo Accounts provide users with a comprehensive toolkit to interact seamlessly with the network. The encryption, derivation, and management processes involved in generating these keys underscore the network’s commitment to robust security measures.

In a digital world fraught with security concerns, Aleo Accounts emerge as a beacon of trust. Unlock the power of secure transactions, execute programs with confidence, and engage in a private ecosystem — all with your Aleo Account.

To know more, join now!
Aleo
Twitter
Aleo
Discord
Aleo
Website

Prepared by Colliseum

--

--