monotone

monotone Mtn Source Tree

Root/botan/if_algo.h

1/*************************************************
2* IF Scheme Header File *
3* (C) 1999-2007 The Botan Project *
4*************************************************/
5
6#ifndef BOTAN_IF_ALGO_H__
7#define BOTAN_IF_ALGO_H__
8
9#include <botan/x509_key.h>
10#include <botan/pkcs8.h>
11#include <botan/pk_core.h>
12
13namespace Botan {
14
15/*************************************************
16* IF Public Key *
17*************************************************/
18class IF_Scheme_PublicKey : public virtual Public_Key
19 {
20 public:
21 bool check_key(bool) const;
22
23 const BigInt& get_n() const { return n; }
24 const BigInt& get_e() const { return e; }
25
26 u32bit max_input_bits() const { return (n.bits() - 1); }
27
28 X509_Encoder* x509_encoder() const;
29 X509_Decoder* x509_decoder();
30 protected:
31 virtual void X509_load_hook();
32 BigInt n, e;
33 IF_Core core;
34 };
35
36/*************************************************
37* IF Private Key *
38*************************************************/
39class IF_Scheme_PrivateKey : public virtual IF_Scheme_PublicKey,
40 public virtual Private_Key
41 {
42 public:
43 bool check_key(bool) const;
44
45 const BigInt& get_p() const { return p; }
46 const BigInt& get_q() const { return q; }
47 const BigInt& get_d() const { return d; }
48
49 PKCS8_Encoder* pkcs8_encoder() const;
50 PKCS8_Decoder* pkcs8_decoder();
51 protected:
52 virtual void PKCS8_load_hook(bool = false);
53 BigInt d, p, q, d1, d2, c;
54 };
55
56}
57
58#endif

Archive Download this file

Branches

Tags

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