|
void | SwapNativeAndPortableLayout (void *dest, size_t dest_size, void const *src, size_t src_size) |
| Serialize or deserailize a sequence of math objects. More...
|
|
void * | Uint32Serialize (OctStr32 *dest, uint32_t src) |
| Write a uint32_t to a portable buffer. More...
|
|
void const * | Uint32Deserialize (uint32_t *dest, OctStr32 const *src) |
| Read a uint32_t from a portable buffer. More...
|
|
void * | VliSerialize (BigNumStr *dest, VeryLargeInt const *src) |
| Write a large integer to a portable buffer. More...
|
|
void const * | VliDeserialize (VeryLargeInt *dest, BigNumStr const *src) |
| Read a large integer from a portable buffer. More...
|
|
void * | FqSerialize (FqElemStr *dest, FqElem const *src) |
| Write an element of Fq to a portable buffer. More...
|
|
void const * | FqDeserialize (FqElem *dest, FqElemStr const *src) |
| Read an element of Fq from a portable buffer. More...
|
|
void * | Fq12Serialize (Fq12ElemStr *dest, Fq12Elem const *src) |
| Write an element of Fq12 to a portable buffer. More...
|
|
void const * | Fq12Deserialize (Fq12Elem *dest, Fq12ElemStr const *src) |
| Read an element of Fq12 from a portable buffer. More...
|
|
void * | FpSerialize (FpElemStr *dest, FpElem const *src) |
| Write an element of Fp to a portable buffer. More...
|
|
void const * | FpDeserialize (FpElem *dest, FpElemStr const *src) |
| Read an element of Fp from a portable buffer. More...
|
|
void * | EFqSerialize (G1ElemStr *dest, EccPointFq const *src) |
| Write a point on EFq to a portable buffer. More...
|
|
void const * | EFqDeserialize (EccPointFq *dest, G1ElemStr const *src) |
| Read a point on EFq from a portable buffer. More...
|
|
void * | EFq2Serialize (G2ElemStr *dest, EccPointFq2 const *src) |
| Write a point on EFq2 to a portable buffer. More...
|
|
void const * | EFq2Deserialize (EccPointFq2 *dest, G2ElemStr const *src) |
| Read a point on EFq2 from a portable buffer. More...
|
|
Definition of de/serialize functionality.
void SwapNativeAndPortableLayout |
( |
void * |
dest, |
|
|
size_t |
dest_size, |
|
|
void const * |
src, |
|
|
size_t |
src_size |
|
) |
| |
Serialize or deserailize a sequence of math objects.
Converts layouts between native and portable or between portable and native of the following types: VeryLargeInt and BigNumStr, FqElem and FqElemStr, FpElem and FpElemStr, EccPointFq and G1ElemStr, Fq12Elem and Fq12ElemStr.
If input contain multiple values of supported types all will be converted.
- Note
- The following types are not supported: VeryLargeIntProduct.
-
This function have the assumptions that the input structures are packed such that consequent 32 byte fields would have no gap in between.
- Parameters
-
[out] | dest | target buffer |
[in] | dest_size | size of dest buffer |
[in] | src | source data |
[in] | src_size | size of src buffer |