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

📄 icparams.h

📁 IBE是一种非对称密码技术
💻 H
字号:
/* Copyright 2003-2006, Voltage Security, all rights reserved.
 */

#include "vibe.h"
#include "environment.h"
#include "base.h"
#include "libctx.h"
#include "stringutil.h"

#ifndef _IC_PARAMS_H_
#define _IC_PARAMS_H_

#include <openssl/asn1.h>
#include <openssl/asn1t.h>

#ifdef __cplusplus
extern "C" {
#endif

typedef struct field_id_s {
	ASN1_OBJECT			*fieldType;
	ASN1_INTEGER		*p;
} FIELD_ID;

typedef struct curve_s {
	ASN1_OBJECT			*type;
	ASN1_OCTET_STRING	*a;
	ASN1_OCTET_STRING	*b;
	ASN1_BIT_STRING		*seed;
} CURVE;

typedef struct ec_parameters_s {
	ASN1_INTEGER		*version;
	FIELD_ID			*fieldID;
	CURVE				*curve;
	ASN1_OCTET_STRING	*base;
	ASN1_INTEGER		*order;
	ASN1_INTEGER		*cofactor;
} EC_PARAMETERS;

typedef struct ic_usage_params_s {
	ASN1_OBJECT			*usage;
	ASN1_OCTET_STRING	*reference;
	EC_PARAMETERS		*ecParams;
} IC_USAGE_PARAMS;

typedef struct
{
  ASN1_TIME *notBefore;
  ASN1_TIME *notAfter;
} Asn1X509Validity;

DECLARE_ASN1_FUNCTIONS(Asn1X509Validity)

typedef struct ic_public_parameters_s {
	ASN1_INTEGER				*version;
	ASN1_OCTET_STRING			*defReference;
	EC_PARAMETERS				*defECParams;
	STACK_OF(IC_USAGE_PARAMS)	*usageParams;
  Asn1X509Validity *validity;
  STACK_OF(Asn1X509Extension) *extensions;
} icPublicParameters;

typedef STACK_OF(ASN1_OBJECT) SUPPORTED_KEY_SCHEMAS;

DECLARE_ASN1_FUNCTIONS(FIELD_ID)
DECLARE_ASN1_FUNCTIONS(CURVE)
DECLARE_ASN1_FUNCTIONS(EC_PARAMETERS)
DECLARE_ASN1_FUNCTIONS(IC_USAGE_PARAMS)
DECLARE_ASN1_FUNCTIONS(icPublicParameters)
DECLARE_ASN1_FUNCTIONS(SUPPORTED_KEY_SCHEMAS)

DECLARE_STACK_OF(IC_USAGE_PARAMS)

#define IC_PARAMS_URL_DEFAULT	"%s%s/params/%s.pem"
#define IC_PARAMS_URL			"%s%s/params/%s.pem"

#ifdef __cplusplus
}
#endif

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -