xid_bfibe.h
来自「IBE是一种非对称密码技术」· C头文件 代码 · 共 91 行
H
91 行
/* Copyright 2003-2006, Voltage Security, all rights reserved.
*/
#include "ictk.h"
#include "xid_bfcore.h"
#ifndef XID_BFIBE_H
#define XID_BFIBE_H
#ifdef __cplusplus
extern "C" {
#endif
typedef struct
{
unsigned int sz;
char *buf;
bf_context_t *bf;
} ibemsg_s;
typedef struct
{
pt1_t *U;
char *V;
unsigned int Vsz;
char *W;
unsigned int Wsz;
bf_context_t *bf;
} ibeciph_s;
typedef ibemsg_s ibemsg_t;
typedef ibeciph_s ibeciph_t;
/* Build the ibemsg_t shell along with a buffer to hold dat.
* If dat is NULL, create the buffer of size sz, but initialize it to
* all zeroes.
*/
int ibemsgNew (
ibemsg_t **newIbemsg,
unsigned char *dat,
unsigned int sz,
bf_context_t *bf
);
void ibemsgDel (
ibemsg_t *ibemsg
);
int ibeciphNew (
ibeciph_t **newIbeciph,
unsigned int Vsz,
unsigned int Wsz,
bf_context_t *bf
);
void ibeciphDel (
ibeciph_t *ibeciph
);
/* BF IBE Encrypt
*/
int xidBFibeEncrypt (
ibemsg_t *msg,
publ_t *publ,
common_t *common,
ibeciph_t **ibeciph,
VoltSurrenderCtx *surrCtx,
unsigned int surrFlag,
unsigned int *callNumber,
VtRandomObject userRandom
);
/* BF IBE Decrypt
*/
int xidBFibeDecrypt (
ibeciph_t *ciph,
priv_t *priv,
common_t *common,
ibemsg_t **ibemsg,
VoltSurrenderCtx *surrCtx,
unsigned int surrFlag,
unsigned int *callNumber
);
#ifdef __cplusplus
}
#endif
#endif // XID_BFIBE_H
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?