1
/*************************************************
2
* DL Scheme Header File *
3
* (C) 1999-2007 The Botan Project *
4
*************************************************/
6
#ifndef BOTAN_DL_ALGO_H__
7
#define BOTAN_DL_ALGO_H__
9
#include <botan/dl_group.h>
10
#include <botan/x509_key.h>
11
#include <botan/pkcs8.h>
15
/*************************************************
17
*************************************************/
18
class DL_Scheme_PublicKey : public virtual Public_Key
21
bool check_key(bool) const;
23
const DL_Group& get_domain() const { return group; }
24
const BigInt& get_y() const { return y; }
25
const BigInt& group_p() const { return group.get_p(); }
26
const BigInt& group_q() const { return group.get_q(); }
27
const BigInt& group_g() const { return group.get_g(); }
28
virtual DL_Group::Format group_format() const = 0;
30
X509_Encoder* x509_encoder() const;
31
X509_Decoder* x509_decoder();
36
virtual void X509_load_hook() {}
39
/*************************************************
41
*************************************************/
42
class DL_Scheme_PrivateKey : public virtual DL_Scheme_PublicKey,
43
public virtual Private_Key
46
bool check_key(bool) const;
48
const BigInt& get_x() const { return x; }
50
PKCS8_Encoder* pkcs8_encoder() const;
51
PKCS8_Decoder* pkcs8_decoder();
55
virtual void PKCS8_load_hook(bool = false) {}