Coverage Report

Created: 2026-09-12 06:55

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/openssl41/crypto/ml_dsa/ml_dsa_matrix.h
Line
Count
Source
1
/*
2
 * Copyright 2024-2026 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
#if !defined(OSSL_LIBCRYPTO_ML_DSA_ML_DSA_MATRIX_H)
12
#define OSSL_LIBCRYPTO_ML_DSA_ML_DSA_MATRIX_H
13
14
#include "ml_dsa_local.h"
15
16
struct matrix_st {
17
    POLY *m_poly;
18
    size_t k, l;
19
};
20
21
/**
22
 * @brief Initialize a Matrix object.
23
 *
24
 * @param m The matrix object.
25
 * @param polys A preallocated array of k * l polynomial blocks. |m| does not
26
 *              own/free this.
27
 * @param k The number of rows
28
 * @param l The number of columns
29
 */
30
static ossl_inline ossl_unused void
31
matrix_init(MATRIX *m, POLY *polys, size_t k, size_t l)
32
3.96k
{
33
3.96k
    m->k = k;
34
3.96k
    m->l = l;
35
3.96k
    m->m_poly = polys;
36
3.96k
}
ml_dsa_key.c:matrix_init
Line
Count
Source
32
2.17k
{
33
2.17k
    m->k = k;
34
2.17k
    m->l = l;
35
2.17k
    m->m_poly = polys;
36
2.17k
}
Unexecuted instantiation: ml_dsa_matrix.c:matrix_init
Unexecuted instantiation: ml_dsa_sample.c:matrix_init
ml_dsa_sign.c:matrix_init
Line
Count
Source
32
1.78k
{
33
1.78k
    m->k = k;
34
1.78k
    m->l = l;
35
1.78k
    m->m_poly = polys;
36
1.78k
}
37
38
static ossl_inline ossl_unused void
39
matrix_mult_vector(const MATRIX *a, const VECTOR *s, VECTOR *t)
40
7.09k
{
41
7.09k
    ossl_ml_dsa_matrix_mult_vector(a, s, t);
42
7.09k
}
ml_dsa_key.c:matrix_mult_vector
Line
Count
Source
40
2.17k
{
41
2.17k
    ossl_ml_dsa_matrix_mult_vector(a, s, t);
42
2.17k
}
Unexecuted instantiation: ml_dsa_matrix.c:matrix_mult_vector
Unexecuted instantiation: ml_dsa_sample.c:matrix_mult_vector
ml_dsa_sign.c:matrix_mult_vector
Line
Count
Source
40
4.92k
{
41
4.92k
    ossl_ml_dsa_matrix_mult_vector(a, s, t);
42
4.92k
}
43
44
#endif /* !defined(OSSL_LIBCRYPTO_ML_DSA_ML_DSA_MATRIX_H) */