Wiselib
wiselib.testing/algorithms/privacy/code_pc/src/header/utie.h
Go to the documentation of this file.
00001 /* 
00002  * File:   utie.h
00003  * Author: angelo
00004  *
00005  * Created on May 19, 2009, 9:44 AM
00006  */
00007 
00008 #ifndef _UTIE_H
00009 #define  _UTIE_H
00010 
00011 #include <pbc.h>
00012 #include <pbc_time.h>
00013 #include <stdio.h>
00014 #include <stdlib.h>
00015 #include <assert.h>
00016 #include "common.h"
00017 #include "utma_weak.h"
00018 
00019 #ifdef   __cplusplus
00020 extern "C" {
00021 #endif
00022 
00023     typedef struct {
00024         element_t a_1;
00025         element_t a_2;
00026         element_t a_3;
00027         element_t a_4;
00028         element_t a_5;
00029 
00030         element_t c_1;
00031         element_t c_2;
00032     } IECypherText;
00033 
00034     typedef struct {
00035           pairing_t pairing;
00036           element_t g_1;
00037           element_t g_2;
00038       } IEPub;
00039 
00040     typedef struct {
00041         element_t s;
00042         element_t t;
00043     } CASK;
00044 
00045     typedef struct {
00046         element_t S;
00047         element_t T;
00048         IECypherText *C;
00049     } CAPK;
00050 
00051     typedef struct {
00052         CASK cask;
00053         CAPK capk;
00054     } CAKey;
00055 
00056     typedef struct {
00057         element_t x;
00058     } IssuerSK;
00059 
00060     typedef struct {
00061         element_t y;
00062     } IssuerPK;
00063 
00064     typedef struct {
00065         IssuerSK sk;
00066         IssuerPK pk;
00067     } IssuerKey;
00068 
00069     typedef struct {
00070         element_t a_1;
00071         element_t a_2;
00072         element_t a_3;
00073         element_t a_4;
00074         element_t a_5;
00075     } PublicKeyCertificate;
00076 
00077 
00078     IEPub* GenIEPub(pairing_t *pairing);
00079 
00080     CAKey* GenerateCAKey(IEPub *pub);
00081 
00082     IssuerKey* GenerateKey(IEPub* pub);
00083 
00084     PublicKeyCertificate* RegisterPublicKey(IEPub* pub, CAKey* cakey, IssuerKey* issuerKey);
00085 
00086     IECypherText* InitTag(IEPub *pub, IssuerPK *issuerPk, PublicKeyCertificate *certificate, PlainText *pt);
00087 
00088     IECypherText* IERandomize(IEPub *pub, CAKey *cakey, IECypherText* ct);
00089 
00090     PlainText* ReadAndDecrypt(IEPub *pub, CAKey *cakey, IssuerSK *issuerSk, IECypherText* ct);
00091 
00092     int VerifyCertificate(IEPub *pub, CAKey *cakey, IECypherText* ct);
00093 
00094 
00095 #ifdef   __cplusplus
00096 }
00097 #endif
00098 
00099 #endif   /* _UTIE_H */
00100 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines