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

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

?? algid.h

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

#include "vibe.h"
#include "environment.h"
#include "base.h"
#include "libctx.h"
#include "derhelp.h"
#include "oidlist.h"

#ifndef _ALG_ID_H
#define _ALG_ID_H

#ifdef __cplusplus
extern "C" {
#endif

/* This is just VtGetAlgorithmFromBer, except it returns the index of
 * the chosen DerCoder as well.
 * <p>See vibe.h for a description of VtGetAlgorithmFromBer to
 * understand what this function does.
 */
int VOLT_CALLING_CONV VoltGetAlgorithmFromBer VOLT_PROTO_LIST ((
   VtLibCtx libraryCtx,
   unsigned char *encoding,
   unsigned int maxEncodingLen,
   VtDerCoder **DerCoders,
   unsigned int derCoderCount,
   unsigned int *algorithm,
   unsigned int *index
));

/* An AlgID is
 *    SEQUENCE {
 *      oid           OBJECT IDENTIFIER,
 *      parameters    ANY defined by oid }
 */

/* The OpenSSL template definitions.
 */
typedef struct
{
  Asn1ObjectId *oid;
  Asn1Encoded *params;
} Asn1AlgorithmId;

DECLARE_ASN1_FUNCTIONS (Asn1AlgorithmId)

/* These are the definitions for creating the encoding of CFB params
 * for a block cipher algID.
 */
typedef struct
{
  ASN1_OCTET_STRING *iv;
  ASN1_INTEGER *transfer;
} Asn1CFBParams;

DECLARE_ASN1_FUNCTIONS (Asn1CFBParams)

/* Create an algID encoding.
 *    SEQUENCE {
 *      oid           OBJECT IDENTIFIER,
 *      parameters    ANY defined by oid }
 * <p>If the params arg is NULL or the paramsLen arg is 0, and the
 * nullParams arg is 0, this function will place nothing into the
 * parameters portion of the AlgID.
 *   30 len
 *      06 len
 *         <OID>
 * <p>If the params arg is NULL or the paramsLen arg is 0, and the
 * nullParams arg is 5, this function will encode the params as
 * NULL: 05 00.
 *   30 len
 *      06 len
 *         <OID>
 *      05 00
 * <p>The routine will deposit the result into the caller-supplied
 * buffer (of size bufferSize bytes). It will then go to the address
 * given by algIdLen and deposit the length of the result string. If
 * the result buffer is not big enough, the routine will return the
 * "BufferTooSmall" error and set the algIdLen value to the required
 * space.
 *
 * @param libCtx The library context to use.
 * @param oid The OID to use (no 06 len).
 * @param oidLen The length, in bytes, of the OID.
 * @param params The params already encoded.
 * @param paramsLen The length, in bytes of the encoded params.
 * @params nullParams An int, if there are no params, this flag
 * indicates what to do, no params or NULL (05 00). If there are
 * params, this arg is ignored.
 * @param encoding The buffer into which this function will place the
 * algID.
 * @param bufferSize The size, in bytes, of the output buffer.
 * @param algIdLen The address where this function will deposit the
 * length of the algId, the number of bytes placed into the buffer.
 * @return an int, 0 if the function completed successfully or a
 * non-zero error code.
 */
int VOLT_CALLING_CONV VoltEncodeAlgId VOLT_PROTO_LIST ((
   VoltLibCtx *libCtx,
   unsigned char *oid,
   unsigned int oidLen,
   unsigned char *params,
   unsigned int paramsLen,
   unsigned int nullParams,
   unsigned char *algId,
   unsigned int bufferSize,
   unsigned int *algIdLen
));

/* Decode an algorithm ID. This function creates a new Asn1AlgorithmId
 * "object", it is the responsibility of the caller to destroy it (by
 * calling Asn1AlgorithmId_free).
 * <p>If the encoding is not an algID, this function returns the error
 * VT_ERROR_UNKNOWN_BER.
 *
 * @param libCtx The library context to use.
 * @param encoding The buffer containing the alleged algID.
 * @param maxEncodingLen The max number of bytes to decode.
 * @param algId The address where this function will deposit the
 * created Asn1AlgorithmId "object".
 * @return an int, 0 if the function completed successfully or a
 * non-zero error code.
 */
int VOLT_CALLING_CONV VoltDecodeAlgIdCreate VOLT_PROTO_LIST ((
   VoltLibCtx *libCtx,
   unsigned char *encoding,
   unsigned int maxEncodingLen,
   Asn1AlgorithmId **algId
));

/* This struct collects information about a block cipher for the algID
 * encoder or decoder.
 * The algorithm is the flag to return for VoltageGetAlgorithmFromBer.
 * It's used when the flag is VOLT_DER_TYPE_GET_ALG_FLAG. It is one of
 * the VT_ALG_ID_ #define's from volttk.h (e.g.
 * VT_ALG_ID_AES_128_CBC_PAD).
 */
typedef struct
{
  unsigned char *oid;
  unsigned int oidLen;
  unsigned int algorithm;
  unsigned int subAlg1;
  unsigned int subAlg2;
  VtAlgorithmImpl *algImpl;
  VtKeyParam *KeyParam;
} VoltBlockCipherAlgIdData;

/* Combine all Block Cipher DerCoder's into one call. This function is
 * the same as a regular DerCoder except the OID's are different. The
 * routine will know from the object what the algID params should be,
 * either none (ECB), and IV (OCTET STRING: CBC and OFB) or an IV and
 * transfer size (SEQUENCE { OCTET STRING, INTGER }: CFB).
 * <p>Note that this function is valid only for block cipher algorithms
 * that have no parameters other than the feedback params.
 *
 * @param flag The flag passed in by the external caller.
 * @param object The object passed in by the external caller.
 * @param info The info passed in by the external caller.
 * @param algIdData The data for the particular algorithm.
 * @return an int, 0 if the function completed successfully or a
 * non-zero error code.
 */
int VOLT_CALLING_CONV VoltDerCoderBlockCipher VOLT_PROTO_LIST ((
   unsigned int flag,
   Pointer object,
   VtDerCoderInfo *coderInfo,
   VoltBlockCipherAlgIdData *algIdData
));

/* Use this to pass info to a DerCoder when encoding.
 */
typedef struct
{
  VoltLibCtx *libCtx;
  Pointer info;
  unsigned char *encoding;
  unsigned int bufferSize;
  unsigned int *encodingLen;
} VoltDerCoderEncodeData;

/* Use this to pass info to a DerCoder when determining an algorithm.
 * The DerCoder will return 0 and set the unsigned int at the address
 * given by algorithm to the appropriate flag if there's a match. If
 * not, it will return VT_ERROR_UNKNOWN_BER.
 * A DerCoder will also deposit into this struct the KeyParam to use to
 * build a key for this algorithm, if the algorithm is a symmetric
 * cipher. If it's a digest or public key algorithm, the DerCoder will
 * set that field to NULL.
 * If the DerCoder is a symmetric algorithm, it will set the
 * SymKeyParam field to the KeyParam needed to build the key object.
 * Otherwise, it will set it to NULL.
 * If the DerCoder is a signature algorithm, it will set the DigestImpl
 * to the Impl needed to build a message digest object (this assumes
 * the associated info is NULL). Otherwise, it will set it to NULL.
 * The encodingType indicates whether the function that found the OID
 * found it inside an alg ID, a pub key, a private key, or params.
 */
typedef struct
{
  VoltLibCtx *libCtx;
  unsigned char *oid;
  unsigned int oidLen;
  unsigned int encodingType;
  unsigned int *algorithm;
  VtKeyParam *SymKeyParam;
  VtAlgorithmImpl *DigestImpl;
} VoltDerCoderGetAlgData;

/* These are th value encodingType can have. See algorithmid.c,
 * VtGetAlgorithmFromBer where they are used.
 */
#define VOLT_ENCODING_TYPE_ALG_ID   2
#define VOLT_ENCODING_TYPE_PARAMS   4
#define VOLT_ENCODING_TYPE_PUB_KEY  3
#define VOLT_ENCODING_TYPE_PRI_KEY  5

/* Use this struct to pass info to a DerCoder when decoding.
 * The type indicates that the info is for an AlgorithmID, public key
 * or private key. It is one of the following flags.
 *    VOLT_DER_TYPE_ALG_ID_FLAG
 *    VOLT_DER_TYPE_PUB_KEY_FLAG
 *    VOLT_DER_TYPE_PRI_KEY_FLAG
 * The asn1Object is the struct holding the decoded info, either
 * Asn1AlgorithmId, Asn1PrivateKeyInfo or Asn1SubjectPublicKey,
 * depending on the type.
 * The info is the data passed in by the caller to the SetKey or
 * SetObject function.
 */
typedef struct
{
  unsigned int type;
  Pointer asn1Object;
  Pointer info;
} VoltDerCoderDecodeData;

/* This struct is how info is passed to DerCoder's.
 */
typedef struct VtDerCoderInfoDef
{
  union
  {
    VoltDerCoderEncodeData encodeData;
    VoltDerCoderGetAlgData getAlgData;
    VoltDerCoderDecodeData decodeData;
  } info;
} VoltDerCoderInfo;

/*=========================================================*/
/*                                                         */
/* Some Fixed AlgID's                                      */
/*                                                         */
/*=========================================================*/

/* These defintions assume that lengths will be less than 0x7f. That's
 * a fairly safe assumption when it comes to OID's.
 */

/* An IBE Encrypt Alg ID will always be
 *    30 len
 *       06 len
 *          <IBE Encrypt OID>
 *       05 00
 */
#define VoltIBET1EncAlgIdSeqLen VoltIBET1EncOidBytesLen+4
#define VoltIBET1EncAlgIdOidOffset 4
#define VoltIBET1EncAlgIdBytes \
    0x30, VoltIBET1EncAlgIdSeqLen, 0x06, VoltIBET1EncOidBytesLen, \
      VoltIBET1EncOidBytes, 0x05, 0x00
#define VoltIBET1EncAlgIdBytesLen VoltIBET1EncAlgIdSeqLen+2

/* When there can be more than one IBE algID (BF and BB, for example),
 * then there is a max AlgID len.
 */
#define VoltMaxIBEAlgIDLen VoltIBET1EncAlgIdBytesLen

/* A DSA with SHA-1 Alg ID will always be
 *    30 len
 *       06 len
 *          <DSA sign OID>
 *
 * Note that there are no parameters, not even 05 00 (NULL). Various
 * standards (including RFC 2459 and RFC 3279), for some reason, have
 * explicitly specified no params.
 */
#define VoltDsaSHA1AlgIdSeqLen VoltDsaSHA1OidBytesLen+2
#define VoltDsaSHA1AlgIdOidOffset 4
#define VoltDsaSHA1AlgIdBytes \
    0x30, VoltDsaSHA1AlgIdSeqLen, 0x06, VoltDsaSHA1OidBytesLen, \
      VoltDsaSHA1OidBytes
#define VoltDsaSHA1AlgIdBytesLen VoltDsaSHA1AlgIdSeqLen+2

/* A SHA-1 Alg ID will always be
 *    30 len
 *       06 len
 *          <SHA-1 OID>
 *       05 00
 */
#define VoltSHA1AlgIdSeqLen VoltSHA1OidBytesLen+4
#define VoltSHA1AlgIdOidOffset 4
#define VoltSHA1AlgIdBytes \
      0x30, VoltSHA1AlgIdSeqLen, 0x06, VoltSHA1OidBytesLen, \
        VoltSHA1OidBytes, 0x05, 0x00
#define VoltSHA1AlgIdBytesLen VoltSHA1AlgIdSeqLen+2

/* An HMAC-SHA-1 Alg ID will always be
 *    30 len
 *       06 len
 *          <HMAC-SHA-1 OID>
 *       05 00
 */
#define VoltHMACSHA1AlgIdSeqLen VoltHMACSHA1OidBytesLen+4
#define VoltHMACSHA1AlgIdOidOffset 4
#define VoltHMACSHA1AlgIdBytes \
      0x30, VoltHMACSHA1AlgIdSeqLen, 0x06, VoltHMACSHA1OidBytesLen, \
        VoltHMACSHA1OidBytes, 0x05, 0x00
#define VoltHMACSHA1AlgIdBytesLen VoltHMACSHA1AlgIdSeqLen+2

/* A SHA-224 Alg ID will always be
 *    30 len
 *       06 len
 *          <SHA-224 OID>
 *       05 00
 */
#define VoltSHA224AlgIdSeqLen VoltSHA224OidBytesLen+4
#define VoltSHA224AlgIdOidOffset 4
#define VoltSHA224AlgIdBytes \
    0x30, VoltSHA224AlgIdSeqLen, 0x06, VoltSHA224OidBytesLen, \
      VoltSHA224OidBytes, 0x05, 0x00
#define VoltSHA224AlgIdBytesLen VoltSHA224AlgIdSeqLen+2

/* A SHA-256 Alg ID will always be
 *    30 len
 *       06 len
 *          <SHA-256 OID>
 *       05 00
 */
#define VoltSHA256AlgIdSeqLen VoltSHA256OidBytesLen+4
#define VoltSHA256AlgIdOidOffset 4
#define VoltSHA256AlgIdBytes \
    0x30, VoltSHA256AlgIdSeqLen, 0x06, VoltSHA256OidBytesLen, \
      VoltSHA256OidBytes, 0x05, 0x00
#define VoltSHA256AlgIdBytesLen VoltSHA256AlgIdSeqLen+2

/* A SHA-384 Alg ID will always be
 *    30 len
 *       06 len
 *          <SHA-384 OID>
 *       05 00
 */
#define VoltSHA384AlgIdSeqLen VoltSHA384OidBytesLen+4
#define VoltSHA384AlgIdOidOffset 4
#define VoltSHA384AlgIdBytes \
    0x30, VoltSHA384AlgIdSeqLen, 0x06, VoltSHA384OidBytesLen, \
      VoltSHA384OidBytes, 0x05, 0x00
#define VoltSHA384AlgIdBytesLen VoltSHA384AlgIdSeqLen+2

/* A SHA-512 Alg ID will always be
 *    30 len
 *       06 len
 *          <SHA-512 OID>
 *       05 00
 */
#define VoltSHA512AlgIdSeqLen VoltSHA512OidBytesLen+4
#define VoltSHA512AlgIdOidOffset 4
#define VoltSHA512AlgIdBytes \
    0x30, VoltSHA512AlgIdSeqLen, 0x06, VoltSHA512OidBytesLen, \
      VoltSHA512OidBytes, 0x05, 0x00
#define VoltSHA512AlgIdBytesLen VoltSHA512AlgIdSeqLen+2

/* An MD5 Alg ID will always be
 *    30 len
 *       06 len
 *          <MD5 OID>
 *       05 00
 */
#define VoltMD5AlgIdSeqLen VoltMD5OidBytesLen+4
#define VoltMD5AlgIdOidOffset 4
#define VoltMD5AlgIdBytes \
    0x30, VoltMD5AlgIdSeqLen, 0x06, VoltMD5OidBytesLen, \
      VoltMD5OidBytes, 0x05, 0x00
#define VoltMD5AlgIdBytesLen VoltMD5AlgIdSeqLen+2

/* An HMAC-MD5 Alg ID will always be
 *    30 len
 *       06 len
 *          <HMAC-MD5 OID>
 *       05 00
 */
#define VoltHMACMD5AlgIdSeqLen VoltHMACMD5OidBytesLen+4
#define VoltHMACMD5AlgIdOidOffset 4
#define VoltHMACMD5AlgIdBytes \
    0x30, VoltHMACMD5AlgIdSeqLen, 0x06, VoltHMACMD5OidBytesLen, \
      VoltHMACMD5OidBytes, 0x05, 0x00
#define VoltHMACMD5AlgIdBytesLen VoltHMACMD5AlgIdSeqLen+2

/* This #define needs to keep track of the largest symmetric cipher
 * algID the toolkit supports. For now it is AES-CFB. That AlgID will
 * be 36 bytes, but we'll make it 48 for now to be a little safe.
 */
#define VoltMaxSymAlgIDLen  48

/*=========================================================*/
/*                                                         */
/*                                                         */
/*                                                         */
/*=========================================================*/

#ifdef __cplusplus
}
#endif

#endif /* _ALG_ID_H */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲国产精品成人综合 | 91精品国产黑色紧身裤美女| 日av在线不卡| 亚洲日本在线天堂| 精品少妇一区二区三区在线播放| 91论坛在线播放| 国产真实乱偷精品视频免| 一卡二卡三卡日韩欧美| 国产午夜精品一区二区三区四区| 欧美午夜一区二区三区免费大片| 国产不卡视频一区| 久久99精品一区二区三区三区| 亚洲乱码国产乱码精品精98午夜| 国产日韩av一区二区| 欧美一区二区三区成人| 欧美视频在线播放| 色综合天天综合在线视频| 国产精品资源在线观看| 美女一区二区视频| 亚洲成av人片在线| 亚洲黄色小视频| 成人欧美一区二区三区黑人麻豆 | 中文字幕av一区二区三区免费看| 欧美一级xxx| 欧美日韩三级在线| 91福利在线播放| av成人免费在线观看| 国产精品一卡二卡在线观看| 精品无人码麻豆乱码1区2区 | 久久电影国产免费久久电影| 亚洲国产精品人人做人人爽| 亚洲欧美日韩国产综合| 国产亚洲欧美一区在线观看| 日韩欧美一区二区免费| 欧美一级欧美一级在线播放| 欧美男男青年gay1069videost| 91激情五月电影| 日本韩国欧美在线| 欧洲精品在线观看| 欧美性猛交xxxxxxxx| 欧美撒尿777hd撒尿| 欧美午夜一区二区| 欧美乱妇20p| 777a∨成人精品桃花网| 91精品国产全国免费观看| 欧美日韩精品一区二区在线播放| 欧美日韩国产高清一区二区三区| 欧美日韩成人激情| 日韩三级在线观看| 国产午夜亚洲精品羞羞网站| 亚洲欧洲美洲综合色网| 亚洲精品免费播放| 午夜在线成人av| 全国精品久久少妇| 国产乱国产乱300精品| av激情亚洲男人天堂| 色综合天天综合狠狠| 欧美性受极品xxxx喷水| 91精品国产欧美日韩| 精品电影一区二区三区| 中文字幕第一区二区| 亚洲男人的天堂在线观看| 婷婷成人综合网| 国产一区啦啦啦在线观看| 懂色一区二区三区免费观看| av中文字幕亚洲| 欧美偷拍一区二区| 精品久久五月天| 国产精品久久二区二区| 亚洲一区二区精品久久av| 日本不卡中文字幕| 国产91精品在线观看| 欧美色老头old∨ideo| 欧美一卡2卡3卡4卡| 中文字幕电影一区| 视频在线观看一区| 国产精品99久久久久久久vr| 91国内精品野花午夜精品| 日韩一区二区三区在线视频| 中文字幕欧美三区| 婷婷开心激情综合| 成人丝袜18视频在线观看| 欧美午夜一区二区| 国产亚洲美州欧州综合国| 亚洲综合一区二区精品导航| 国产乱淫av一区二区三区| 色欧美乱欧美15图片| 精品国产污网站| 一区二区在线看| 国产综合成人久久大片91| 色噜噜狠狠成人中文综合| 精品999久久久| 亚洲欧美日韩国产手机在线 | 色婷婷亚洲综合| 欧美精品一区二区久久久| 一区av在线播放| 粉嫩av一区二区三区| 欧美一级生活片| 亚洲最大成人综合| 波多野结衣亚洲| 欧美成人vr18sexvr| 一区二区三区欧美日韩| 国产91丝袜在线播放九色| 9191成人精品久久| 日韩毛片一二三区| 国产精品原创巨作av| 91麻豆精品国产91久久久久久| 中文字幕一区视频| 国产麻豆日韩欧美久久| 欧美一级久久久久久久大片| 亚洲精品美腿丝袜| 波多野结衣中文字幕一区 | 777久久久精品| 亚洲欧美经典视频| 成人免费毛片片v| www久久精品| 久久精品国内一区二区三区| 欧美三级午夜理伦三级中视频| 中文字幕在线一区免费| 国产成人精品www牛牛影视| 精品女同一区二区| 蜜臀av性久久久久蜜臀aⅴ四虎 | 国产一区二区三区免费观看| 欧美一区二区三区免费在线看| 亚洲欧美日本韩国| 91在线免费视频观看| 欧美国产激情一区二区三区蜜月 | 欧美亚洲动漫精品| 亚洲欧美日韩国产综合| 91在线免费播放| 亚洲日本va午夜在线电影| 不卡的av中国片| 亚洲手机成人高清视频| 色综合色综合色综合色综合色综合 | 99久久国产综合色|国产精品| 26uuu亚洲综合色| 国内成人精品2018免费看| 亚洲精品一线二线三线| 寂寞少妇一区二区三区| 久久午夜免费电影| 岛国一区二区在线观看| 国产精品麻豆欧美日韩ww| 粉嫩一区二区三区性色av| 国产精品高潮久久久久无| 97se亚洲国产综合自在线观| 亚洲日本va在线观看| 在线免费不卡视频| 五月婷婷激情综合网| 日韩亚洲国产中文字幕欧美| 久久黄色级2电影| 国产欧美视频一区二区| 91女人视频在线观看| 亚洲国产aⅴ成人精品无吗| 91精品综合久久久久久| 久久丁香综合五月国产三级网站| 久久久久久久性| voyeur盗摄精品| 亚洲成a人片在线观看中文| 91精品国产综合久久久久久| 韩国欧美国产一区| 自拍偷拍亚洲激情| 欧美日韩视频在线观看一区二区三区| 日韩av在线播放中文字幕| 久久久久久久久久看片| 91丨porny丨首页| 日本美女一区二区三区| 国产欧美日韩视频一区二区| 91麻豆自制传媒国产之光| 亚洲国产色一区| 久久久久青草大香线综合精品| 972aa.com艺术欧美| 午夜视频在线观看一区二区| 亚洲精品一区二区三区精华液| 成人高清在线视频| 婷婷中文字幕综合| 国产日韩欧美电影| 欧美日韩精品欧美日韩精品一 | 国产精品嫩草影院com| 欧美性猛片xxxx免费看久爱| 久久se精品一区二区| 亚洲色图欧美偷拍| 欧美成人综合网站| 色综合久久久网| 国产福利一区二区| 午夜在线成人av| 国产精品传媒入口麻豆| 欧美一级视频精品观看| 97久久久精品综合88久久| 免费成人在线观看| 最新日韩av在线| 久久久精品中文字幕麻豆发布| 欧美性大战久久| caoporm超碰国产精品| 精品亚洲免费视频| 亚洲高清视频中文字幕| 欧美激情一区二区三区在线| 欧美日韩国产天堂| 99精品国产热久久91蜜凸| 久久不见久久见免费视频1| 亚洲一区二区三区国产|