亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ibe.h

?? IBE是一種非對稱密碼技術
?? H
?? 第 1 頁 / 共 2 頁
字號:
/* Copyright 2003-2006, Voltage Security, all rights reserved.
 */

#include "vibecrypto.h"
#include "environment.h"
#include "base.h"
#include "libctx.h"
#include "paramobj.h"
#include "algobj.h"
#include "keyobj.h"
#include "mpint.h"
#ifndef ICTK_EXPOSE_PARAM_STRUCT
#define ICTK_EXPOSE_PARAM_STRUCT
#endif
#include "ictk.h"
#include "xbn_z.h"

#ifndef _IBE_H
#define _IBE_H

#ifdef __cplusplus
extern "C" {
#endif

/* Set the object with the BF curve data given. It allocates and fills
 * in the contexts.
 * <p>This function will make no argument checks, it is the
 * responsibility of the caller to make no errors. The base point is
 * not allowed to be infinity.
 *
 * @param obj The algorithm object to set.
 * @param curveInfo Contains the curve parameters.
 * @return an int, 0 if the function completed successfully or a
 * non-zero error code.
 */
int VOLT_CALLING_CONV VoltSetIBECurve VOLT_PROTO_LIST ((
   VoltParameterObject *obj,
   VtBFType1IBECurveInfo *curveInfo
));

/* This is how a BF type 1 curve is stored internally.
 */
typedef struct
{
  VtBFType1IBECurveInfo curveData;
  bf_context_t *bfCtx;
} VoltBFType1IBECurve;

/* Set the object with the param data given. It allocates and fills in
 * the contexts.
 *
 * @param obj The algorithm object to set.
 * @param paramInfo Contains the parameters.
 * @return an int, 0 if the function completed successfully or a
 * non-zero error code.
 */
int VOLT_CALLING_CONV VoltSetIBEParams VOLT_PROTO_LIST ((
   VtParameterObject paramObj,
   VtBFType1IBEParamInfo *curveInfo
));

/* This is how BF type 1 params are stored internally.
 */
typedef struct
{
  VtBFType1IBEParamInfo   paramInfo;
  VtItem                  masterSecret;
  bf_context_t           *bfCtx;
} VoltBFType1IBEParams;

/* Set the object with the param data given. It allocates and fills in
 * the contexts.
 *
 * @param obj The algorithm object to set.
 * @param paramInfo Contains the parameters.
 * @return an int, 0 if the function completed successfully or a
 * non-zero error code.
 */
int VOLT_CALLING_CONV VoltSetBBParams VOLT_PROTO_LIST ((
   VtParameterObject paramObj,
   VtBBType1IBEParamInfo *paramInfo
));

/* This is how BB type 1 params are stored internally.
 * The secretStruct is for getting the master secrets out of an object.
 * The data is stored as three VtItems as part of a struct. However,
 * they will need to be returned as an Info struct. However, that Info
 * struct is defined in vibeserver.h.
 */
typedef struct
{
  VtBBType1IBEParamInfo  paramInfo;
  Pointer                secretStruct;
  VtItem                 masterSecretAlpha;
  VtItem                 masterSecretBeta;
  VtItem                 masterSecretGamma;
  bb1_context_t         *bbCtx;
} VoltBBType1IBEParams;

/* Implements VCopyParams.
 */
int VOLT_CALLING_CONV BFType1IBECopyCurve VOLT_PROTO_LIST ((
   Pointer sourceParamObj,
   Pointer destParamObj
));

/* Implements VCtxDestroy.
 */
void VOLT_CALLING_CONV BFType1IBECurveDataDestroy VOLT_PROTO_LIST ((
   Pointer obj,
   Pointer ctx
));

/* Implements VCopyParams.
 * <p>Note: This Copy routine does NOT copy the master secret.
 */
int VOLT_CALLING_CONV BFType1IBECopyParams VOLT_PROTO_LIST ((
   Pointer sourceParamObj,
   Pointer destParamObj
));

/* Implements VCopyParams.
 * <p>Note: This Copy routine does NOT copy the master secret.
 */
int VOLT_CALLING_CONV BBType1IBECopyParams VOLT_PROTO_LIST ((
   Pointer sourceParamObj,
   Pointer destParamObj
));

/* Implements VCtxDestroy.
 */
void VOLT_CALLING_CONV BFType1IBEParamDataDestroy VOLT_PROTO_LIST ((
   Pointer obj,
   Pointer ctx
));

/* Implements VCtxDestroy.
 */
void VOLT_CALLING_CONV BBType1IBEParamDataDestroy VOLT_PROTO_LIST ((
   Pointer paramObj,
   Pointer ctx
));

/* This is just like a VtKeyParam, except it takes an algorithm arg.
 * <p>VtKeyParamBFType1IBEPublic and VtKeyParamBBType1IBEPublic call
 * this subroutine to do the work. The only difference is which
 * algorithm the params must be (VOLT_PARAM_ALG_IBE_TYPE_1 or
 * VOLT_PARAM_ALG_BB_TYPE_1) and the key must be
 * (VOLT_KEY_ALG_IBE_TYPE_1 or VOLT_KEY_ALG_BB_TYPE_1).
 * <p>Pass VOLT_KEY_ALG_IBE_TYPE_1 or VOLT_KEY_ALG_BB_TYPE_1 for the
 * algorithm argument.
 */
int VOLT_CALLING_CONV VoltKeyParamIBEPublic VOLT_PROTO_LIST ((
   VtKeyObject object,
   Pointer info,
   unsigned int flag,
   unsigned int algorithm
));

typedef VtBFType1IBEPubKeyInfo VoltBFType1IBEPubKeyData;
typedef VoltBFType1IBEPubKeyData VoltBBType1IBEPubKeyData;

/* The primeLen field is the length, in bytes, of the prime.
 */
typedef struct
{
  unsigned int            primeLen;
  VtBFType1IBEPriKeyInfo  bfKeyInfo;
  VtBBType1IBEPriKeyInfo  bbKeyInfo;
} VoltIBEPriKeyData;

/*
 */
typedef struct
{
  VtItem         encodedId;
  VtItem         privateValue;
  VtItem         processedData;
  bf_context_t  *bfCtx;
} VoltBFType1IBECtx;

/*
 */
typedef struct
{
  VtItem          encodedId;
  VtItem          privateValue;
  VtItem          processedData;
  bb1_context_t  *bbCtx;
} VoltBBType1IBECtx;

/* Check the contents of the curveInfo to see if the values are valid,
 * if the sizes or other attributes are supported.
 *
 * @param libCtx The libCtx to use if one is needed.
 * @param curveInfo The input curve to check.
 * @return an int, 0 if the function completed successfully or a
 * non-zero error code.
 */
int VOLT_CALLING_CONV VoltCheckCurve VOLT_PROTO_LIST ((
   VoltLibCtx *libCtx,
   VtBFType1IBECurveInfo *curveInfo
));

/* Check the contents of the paramInfo to see if the values are valid,
 * if the sizes or other attributes are supported.
 *
 * @param libCtx The libCtx to use if one is needed.
 * @param paramInfo The input curve to check.
 * @return an int, 0 if the function completed successfully or a
 * non-zero error code.
 */
int VOLT_CALLING_CONV VoltCheckParams VOLT_PROTO_LIST ((
   VoltLibCtx *libCtx,
   VtBFType1IBEParamInfo *paramInfo
));

/* Check the contents of the paramInfo to see if the values are valid
 * BB params. It checks to see if the sizes or other attributes are
 * supported.
 *
 * @param libCtx The libCtx to use if one is needed.
 * @param paramInfo The input params to check.
 * @return an int, 0 if the function completed successfully or a
 * non-zero error code.
 */
int VOLT_CALLING_CONV VoltCheckBBParams VOLT_PROTO_LIST ((
   VoltLibCtx *libCtx,
   VtBBType1IBEParamInfo *paramInfo
));

/* Return a bfCtx using the supplied curve and public point.
 * <p>Pass in a NULL for the public point if it is not available. If
 * the routine does not have a public point, it will use the base point
 * as a "filler" or "placeholder".
 * <p>The caller passes in an address where this function will deposit
 * a bfCtx.
 * <p>In the curve and pubPointP, if a y-coordinate is NULL, the
 * function assumes the x-coordinate is set with the first byte
 * indicating the y-bit.
 * <p>You must pass in a valid curve. This function will not check the
 * validity of the curve. The curve arg cannot be NULL.
 * <p>You should pass a public point and the x-coordinates of all
 * points to get a "correct" bfCtx. If you don't have one of those
 * values, the function will return a bfCtx, but you should not use it
 * to do encryption or decryption. Use it to find, for example, the
 * x-coordinate.
 * <p>That is, if you pass a NULL pubPointP, the function will still
 * build a bfCtx so you can do work, but it will not be a "correct"
 * bfCtx.
 * <p>Also, if one or more of the points you pass does not contain the
 * x-coordinate, the function will still build a bfCtx so you can do
 * work, but it will not be a "correct" bfCtx. For example, use the
 * returned bfCtx to determine the x-coordinate from the y-coordinate.
 *
 * @param libCtx The library context to use.
 * @param mpCtx The MpIntCtx to use for IBE math.
 * @param curve Contains the prime, subprime and base point.
 * @param pubPointP The public point, if available, NULL if not.
 * @param bfCtx The address where the routine will deposit the bfCtx.
 * @return an int, 0 if the function completed successfully or a
 * non-zero error code.
 */
int VOLT_CALLING_CONV VoltGetBfCtxFromIBEParams VOLT_PROTO_LIST ((
   VoltLibCtx *libCtx,
   VtMpIntCtx mpCtx,
   VtBFType1IBECurveInfo *curve,
   VtBFType1IBEPoint *pubPointP,
   unsigned int accelCount,
   unsigned char *accelTable,
   bf_context_t **bfCtx
));

/* This call will either release the ctx from the cache or it will
 * destroy it (bfDel).
 *
 * @param libCtx The libCtx to use.
 * @param bfCtx The address where the function will find the ctx to
 * release.
 * @return none.
 */
void VOLT_CALLING_CONV VoltReleaseBfCtx VOLT_PROTO_LIST ((
   VoltLibCtx *libCtx,
   bf_context_t **bfCtx
));

/* Return a bbCtx using the supplied params (prime, etc. including the
 * three public points).
 * <p>If the public points are NULL, the function will use "fake"
 * points as place holders. This will be useful if finding x
 * coordinates from y or vice versa.
 * <p>The caller passes in an address where this function will deposit
 * a bbCtx.
 * <p>In points, if a y-coordinate is NULL, the function assumes the
 * x-coordinate is set with the first byte indicating the y-bit.
 * <p>You must pass in a valid curve (prime, subprime, base point).
 * This function will not check the validity of the curve.
 * <p>You should pass the real public points and the x-coordinates of
 * all points to get a "correct" bbCtx. If you don't have one of those
 * values, the function will return a bbCtx, but you should not use it
 * to do encryption or decryption. Use it to find, for example, the
 * x-coordinate.
 * <p>That is, if you pass a NULL pubPointAlpha, the function will
 * still build a bbCtx so you can do work, but it will not be a
 * "correct" bbCtx.
 * <p>Also, if one or more of the points you pass does not contain the
 * x-coordinate, the function will still build a bbCtx so you can do
 * work, but it will not be a "correct" bbCtx. For example, use the
 * returned bbCtx to determine the x-coordinate from the y-coordinate.
 * <p>A caller might already have the acceleration tables built. If so,
 * there's no need to rebuild them. If accelG, accelG1, and accelG3 are
 * not NULL, each must contain accelCount points (each point consists
 * of 2 primeLen values). This function does no argument checking, so
 * the caller must not make a mistake.
 * <p>Of course, if accelG, accelG1, and accelG3 are NULL, the function
 * will build the acceleration tables.
 *
 * @param libCtx The library context to use.
 * @param mpCtx The MpIntCtx to use for IBE math.
 * @param paramInfo Contains the prime, subprime, base point, etc.
 * @param accelCount How many points are in each acceleration table.
 * @param accelG
 * @param accelG1
 * @param accelG3
 * @param bbCtx The address where the routine will deposit the bbCtx.
 * @return an int, 0 if the function completed successfully or a
 * non-zero error code.
 */
int VOLT_CALLING_CONV VoltGetBbCtxFromIBEParams VOLT_PROTO_LIST ((
   VoltLibCtx *libCtx,
   VtMpIntCtx mpCtx,
   VtBBType1IBEParamInfo *paramInfo,
   unsigned int accelCount,
   unsigned char *accelG,
   unsigned char *accelG1,
   unsigned char *accelG3,
   bb1_context_t **bbCtx
));

/* This call will either release the ctx from the cache or it will
 * destroy it (bb1Del).
 *
 * @param libCtx The libCtx to use.
 * @param bbCtx The address where the function will find the ctx to
 * release.
 * @return none.
 */
void VOLT_CALLING_CONV VoltReleaseBbCtx VOLT_PROTO_LIST ((
   VoltLibCtx *libCtx,
   bb1_context_t **bbCtx
));

/* This function extracts the BB IBE params (prime, subprime,
 * basePoint, etc.) from a bb1_context_t (bbCtx) and puts them into
 * VtBBType1IBEParamInfo format.
 * <p>If you call this function, you must call DemolishBBIBEParams.
 *
 * @param libCtx The library context to use.
 * @param bfCtx The bfCtx containing the IBE information.
 * @param theParams The address where this routine will deposit a
 * pointer to the built ibeParams struct.
 * @return an int, 0 if the function completed successfully or a
 * non-zero error code.
 */
int VOLT_CALLING_CONV VoltBuildIBEParamsFromBbCtx VOLT_PROTO_LIST ((
   VoltLibCtx *libCtx,
   bb1_context_t *bbCtx,
   VtBBType1IBEParamInfo **theParams
));

/* Demolish the BB ibeParams struct that was built by the

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品国产精品国产专区不片| 国产99精品国产| 一区二区三区四区不卡在线| 精品成人一区二区三区四区| 在线电影院国产精品| 91亚洲精品久久久蜜桃网站 | 亚洲人精品午夜| 国产女同性恋一区二区| 亚洲国产高清在线观看视频| 国产精品电影一区二区| 国产精品久久久久久亚洲伦| 18欧美乱大交hd1984| 国产精品第13页| 亚洲男帅同性gay1069| 亚洲欧美国产三级| 亚洲综合色区另类av| 婷婷开心久久网| 国产麻豆视频一区二区| aaa欧美色吧激情视频| 99久久精品免费看国产免费软件| 色婷婷综合激情| 欧美四级电影网| 国产亚洲欧美一区在线观看| 日韩理论片一区二区| 日韩精品电影在线观看| 国产东北露脸精品视频| 在线观看91视频| 欧美videofree性高清杂交| 国产精品成人在线观看| 日韩av二区在线播放| 国产成人在线视频网站| 欧美日韩一区高清| 国产精品久久午夜夜伦鲁鲁| 亚洲va国产天堂va久久en| 国产精品一区二区在线看| 欧美又粗又大又爽| 久久综合狠狠综合久久综合88| 中文字幕亚洲一区二区va在线| 日本美女一区二区| 国产超碰在线一区| 日韩三级视频在线观看| 国产精品不卡一区二区三区| 久久电影网电视剧免费观看| 欧美在线观看视频在线| 国产午夜精品久久久久久免费视 | 亚洲欧美偷拍卡通变态| 美女性感视频久久| 在线看国产一区二区| 国产视频亚洲色图| 免费成人美女在线观看| hitomi一区二区三区精品| 日韩午夜激情电影| 亚洲色图视频网站| 久久精品国产网站| 欧美日韩国产bt| 一区二区三区免费观看| 成人动漫一区二区三区| 久久你懂得1024| 久久精品国产99国产| 色婷婷综合久久久中文字幕| 国产精品国产三级国产有无不卡 | 亚洲高清在线视频| 99精品国产热久久91蜜凸| 久久精品欧美日韩| 国产一区二区免费视频| 日韩一区二区在线观看| 手机精品视频在线观看| 国产一区二区三区四区在线观看 | 中文字幕第一页久久| 国产在线麻豆精品观看| 精品国精品国产尤物美女| 极品尤物av久久免费看| 欧美一区二区视频观看视频| 日本网站在线观看一区二区三区| 欧美三级日韩三级| 婷婷六月综合网| 宅男在线国产精品| 亚洲国产成人av网| 欧美性大战久久久久久久蜜臀| 中文字幕亚洲欧美在线不卡| av一本久道久久综合久久鬼色| 国产精品久久福利| 91视频在线看| 亚洲国产裸拍裸体视频在线观看乱了 | 亚洲视频资源在线| 色中色一区二区| 亚洲国产毛片aaaaa无费看| 9191久久久久久久久久久| 美国毛片一区二区| 亚洲国产精品精华液2区45| 99免费精品在线| 亚洲电影一区二区三区| 精品久久久久久综合日本欧美| 国产一区二区在线影院| 中文字幕一区二区三区四区不卡 | 色综合久久久久综合99| 五月婷婷激情综合网| 日韩免费高清视频| 成人午夜碰碰视频| 亚洲男人的天堂av| 91麻豆精品国产91久久久使用方法 | 678五月天丁香亚洲综合网| 久久精品理论片| 最新不卡av在线| 777久久久精品| 国产91综合网| 亚洲色图视频网| 91精品久久久久久蜜臀| 成人aaaa免费全部观看| 午夜精品一区二区三区免费视频| 久久综合久久鬼色| 色国产精品一区在线观看| 久久er精品视频| 亚洲乱码中文字幕综合| 久久综合久久综合久久| 欧美午夜电影网| 成人精品小蝌蚪| 久久激五月天综合精品| 亚洲人精品午夜| 久久久国产午夜精品| 欧美精三区欧美精三区| 91原创在线视频| 国产综合久久久久久久久久久久| 亚洲一区二区三区四区五区中文 | 午夜久久久久久电影| 中文字幕欧美日本乱码一线二线| 欧美精品一二三四| 色婷婷久久综合| 成人av在线资源网站| 亚洲第一久久影院| 亚洲国产精品成人综合色在线婷婷 | 三级精品在线观看| 亚洲欧美一区二区不卡| 欧美国产日韩亚洲一区| 精品99999| 日韩欧美国产麻豆| 51午夜精品国产| 色狠狠色噜噜噜综合网| 国产不卡在线一区| 国产一区二区在线看| 欧美bbbbb| 免费黄网站欧美| 日本va欧美va精品发布| 秋霞国产午夜精品免费视频| 一区二区免费在线播放| 亚洲综合色区另类av| 一区二区三区日韩欧美精品| 亚洲图片欧美激情| 中文字幕中文字幕一区| 国产精品伦理一区二区| 国产精品天干天干在观线| 国产农村妇女毛片精品久久麻豆 | 日本欧美一区二区三区| 日韩电影在线一区二区| 日本视频一区二区三区| 美国一区二区三区在线播放| 美国十次综合导航| 国产乱国产乱300精品| 久久99国产乱子伦精品免费| 国内偷窥港台综合视频在线播放| 麻豆91在线播放| 国产精品99久久久久久有的能看| 国产精品一区在线观看乱码| 成人网在线播放| www.在线成人| 欧美性受xxxx黑人xyx| 欧美日韩一本到| 91精品国产色综合久久ai换脸| 91精品国产一区二区三区香蕉| 日韩亚洲欧美成人一区| 国产调教视频一区| 一二三区精品视频| 免费观看91视频大全| 国产成人福利片| 91女神在线视频| 欧美一区二区播放| 国产精品伦理一区二区| 亚洲一级二级三级在线免费观看| 天天av天天翘天天综合网| 国产一区二区美女诱惑| 99在线精品观看| 欧美一二三区在线| 国产精品素人视频| 日韩中文字幕麻豆| 国产成人亚洲综合a∨猫咪| 色综合久久九月婷婷色综合| 欧美一区二区三区在线视频 | 亚洲v日本v欧美v久久精品| 国产在线视频一区二区| 91黄色小视频| 久久久久久久久久电影| 亚洲视频你懂的| 精一区二区三区| 91香蕉视频污在线| 久久伊99综合婷婷久久伊| 亚洲男人的天堂网| 激情欧美一区二区| 69堂成人精品免费视频| 日韩毛片精品高清免费| 国产精品一品视频|