DSA (Digital Signature Algorithm) More...
Go to the source code of this file.
Data Structures | |
struct | DsaDomainParameters |
DSA domain parameters. More... | |
struct | DsaPublicKey |
DSA public key. More... | |
struct | DsaPrivateKey |
DSA private key. More... | |
struct | DsaSignature |
DSA signature. More... | |
Functions | |
void | dsaInitDomainParameters (DsaDomainParameters *params) |
Initialize DSA domain parameters. More... | |
void | dsaFreeDomainParameters (DsaDomainParameters *params) |
Release DSA domain parameters. More... | |
void | dsaInitPublicKey (DsaPublicKey *key) |
Initialize a DSA public key. More... | |
void | dsaFreePublicKey (DsaPublicKey *key) |
Release a DSA public key. More... | |
void | dsaInitPrivateKey (DsaPrivateKey *key) |
Initialize a DSA private key. More... | |
void | dsaFreePrivateKey (DsaPrivateKey *key) |
Release a DSA private key. More... | |
void | dsaInitSignature (DsaSignature *signature) |
Initialize a DSA signature. More... | |
void | dsaFreeSignature (DsaSignature *signature) |
Release a DSA signature. More... | |
error_t | dsaWriteSignature (const DsaSignature *signature, uint8_t *data, size_t *length) |
Encode DSA signature using ASN.1. More... | |
error_t | dsaReadSignature (const uint8_t *data, size_t length, DsaSignature *signature) |
Read an ASN.1 encoded DSA signature. More... | |
error_t | dsaGenerateSignature (const PrngAlgo *prngAlgo, void *prngContext, const DsaPrivateKey *key, const uint8_t *digest, size_t digestLen, DsaSignature *signature) |
DSA signature generation. More... | |
error_t | dsaVerifySignature (const DsaPublicKey *key, const uint8_t *digest, size_t digestLen, const DsaSignature *signature) |
DSA signature verification. More... | |
Variables | |
const uint8_t | DSA_OID [7] |
const uint8_t | DSA_WITH_SHA1_OID [7] |
const uint8_t | DSA_WITH_SHA224_OID [9] |
const uint8_t | DSA_WITH_SHA256_OID [9] |
const uint8_t | DSA_WITH_SHA384_OID [9] |
const uint8_t | DSA_WITH_SHA512_OID [9] |
const uint8_t | DSA_WITH_SHA3_224_OID [9] |
const uint8_t | DSA_WITH_SHA3_256_OID [9] |
const uint8_t | DSA_WITH_SHA3_384_OID [9] |
const uint8_t | DSA_WITH_SHA3_512_OID [9] |
Detailed Description
DSA (Digital Signature Algorithm)
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2010-2024 Oryx Embedded SARL. All rights reserved.
This file is part of CycloneCRYPTO Open.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- Version
- 2.4.4
Definition in file dsa.h.
Function Documentation
◆ dsaFreeDomainParameters()
void dsaFreeDomainParameters | ( | DsaDomainParameters * | params | ) |
◆ dsaFreePrivateKey()
void dsaFreePrivateKey | ( | DsaPrivateKey * | key | ) |
◆ dsaFreePublicKey()
void dsaFreePublicKey | ( | DsaPublicKey * | key | ) |
◆ dsaFreeSignature()
void dsaFreeSignature | ( | DsaSignature * | signature | ) |
◆ dsaGenerateSignature()
error_t dsaGenerateSignature | ( | const PrngAlgo * | prngAlgo, |
void * | prngContext, | ||
const DsaPrivateKey * | key, | ||
const uint8_t * | digest, | ||
size_t | digestLen, | ||
DsaSignature * | signature | ||
) |
DSA signature generation.
- Parameters
-
[in] prngAlgo PRNG algorithm [in] prngContext Pointer to the PRNG context [in] key Signer's DSA private key [in] digest Digest of the message to be signed [in] digestLen Length in octets of the digest [out] signature (R, S) integer pair
- Returns
- Error code
◆ dsaInitDomainParameters()
void dsaInitDomainParameters | ( | DsaDomainParameters * | params | ) |
◆ dsaInitPrivateKey()
void dsaInitPrivateKey | ( | DsaPrivateKey * | key | ) |
◆ dsaInitPublicKey()
void dsaInitPublicKey | ( | DsaPublicKey * | key | ) |
◆ dsaInitSignature()
void dsaInitSignature | ( | DsaSignature * | signature | ) |
◆ dsaReadSignature()
error_t dsaReadSignature | ( | const uint8_t * | data, |
size_t | length, | ||
DsaSignature * | signature | ||
) |
◆ dsaVerifySignature()
error_t dsaVerifySignature | ( | const DsaPublicKey * | key, |
const uint8_t * | digest, | ||
size_t | digestLen, | ||
const DsaSignature * | signature | ||
) |
◆ dsaWriteSignature()
error_t dsaWriteSignature | ( | const DsaSignature * | signature, |
uint8_t * | data, | ||
size_t * | length | ||
) |