Webserver+3d print
dsa.c File Reference
DSA (Digital Signature Algorithm) More...
Go to the source code of this file.
Functions | |
void | dsaInitPublicKey (DsaPublicKey *key) |
Initialize a DSA public key. | |
void | dsaFreePublicKey (DsaPublicKey *key) |
Release a DSA public key. | |
void | dsaInitPrivateKey (DsaPrivateKey *key) |
Initialize a DSA private key. | |
void | dsaFreePrivateKey (DsaPrivateKey *key) |
Release a DSA private key. | |
void | dsaInitSignature (DsaSignature *signature) |
Initialize a DSA signature. | |
void | dsaFreeSignature (DsaSignature *signature) |
Release a DSA signature. | |
error_t | dsaWriteSignature (const DsaSignature *signature, uint8_t *data, size_t *length) |
Encode DSA signature using ASN.1. | |
error_t | dsaReadSignature (const uint8_t *data, size_t length, DsaSignature *signature) |
Read an ASN.1 encoded DSA signature. | |
error_t | dsaGenerateSignature (const PrngAlgo *prngAlgo, void *prngContext, const DsaPrivateKey *key, const uint8_t *digest, size_t digestLength, DsaSignature *signature) |
DSA signature generation. | |
error_t | dsaVerifySignature (const DsaPublicKey *key, const uint8_t *digest, size_t digestLength, const DsaSignature *signature) |
DSA signature verification. |
Detailed Description
DSA (Digital Signature Algorithm)
License
Copyright (C) 2010-2017 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.
Description
The Digital Signature Algorithm (DSA) is a an algorithm developed by the NSA to generate a digital signature for the authentication of electronic documents. Refer to FIPS 186-3 for more details
- Version:
- 1.7.6
Definition in file dsa.c.
Function Documentation
void dsaFreePrivateKey | ( | DsaPrivateKey * | key ) |
void dsaFreePublicKey | ( | DsaPublicKey * | key ) |
void dsaFreeSignature | ( | DsaSignature * | signature ) |
error_t dsaGenerateSignature | ( | const PrngAlgo * | prngAlgo, |
void * | prngContext, | ||
const DsaPrivateKey * | key, | ||
const uint8_t * | digest, | ||
size_t | digestLength, | ||
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] digestLength Length in octets of the digest [out] signature (R, S) integer pair
- Returns:
- Error code
void dsaInitPrivateKey | ( | DsaPrivateKey * | key ) |
void dsaInitPublicKey | ( | DsaPublicKey * | key ) |
void dsaInitSignature | ( | DsaSignature * | signature ) |
error_t dsaReadSignature | ( | const uint8_t * | data, |
size_t | length, | ||
DsaSignature * | signature | ||
) |
error_t dsaVerifySignature | ( | const DsaPublicKey * | key, |
const uint8_t * | digest, | ||
size_t | digestLength, | ||
const DsaSignature * | signature | ||
) |
error_t dsaWriteSignature | ( | const DsaSignature * | signature, |
uint8_t * | data, | ||
size_t * | length | ||
) |
Generated on Tue Jul 12 2022 17:10:19 by
