fmpz_mat_randntrulike, fmpz_mat_randntrulike2
Synopsis
#include <flint/fmpz_mat.h>void fmpz_mat_randntrulike(fmpz_mat_t mat, flint_rand_t state, flint_bitcnt_t bits, ulong q)sourcevoid fmpz_mat_randntrulike2(fmpz_mat_t mat, flint_rand_t state, flint_bitcnt_t bits, ulong q)sourceSets the square matrix mat of even dimension 2d to a random NTRU-like matrix \begin{pmatrix} I & H \\ 0 & qI \end{pmatrix}, respectively \begin{pmatrix} qI & 0 \\ H & I \end{pmatrix}, where the d \times d block H is circulant, H_{ij} = h_{(i + j) \bmod d}, for a random vector h of signed integers of bits bits. Throws if the matrix is not square of even dimension.
Cite this page
The FLINT team, “fmpz_mat_randntrulike, fmpz_mat_randntrulike2 (fmpz_mat.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/fmpz_mat/fmpz_mat_randntrulike.html (generated 2026-10-20).
@misc{flint-doc-fmpz-mat-fmpz-mat-randntrulike,
author = {{The FLINT team}},
title = {{fmpz\_mat\_randntrulike, fmpz\_mat\_randntrulike2 (fmpz\_mat.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/fmpz_mat/fmpz_mat_randntrulike.html},
note = {Generated 2026-10-20}
}