In addition to the post about Edwards curves, lats take a look on a useful feature that this curves allow. As I said earlier, the Ed25519 for example, is defined over field, where every value requires 255 bit for the binary representation. So every point will take about 510 bit. Using the point compression algorithm, we can encode every point using only 256 bits by transferring only the coordinate.
Using the Edwards curves equation we can express the coordinate (with an assumption that ) as , which means that can have two possible solutions (+ and -). In the modular terms (since we have an odd modulo ) it means that can have the odd and even representations. This information can be encoded into one bit.
Then, to decode the point coordinates, after separating parity bit from coordinate, we have to calculate the root square. There are several methods to deal with the square root in . One of them is to use the feature that . In the multiplicative group we have elements (then for every ), so for every square we have . From the equation we can observe that there can be two possible solutions . In the case when calculated satisfies we should multiply it on .
For the we can follow the same transformations: . The base element was selected as the most comfortable element for multiplication.
So finally, for the equation we can calculate and check that and if so multiply the on . On the final stage, we use the parity bit to check that we’ve recovered same coordinate with same parity.