1
2
3
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
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
// The values below are taken from the |api.h| file in the
// |crypto/dilithium/pqcrystals_dilithium_ref_common| directory.
// DILITHIUM3_keypair generates a Dilithium3 keypair and assigns a public key to
// |public_key| and a private key to |secret_key|. The function is a wrapper for
// the keygen function from the Dilithium source. It returns 0 upon success.
int ;
// DILITHIUM3_sign generates a Dilithium3 signature. Where |sig| is a pointer to
// output signature, |sig_len| is a pointer to output length of signature,
// |message| is a pointer to message to be signed, |message_len| is the length
// of the message and |secret_key| is a pointer to bit-packed secret key.
// It returns 0 upon success.
int ;
// DILITHIUM3_verify generates a Dilithium3 signature. Where |sig| is a pointer
// to input signature, |sig_len| is the length of the signature, |message| is
// a pointer to message, |message_len| is the length of the message and
// |public_key| is a pointer to bit-packed public key. Returns 0 if signature
// could be verified successfully and -1 otherwise.
int ;