rsax931.h

来自「IBE是一种非对称密码技术」· C头文件 代码 · 共 79 行

H
79
字号
/* 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 + =
减小字号Ctrl + -
显示快捷键?