/src/openssl/crypto/ml_dsa/ml_dsa_matrix.h
Line  | Count  | Source (jump to first uncovered line)  | 
1  |  | /*  | 
2  |  |  * Copyright 2024-2025 The OpenSSL Project Authors. All Rights Reserved.  | 
3  |  |  *  | 
4  |  |  * Licensed under the Apache License 2.0 (the "License").  You may not use  | 
5  |  |  * this file except in compliance with the License.  You can obtain a copy  | 
6  |  |  * in the file LICENSE in the source distribution or at  | 
7  |  |  * https://www.openssl.org/source/license.html  | 
8  |  |  */  | 
9  |  |  | 
10  |  | /* A 'k' by 'l' Matrix object ('k' rows and 'l' columns) containing polynomial scalars */ | 
11  |  | struct matrix_st { | 
12  |  |     POLY *m_poly;  | 
13  |  |     size_t k, l;  | 
14  |  | };  | 
15  |  |  | 
16  |  | /**  | 
17  |  |  * @brief Initialize a Matrix object.  | 
18  |  |  *  | 
19  |  |  * @param m The matrix object.  | 
20  |  |  * @param polys A preallocated array of k * l polynomial blocks. |m| does not  | 
21  |  |  *              own/free this.  | 
22  |  |  * @param k The number of rows  | 
23  |  |  * @param l The number of columns  | 
24  |  |  */  | 
25  |  | static ossl_inline ossl_unused void  | 
26  |  | matrix_init(MATRIX *m, POLY *polys, size_t k, size_t l)  | 
27  | 0  | { | 
28  | 0  |     m->k = k;  | 
29  | 0  |     m->l = l;  | 
30  | 0  |     m->m_poly = polys;  | 
31  | 0  | } Unexecuted instantiation: ml_dsa_key.c:matrix_init Unexecuted instantiation: ml_dsa_matrix.c:matrix_init Unexecuted instantiation: ml_dsa_sample.c:matrix_init Unexecuted instantiation: ml_dsa_sign.c:matrix_init  | 
32  |  |  | 
33  |  | static ossl_inline ossl_unused void  | 
34  |  | matrix_mult_vector(const MATRIX *a, const VECTOR *s, VECTOR *t)  | 
35  | 0  | { | 
36  | 0  |     ossl_ml_dsa_matrix_mult_vector(a, s, t);  | 
37  | 0  | } Unexecuted instantiation: ml_dsa_key.c:matrix_mult_vector Unexecuted instantiation: ml_dsa_matrix.c:matrix_mult_vector Unexecuted instantiation: ml_dsa_sample.c:matrix_mult_vector Unexecuted instantiation: ml_dsa_sign.c:matrix_mult_vector  | 
38  |  |  | 
39  |  | static ossl_inline ossl_unused int  | 
40  |  | matrix_expand_A(EVP_MD_CTX *g_ctx, const EVP_MD *md, const uint8_t *rho,  | 
41  |  |                 MATRIX *out)  | 
42  | 0  | { | 
43  | 0  |     return ossl_ml_dsa_matrix_expand_A(g_ctx, md, rho, out);  | 
44  | 0  | } Unexecuted instantiation: ml_dsa_key.c:matrix_expand_A Unexecuted instantiation: ml_dsa_matrix.c:matrix_expand_A Unexecuted instantiation: ml_dsa_sample.c:matrix_expand_A Unexecuted instantiation: ml_dsa_sign.c:matrix_expand_A  |