description = "A few notes on the bLSAG elliptic curve ring signing algorithm"
insert_anchor_links = "left"
[taxonomies]
tags = ["cryptography", "mathematics"]
[extra]
katex = true
+++
A ring signature is a cryptographic proof that a message is original and authentified by someone in a given assembly, without revealing this person's identity.
For example, jury members may each one give their decision anonymously, so that the other jury members or the public cannot make a link between any decision and any member. In order to ensure the decisions are authentic, with each one is attached a ring signature that enables to prove it has been emitted by a jury member.
Multiple ring signature algorithms exist. Here will be introduced bLSAG, which has the property of enabling the detection of multiple distinct signatures emitted by the same person. In our example of a jury, we want indeed to ensure nobody voted twice.
a voté deux fois.
The main source of this introduction to bLSAG is [Zero to Monero 2.0.0](https://www.getmonero.org/library/Zero-to-Monero-2-0-0.pdf) (page 29) and the Rust library [nazgul](https://github.com/edwinhere/nazgul/) which implements multiple ring signature schemes including bLSAG. Moreover, this article serves as additional documentation to the Rust library [orodruin](https://git.duniter.org/tuxmain/orodruin-rs/) that I developed in order to implement anonymous transactions in [Duniter](https://duniter.org).
**Required**: basics in algebra and cryptology. Knowledge of elliptic curves is not needed.
## Notations
* $\mathbb{Z}/l\mathbb{Z}$ the integers modulo $l$
* $E$ an elliptic curve (finite set of points, forming a group in which the discrete logarithm problem is assumed to be difficult)
* $G$ a generator of $E$
* $\mathbin\Vert$ the concatenation operator
* $x[n]$ the remainder of the euclidean division of $x$ by $n$
* $H$ a cryptographic hashing function (depending on the context, its image is in $\mathbb{Z}/l\mathbb{Z}$ or in $E$)
* We will talk about the ring $\mathcal{R}$, meaning an ordered set of public keys, not meaning an algebraic structure of ring. Yes this is ambiguous.
## Signature
The signature $\sigma(m)$ of a message $m$, by the secret key $k_\pi$ of which the public key $K_\pi$ is in the ring $\mathcal{R}=\\\{K_1,\ldots,K_n\\\}$, is obtained as follows:
We can now understand why a _ring_. We are forming a ring, or circle, with all the keys, then the challenge rotates around the ring. Each key modifies it by turn. In order to get the same, original challenge at the end, we need that one key somewhere in the ring (without us knowing where) made the right modification that finally cancels the noise created by the others.
annule le bruit créé par les autres.
## Correctness
Let's show that the verification algorithm is correct. First we recall the following definitions:
Without making a security proof, we can have an feeling of what makes this system safe:
Is the signature **unfalsifiable**, i.e. are we unable to forge a correct signature without knowing $k_\pi$? We see that the proofs of (1) and (2) use $r_\pi = \alpha - c_\pi k_\pi$, that is the private key.
Is the signature **anonymous**, i.e. are we unable to find $\pi$ from the signature? We have that $r_\pi$ is noised by $\alpha$. We can not distinguish $r_\pi$ from the other $r_i$, because they are uniformly random like $\alpha$ and $c_\pi$ (which is a hash), and because $k_\pi$ is secret.