Coverage Report

Created: 2025-06-22 06:56

/src/openssl/crypto/ml_dsa/ml_dsa_hash.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
#include <openssl/evp.h>
11
12
static ossl_inline ossl_unused int
13
shake_xof(EVP_MD_CTX *ctx, const EVP_MD *md, const uint8_t *in, size_t in_len,
14
          uint8_t *out, size_t out_len)
15
0
{
16
0
    return (EVP_DigestInit_ex2(ctx, md, NULL) == 1
17
0
            && EVP_DigestUpdate(ctx, in, in_len) == 1
18
0
            && EVP_DigestSqueeze(ctx, out, out_len) == 1);
19
0
}
Unexecuted instantiation: ml_dsa_encoders.c:shake_xof
Unexecuted instantiation: ml_dsa_key.c:shake_xof
Unexecuted instantiation: ml_dsa_sample.c:shake_xof
Unexecuted instantiation: ml_dsa_sign.c:shake_xof
20
21
static ossl_inline ossl_unused int
22
shake_xof_2(EVP_MD_CTX *ctx, const EVP_MD *md, const uint8_t *in1, size_t in1_len,
23
            const uint8_t *in2, size_t in2_len, uint8_t *out, size_t out_len)
24
0
{
25
0
    return EVP_DigestInit_ex2(ctx, md, NULL)
26
0
        && EVP_DigestUpdate(ctx, in1, in1_len)
27
0
        && EVP_DigestUpdate(ctx, in2, in2_len)
28
0
        && EVP_DigestSqueeze(ctx, out, out_len);
29
0
}
Unexecuted instantiation: ml_dsa_encoders.c:shake_xof_2
Unexecuted instantiation: ml_dsa_key.c:shake_xof_2
Unexecuted instantiation: ml_dsa_sample.c:shake_xof_2
Unexecuted instantiation: ml_dsa_sign.c:shake_xof_2
30
31
static ossl_inline ossl_unused int
32
shake_xof_3(EVP_MD_CTX *ctx, const EVP_MD *md, const uint8_t *in1, size_t in1_len,
33
            const uint8_t *in2, size_t in2_len,
34
            const uint8_t *in3, size_t in3_len, uint8_t *out, size_t out_len)
35
0
{
36
0
    return EVP_DigestInit_ex2(ctx, md, NULL)
37
0
        && EVP_DigestUpdate(ctx, in1, in1_len)
38
0
        && EVP_DigestUpdate(ctx, in2, in2_len)
39
0
        && EVP_DigestUpdate(ctx, in3, in3_len)
40
0
        && EVP_DigestSqueeze(ctx, out, out_len);
41
0
}
Unexecuted instantiation: ml_dsa_encoders.c:shake_xof_3
Unexecuted instantiation: ml_dsa_key.c:shake_xof_3
Unexecuted instantiation: ml_dsa_sample.c:shake_xof_3
Unexecuted instantiation: ml_dsa_sign.c:shake_xof_3