Crypto++  5.6.3
Free C++ class library of cryptographic schemes
dsa.h
Go to the documentation of this file.
1 // dsa.h - written and placed in the public domain by Wei Dai
2 
3 //! \file
4 //! \headerfile dsa.h
5 //! \brief Classes for the DSA signature algorithm
6 
7 #ifndef CRYPTOPP_DSA_H
8 #define CRYPTOPP_DSA_H
9 
10 #include "cryptlib.h"
11 #include "gfpcrypt.h"
12 
13 NAMESPACE_BEGIN(CryptoPP)
14 
15 //! \brief DSA Signature Format
16 //! \details The DSA signature format used by Crypto++ is as defined by IEEE P1363.
17 //! Java nad .Net use the DER format, and OpenPGP uses the OpenPGP format.
19  //! \brief Crypto++ native signature encoding format
21  //! \brief signature encoding format used by Java and .Net
23  //! \brief OpenPGP signature encoding format
25 };
26 
27 //! \brief Converts between signature encoding formats
28 //! \param buffer byte buffer for the converted signature encoding
29 //! \param bufferSize the length of the converted signature encoding buffer
30 //! \param toFormat the source signature format
31 //! \param signature byte buffer for the existing signature encoding
32 //! \param signatureLen the length of the existing signature encoding buffer
33 //! \param fromFormat the source signature format
34 //! \details This function converts between these formats, and returns length
35 //! of signature in the target format. If <tt>toFormat == DSA_P1363</tt>, then
36 //! <tt>bufferSize</tt> must equal <tt>publicKey.SignatureLength()</tt>
37 size_t DSAConvertSignatureFormat(byte *buffer, size_t bufferSize, DSASignatureFormat toFormat,
38  const byte *signature, size_t signatureLen, DSASignatureFormat fromFormat);
39 
40 NAMESPACE_END
41 
42 #endif
size_t DSAConvertSignatureFormat(byte *buffer, size_t bufferSize, DSASignatureFormat toFormat, const byte *signature, size_t signatureLen, DSASignatureFormat fromFormat)
Converts between signature encoding formats.
Definition: dsa.cpp:15
DSASignatureFormat
DSA Signature Format.
Definition: dsa.h:18
Abstract base classes that provide a uniform interface to this library.
Crypto++ native signature encoding format.
Definition: dsa.h:20
signature encoding format used by Java and .Net
Definition: dsa.h:22
Implementation of schemes based on DL over GF(p)
Crypto++ library namespace.
OpenPGP signature encoding format.
Definition: dsa.h:24