我要评分
获取效率
正确性
完整性
易理解

DG_InitMatrixOpts

Initializes the function group.

DG_Matrix_Opts DG_InitMatrixOpts()

Parameters

None.

Table 1 DG_Matrix_Opts structure

Member

Type

Description

initTeeCtx

Function pointer

int (*initTeeCtx)(DG_Cfg dgCfg, DG_TeeCtx **dgTeeCtx);

Initializes the MPC object.

releaseTeeCtx

Function pointer

void (*releaseTeeCtx)(DG_TeeCtx **dgTeeCtx);

Releases the MPC object.

setTeeNodeInfos

Function pointer

int (*setTeeNodeInfos)(DG_TeeCtx *dgTeeCtx, struct TeeNodeInfos *teeNodeInfos);

Sets the information about all nodes.

negotiateSeeds

Function pointer

int (*negotiateSeeds)(DG_TeeCtx *dgTeeCtx);

Negotiates seeds.

calculate

Function pointer

int (*calculate)(DG_TeeCtx *dgTeeCtx, DG_AlgorithmsType type, DG_MpcShareSet *shareSet, DG_MpcShare **share);

Performs calculations using a matrix operator.

makeShare

Function pointer

int (*makeShare)(DG_TeeCtx *dgTeeCtx, int isRecvShare, DG_TeeInput *input, DG_MpcShare **share);

Splits data into shares.

revealShare

Function pointer

int (*revealShare)(DG_TeeCtx *dgTeeCtx, DG_MpcShare *share, DG_TeeOutput **output);

Reveals shares.

releaseShare

Function pointer

void (*releaseShare)(DG_MpcShare **share);

Releases share resources.

releaseOutput

Function pointer

void (*releaseOutput)( DG_TeeMatOutput **output);

Releases output resources.

Return Values

DG_Matrix_Opts: matrix operation set object.

Error Codes

None.

Dependency

#include "data_guard_mpc.h": the header file where the API declaration is stored.

Example

#include  "data_guard_mpc.h" 
  
DG_Matrix_Opts aritOpts = DG_InitMatrixOpts();

This function initializes the function group for matrix arithmetic operators. The DG_Matrix_Opts includes all public functions for matrix arithmetic operators.