monotone

monotone Mtn Source Tree

Root/botan/pk_ops.h

1/*************************************************
2* Public Key Operations Header File *
3* (C) 1999-2006 The Botan Project *
4*************************************************/
5
6#ifndef BOTAN_PK_OPS_H__
7#define BOTAN_PK_OPS_H__
8
9#include <botan/bigint.h>
10#include <botan/dl_group.h>
11
12namespace Botan {
13
14/*************************************************
15* IF Operation *
16*************************************************/
17class IF_Operation
18 {
19 public:
20 virtual BigInt public_op(const BigInt&) const = 0;
21 virtual BigInt private_op(const BigInt&) const = 0;
22 virtual IF_Operation* clone() const = 0;
23 virtual ~IF_Operation() {}
24 };
25
26/*************************************************
27* DSA Operation *
28*************************************************/
29class DSA_Operation
30 {
31 public:
32 virtual bool verify(const byte[], u32bit,
33 const byte[], u32bit) const = 0;
34 virtual SecureVector<byte> sign(const byte[], u32bit,
35 const BigInt&) const = 0;
36 virtual DSA_Operation* clone() const = 0;
37 virtual ~DSA_Operation() {}
38 };
39
40/*************************************************
41* NR Operation *
42*************************************************/
43class NR_Operation
44 {
45 public:
46 virtual SecureVector<byte> verify(const byte[], u32bit) const = 0;
47 virtual SecureVector<byte> sign(const byte[], u32bit,
48 const BigInt&) const = 0;
49 virtual NR_Operation* clone() const = 0;
50 virtual ~NR_Operation() {}
51 };
52
53/*************************************************
54* ElGamal Operation *
55*************************************************/
56class ELG_Operation
57 {
58 public:
59 virtual SecureVector<byte> encrypt(const byte[], u32bit,
60 const BigInt&) const = 0;
61 virtual BigInt decrypt(const BigInt&, const BigInt&) const = 0;
62 virtual ELG_Operation* clone() const = 0;
63 virtual ~ELG_Operation() {}
64 };
65
66/*************************************************
67* DH Operation *
68*************************************************/
69class DH_Operation
70 {
71 public:
72 virtual BigInt agree(const BigInt&) const = 0;
73 virtual DH_Operation* clone() const = 0;
74 virtual ~DH_Operation() {}
75 };
76
77}
78
79#endif

Archive Download this file

Branches

Tags

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