⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xid_bfibe.h

📁 IBE是一种非对称密码技术
💻 H
字号:
/* 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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -