diff --git a/documentation/concepts/00_accounts.md b/documentation/concepts/00_accounts.md index 38d33ce60..c6ed7c914 100644 --- a/documentation/concepts/00_accounts.md +++ b/documentation/concepts/00_accounts.md @@ -100,7 +100,12 @@ An instantiation of HashToField that output elements in the scalar field F ### EncodeToF -EncodeToF(x) is a function that encode the bitstring `x` into an element of the finite field. +EncodeToF(x) is a function that encodes the Unicode string `x` into an element of Fbase. + +Details of the encoding: +- `x` is converted to its UTF-8 sequence of bytes `b`. +- `b` is turned into an unsigned integer `v` that represents the little endian value of `b`. +- `v` is reduced modulo the prime that defines the field Fbase. ### Account Prefixes @@ -134,8 +139,8 @@ Given global instantiated Aleo parameters and subroutines. 1. Sample a 32 byte `seed` from random 2. Construct private key components - - `sk_sig` = HashToScalar(EncodeToF(Fbase, "AleoAccountSignatureSecretKey0") | `seed`)) - - `r_sig` = HashToScalar(EncodeToF(Fbase, "AleoAccountSignatureRandomizer0.0") | `seed`)) + - `sk_sig` = HashToScalar(EncodeToF("AleoAccountSignatureSecretKey0") | `seed`)) + - `r_sig` = HashToScalar(EncodeToF("AleoAccountSignatureRandomizer0.0") | `seed`)) where | denotes concatenation, and where `HashToScalar` denotes the [Poseidon hash function](https://eprint.iacr.org/2019/458.pdf).