monotone

monotone Mtn Source Tree

Root/botan/dl_algo.h

1/*************************************************
2* DL Scheme Header File *
3* (C) 1999-2006 The Botan Project *
4*************************************************/
5
6#ifndef BOTAN_DL_ALGO_H__
7#define BOTAN_DL_ALGO_H__
8
9#include <botan/dl_group.h>
10#include <botan/x509_key.h>
11#include <botan/pkcs8.h>
12
13namespace Botan {
14
15/*************************************************
16* DL Public Key *
17*************************************************/
18class DL_Scheme_PublicKey : public virtual Public_Key
19 {
20 public:
21 bool check_key(bool) const;
22
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;
29
30 X509_Encoder* x509_encoder() const;
31 X509_Decoder* x509_decoder();
32 protected:
33 BigInt y;
34 DL_Group group;
35 private:
36 virtual void X509_load_hook() {}
37 };
38
39/*************************************************
40* DL Private Key *
41*************************************************/
42class DL_Scheme_PrivateKey : public virtual DL_Scheme_PublicKey,
43 public virtual Private_Key
44 {
45 public:
46 bool check_key(bool) const;
47
48 const BigInt& get_x() const { return x; }
49
50 PKCS8_Encoder* pkcs8_encoder() const;
51 PKCS8_Decoder* pkcs8_decoder();
52 protected:
53 BigInt x;
54 private:
55 virtual void PKCS8_load_hook(bool = false) {}
56 };
57
58}
59
60#endif

Archive Download this file

Branches

Tags

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status