L3fp.initializer
initialize(spanning_matrix, gs_coeff_matrix, gs_squared_norms, start_stage)
L3fp and L3fp_deep_insert functions are called at different phases and on different stages during the bkz execution.
This function is used to initialize the LLL-setup (Gram-Schmidt coefficients & Gram-Schmidt squared norms)
based on the start_stage and spanning_matrix (which correspond to basis_matrix or injected_basis_matrix) dimensions. Basically, if start_stage is equal to zero
it just initializes the NumPy arrays gs_coeff_matrix and gs_squared_norms. In other situations, it scales the current
gs_coeff_matrix and gs_squared_norms to match basis_matrix/injected_basis_matrix dimensions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
spanning_matrix
|
ndarray
|
A 2D NumPy array of shape (n, m), where n<=m, representing a vector space (which correspond to basis_matrix or injected_basis_matrix). |
required |
gs_coeff_matrix
|
ndarray
|
A 2D NumPy array of shape (start_stage, start_stage) representing the Gram-Schmidt coefficients |
required |
gs_squared_norms
|
ndarray
|
A 1D NumPy array of shape (start_stage, ) representing the squared lengths of the |
required |
start_stage
|
int
|
The index of the basis vector from which the reduction process begins. |
required |
Returns:
| Type | Description |
|---|---|
tuple
|
|
Source code in bkz/L3FP/initializer.py
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | |