Reverse layer: linear neural checker
In an internal protection module, a single fully connected linear layer (LinearExactVerifier) is used to verify a key, and its parameters are given in the layer.json file.
The layer performs the following linear transformation on the vector x = [x_0, x_1, ..., x_15] of ASCII codes of a secret string made of 16 hexadecimal characters:
y = W · x + b
Here W is an integer weight matrix of size 16×16 (its determinant is non-zero, but its inverse matrix consists of fractions), and b is a bias vector of 16 integers. If the output vector y equals the vector target exactly, the model accepts the key.
Solve the system of linear equations, recover the ASCII codes in the vector x and form the BAYROQ{TESKARI_QATLAM_<16_kichik_hex>} flag.