DG_InitMatrixOpts
初始化函数组。
DG_Matrix_Opts DG_InitMatrixOpts()
参数
无
名称 |
类型 |
说明 |
|---|---|---|
initTeeCtx |
函数指针 |
int (*initTeeCtx)(DG_Cfg dgCfg, DG_TeeCtx **dgTeeCtx); 初始化MPC对象 |
releaseTeeCtx |
函数指针 |
void (*releaseTeeCtx)(DG_TeeCtx **dgTeeCtx); 释放MPC对象 |
setTeeNodeInfos |
函数指针 |
int (*setTeeNodeInfos)(DG_TeeCtx *dgTeeCtx, struct TeeNodeInfos *teeNodeInfos); 设置所有节点信息 |
negotiateSeeds |
函数指针 |
int (*negotiateSeeds)(DG_TeeCtx *dgTeeCtx); 协商种子接口 |
calculate |
函数指针 |
int (*calculate)(DG_TeeCtx *dgTeeCtx, DG_AlgorithmsType type, DG_MpcShareSet *shareSet, DG_MpcShare **share); 执行矩阵类算子计算 |
makeShare |
函数指针 |
int (*makeShare)(DG_TeeCtx *dgTeeCtx, int isRecvShare, DG_TeeInput *input, DG_MpcShare **share); 分片功能 |
revealShare |
函数指针 |
int (*revealShare)(DG_TeeCtx *dgTeeCtx, DG_MpcShare *share, DG_TeeOutput **output); 还原功能 |
releaseShare |
函数指针 |
void (*releaseShare)(DG_MpcShare **share); 释放分片资源 |
releaseOutput |
函数指针 |
void (*releaseOutput)( DG_TeeMatOutput **output); 释放输出资源 |
返回值
DG_Matrix_Opts:矩阵类操作集合对象。
错误码
无
依赖
#include "data_guard_mpc.h" :该接口声明所在的头文件。
示例
#include "data_guard_mpc.h" DG_Matrix_Opts aritOpts = DG_InitMatrixOpts();
此函数为创建矩阵算术类算子的函数组,矩阵算术类算子的所有对外函数都在DG_Matrix_Opts中。