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

📄 rsax931.h

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

#include "vibecrypto.h"
#include "environment.h"
#include "base.h"
#include "libctx.h"
#include "algobj.h"
#include "pad.h"

#ifndef _RSA_X931_H
#define _RSA_X931_H

#ifdef __cplusplus
extern "C" {
#endif

/* These are the bytes to use in the padding scheme. Each digest
 * algorithm has its own value.
 */
#define VOLT_X931_DIGEST_BYTE_MD5      0
#define VOLT_X931_DIGEST_BYTE_SHA1     0x33
#define VOLT_X931_DIGEST_BYTE_SHA224   0x38
#define VOLT_X931_DIGEST_BYTE_SHA256   0x34
#define VOLT_X931_DIGEST_BYTE_SHA384   0x36
#define VOLT_X931_DIGEST_BYTE_SHA512   0x35

/* Implements VPad.
 */
int VOLT_CALLING_CONV X931Pad VOLT_PROTO_LIST ((
   VoltAlgorithmObject *obj,
   VtRandomObject random,
   Pointer padCtx,
   unsigned char *block,
   unsigned int inputLen,
   unsigned int blockSize
));

/* Implements VUnpad.
 */
int VOLT_CALLING_CONV X931Unpad VOLT_PROTO_LIST ((
   VoltAlgorithmObject *obj,
   Pointer padCtx,
   unsigned char *block,
   unsigned int blockSize,
   unsigned int *outputLen
));

/* Implements VSignData.
 */
int VOLT_CALLING_CONV X931RSASignData VOLT_PROTO_LIST ((
   VoltAlgorithmObject *obj,
   VoltKeyObject *key,
   VtRandomObject random,
   unsigned char *dataToSign,
   unsigned int dataToSignLen,
   unsigned char *signature,
   unsigned int *sigLen
));

/* Implements VVerifyData.
 */
int VOLT_CALLING_CONV X931RSAVerifyData VOLT_PROTO_LIST ((
   VoltAlgorithmObject *obj,
   VoltKeyObject *key,
   VtRandomObject random,
   unsigned char *dataToVerify,
   unsigned int dataToVerifyLen,
   unsigned char *signature,
   unsigned int sigLen,
   unsigned int *verifyResult
));

#ifdef __cplusplus
}
#endif

#endif /* _RSA_X931_H */

⌨️ 快捷键说明

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