#include <client_functions.h>
Inheritance diagram for CODEX_Client::Interface::Interface:


Public Member Functions | |
| void | setRemoteServer (const string &name, int port) |
| Set the remote server. | |
| void | setServiceKey (CODEX_Ciphers::RSAPublicKey *key) |
| Set the service's RSA public key. | |
| void | setKeyPair (CODEX_ASN1::Certificate *cert, CODEX_Ciphers::RSAPrivateKey *key) |
| Set the client's RSA public/private key pair. | |
| CODEX_Ciphers::Policy * | createPolicy (const CODEX_Ciphers::RSAPublicKey &policyPubKey, const CODEX_Ciphers::RSAPrivateKey &ownerPrivKey) |
| Creates a CODEX_Ciphers::Policy object. | |
| CODEX_Ciphers::Credentials * | issueCredentials (const CODEX_Ciphers::RSAPublicKey &clientPubKey, const CODEX_Ciphers::RSAPrivateKey &policyPrivKey) |
| Creates a CODEX_Ciphers::Credentials object. | |
| bool | createKey (const CODEX_ASN1::ustring &name, const CODEX_ASN1::Certificate &owner_cert, const CODEX_Ciphers::Policy &readPolicy, const CODEX_Ciphers::Policy &writePolicy, SignedBoundNameMsg &binding) |
| Bind a name and access control policies. | |
| bool | writeKey (const CODEX_ASN1::ustring &name, const BIGNUM *keyValue, const CODEX_Ciphers::Credentials &credentials, const CODEX_Ciphers::RSAPrivateKey &privKey, const SignedBoundNameMsg &binding) |
| Associate a value with a name. | |
| bool | readKey (const CODEX_ASN1::ustring &name, const CODEX_Ciphers::Credentials &credentials, const CODEX_Ciphers::RSAPrivateKey &privKey, BIGNUM **returnedKeyValue) |
| Retrieve the value associated with a name. | |
| void | toFile (const char *fname) const |
| Writes the Client's state to a file. | |
| void * | fromFile (const char *fname) |
| Reads the Client's state from a file. | |
| const CODEX_Quorum::RemoteServer * | server () const |
| The remote server. | |
| const CODEX_ASN1::Certificate * | certificate () const |
| The client's certificate. | |
| const CODEX_Ciphers::RSAPrivateKey * | privateKey () const |
| The client's RSA private key. | |
| const CODEX_Ciphers::RSAPublicKey * | serviceKey () const |
| The service's RSA public key. | |
| const CODEX_Ciphers::ElGamalPublicKey * | serviceEGKey () const |
| The service's ElGamal public key. | |
| const CODEX_ASN1::BigNumber * | serviceH () const |
| The service's auxiliary generator. | |
| const CODEX_Ciphers::ElGamalPublicKey * | publicEGKey () const |
| The client's ElGamal public key. | |
| const CODEX_Ciphers::ElGamalPrivateKey * | privateEGKey () const |
| The client's ElGamal private key. | |
Static Public Member Functions | |
| static Interface * | instance () |
| The unique instance of Interface. | |
| static void | destroy () |
| Destroy the unique instance of Interface. | |
Protected Member Functions | |
| bool | getServiceKey () |
| Fetch the service's ElGamal public key. | |
| bool | contactServer (const Message &message, unsigned char mtype, CODEX_Quorum::Message &response) |
| Send a message to the remote server and wait for a response. | |
It allows the C-callable functions to access a static object containing methods and state.
Definition at line 65 of file client_functions.h.
|
||||||||||||||||
|
Send a message to the remote server and wait for a response.
Definition at line 618 of file Client.cc. References CODEX_Quorum::RemoteServer::flushSocket(), CODEX_ASN1::BigNumber::marshal(), CODEX_Quorum::RemoteServer::receiveFrom(), CODEX_Quorum::RemoteServerReturn::reset(), CODEX_Quorum::RemoteServerReturn::returnCode(), and CODEX_Quorum::RemoteServer::sendTo(). Referenced by CODEX_Client::Client::createKey(), CODEX_Client::Client::getServiceKey(), CODEX_Client::Client::readKey(), and CODEX_Client::Client::writeKey(). |
|
||||||||||||||||||||||||
|
Bind a name and access control policies.
Definition at line 127 of file Client.cc. References CODEX_Quorum::Message::buffer(), CODEX_Client::Client::contactServer(), CODEX_Client::Message::digest(), CODEX_Quorum::Message::length(), CODEX_Client::CreateKeyMsg::name(), CODEX_Ciphers::RSAPrivateKey::sign(), CODEX_Client::SignedMessage< MT, ST >::signature(), CODEX_ASN1::BigNumber::value(), CODEX_ASN1::OctetString::value(), and CODEX_Ciphers::RSAPublicKey::verifySignature(). Referenced by CODEX_Client::Interface::codex_create_key(). |
|
||||||||||||
|
Creates a CODEX_Ciphers::Policy object.
Definition at line 92 of file Client.cc. References CODEX_Ciphers::Policy::unmarshal(). Referenced by CODEX_Client::Interface::codex_create_policy(). |
|
|
Reads the Client's state from a file.
Definition at line 774 of file Client.cc. References CODEX_ASN1::BigNumber::unmarshal(), CODEX_Ciphers::ElGamalPublicKey::unmarshal(), CODEX_Ciphers::RSAPublicKey::unmarshal(), CODEX_Ciphers::RSAPrivateKey::unmarshal(), CODEX_ASN1::Certificate::unmarshal(), CODEX_ASN1::Integer::unmarshal(), and CODEX_ASN1::Integer::value(). Referenced by CODEX_Client::Interface::codex_from_file(). |
|
||||||||||||
|
Creates a CODEX_Ciphers::Credentials object.
Definition at line 111 of file Client.cc. Referenced by CODEX_Client::Interface::codex_issue_credentials(). |
|
||||||||||||||||||||
|
Retrieve the value associated with a name. The key value is returned blind, and all blinding operations for the client are performed in this method. If an application needs to keep the blinding factor for some reason, it should be straightforward to adapt this method.
Definition at line 370 of file Client.cc. References CODEX_Quorum::Message::buffer(), CODEX_Client::Client::contactServer(), CODEX_Client::Message::digest(), CODEX_Ciphers::RSAPublicKey::encrypt(), CODEX_Ciphers::ElGamalPublicKey::encryptS(), CODEX_Client::Client::getServiceKey(), CODEX_Quorum::Message::length(), CODEX_Client::SignedMessage< MT, ST >::message(), CODEX_Ciphers::RSAPublicKey::n(), CODEX_Client::ReadKeyMsg::name(), CODEX_Ciphers::ElGamalPublicKey::p(), CODEX_Ciphers::ElGamalPublicKey::q(), CODEX_Client::SignedMessage< MT, ST >::signature(), CODEX_Client::SignedMessage< MT, ST >::unmarshal(), CODEX_ASN1::OctetString::value(), CODEX_ASN1::BigNumber::value(), and CODEX_Ciphers::RSAPublicKey::verifySignature(). Referenced by CODEX_Client::Interface::codex_read_key(). |
|
||||||||||||
|
Set the client's RSA public/private key pair.
Definition at line 83 of file Client.cc. Referenced by CODEX_Client::Interface::codex_set_key_pair(). |
|
||||||||||||
|
Set the remote server.
Definition at line 59 of file Client.cc. Referenced by CODEX_Client::Interface::codex_set_server(). |
|
|
Writes the Client's state to a file. Only the key information is stored. The CODEX_Quorum::RemoteServer will still need to be set in subsequent sessions.
Definition at line 674 of file Client.cc. References CODEX_ASN1::BigNumber::marshal(), CODEX_Ciphers::ElGamalPublicKey::marshal(), CODEX_Ciphers::RSAPublicKey::marshal(), CODEX_Ciphers::RSAPrivateKey::marshal(), CODEX_ASN1::Certificate::marshal(), CODEX_ASN1::Integer::marshal(), and CODEX_ASN1::Integer::value(). Referenced by CODEX_Client::Interface::codex_to_file(). |
|
||||||||||||||||||||||||
1.4.1