Get desktop application:
View/edit binary Protocol Buffers messages
Used in:
disable the ciphertext packing for matmul
allow least significant bits error for point-wise mul
Setup for cheetah ot
Used in:
Used in:
Certificate in PEM format, supported both file path and raw string
Private key in PEM format, supported both file path and raw string based on prefix
The trusted CA file to verify the peer's certificate If empty, use the system default CA files
Maximum depth of the certificate chain for verification If 0, turn off the verification
Input IR type
IR
Input visibilities
Pretty print
Disable sqrt(x) + eps to sqrt(x+eps) rewrite
Disable x/sqrt(y) to x*rsqrt(y) rewrite
Disable reduce truncation optimization
Disable maxpooling optimization
Disallow mix type operations
Disable SelectOp optimization
Enable optimize x/bcast(y) -> x * bcast(1/y)
Disable deallocation insertion pass
Disable sort->topk rewrite when only partial sort is required
The SPU datatype
Used in:
1bit integer (bool).
int8
uint8
int16
uint16
int32
uint32
int64
uint64
half
float
double
The executable format accepted by SPU runtime. - Inputs should be prepared before running executable. - Output is maintained after execution, and can be fetched by output name. ```python rt = spu.Runtime(...) # create an spu runtime. rt.set_var('x', ...) # set variable to the runtime. exe = spu.ExecutableProto( # prepare the executable. name = 'balabala', input_names = ['x'], output_names = ['y'], code = ...) rt.run(exe) # run the executable. y = rt.get_var('y') # get the executable from spu runtime. ```
The name of the executable.
The input names.
The output names.
The bytecode of the program, with format IR_MLIR_SPU.
A security parameter type. The secure evaluation is based on some algebraic structure (ring or field),
Used in:
Ring 2^32
Ring 2^64
Ring 2^128
The protocol kind.
Used in:
Invalid protocol.
The reference implementation in `ring^2k`, note: this 'protocol' only behave-like a fixed point secure protocol without any security guarantee. Hence, it should only be selected for debugging purposes.
A semi-honest multi-party protocol. This protocol requires a trusted third party to generate the offline correlated randoms. Currently, SecretFlow by default ships this protocol with a trusted first party. Hence, it should only be used for debugging purposes.
A honest majority 3PC-protocol. SecretFlow provides the semi-honest implementation without Yao.
The famous [Cheetah](https://eprint.iacr.org/2022/207) protocol, a very fast 2PC protocol.
A semi-honest 3PC-protocol for Neural Network, P2 as the helper, (https://eprint.iacr.org/2018/442)
Plaintext type SPU runtime does not process with plaintext directly, plaintext type is mainly used for IO purposes, when converting a plaintext buffer to an SPU buffer, we have to let spu know which type the plaintext buffer is.
int8_t
uint8_t
int16_t
uint16_t
int32_t
uint32_t
int64_t
uint64_t
int128_t
uint128_t
bool
half
float
double
complex float
complex double
The SPU runtime configuration.
The protocol kind.
The field type.
Number of fraction bits of fixed-point number. 0(default) indicates implementation defined.
Max number of cores
When enabled, runtime prints verbose info of the call stack, debug purpose only.
When enabled, runtime checks runtime type infos against the compile-time ones, exceptions are raised if mismatches happen. Note: Runtime outputs prefer runtime type infos even when flag is on.
When enabled, runtime prints executed pphlo list, debug purpose only.
When enabled, runtime dumps executed executables in the dump_dir, debug purpose only.
When enabled, runtime records detailed pphlo timing data, debug purpose only. WARNING: the `send bytes` information is only accurate when `experimental_enable_inter_op_par` and `experimental_enable_intra_op_par` options are disabled.
When enabled, runtime records detailed hal timing data, debug purpose only. WARNING: the `send bytes` information is only accurate when `experimental_enable_inter_op_par` and `experimental_enable_intra_op_par` options are disabled.
The public random variable generated by the runtime, the concrete prg function is implementation defined. Note: this seed only applies to `public variable` only, it has nothing to do with security.
max chunk size for Value::toProto default: 128 * 1024 * 1024
SPU supports multiple sorting algorithms. -for 2pc, only sorting network is supported. -for 2.5pc or 3pc, all these algorithms are supported. -for stable sort, only radix sort is supported.
threshold for quick sort, when the size of the array is less than this value, use merge sort instead
The iterations use in f_div with Goldschmidt method. 0(default) indicates implementation defined.
The exponent approximation method.
Number of iterations of `exp` approximation, 0(default) indicates impl defined.
The logarithm approximation method.
Number of iterations of `log` approximation, 0(default) indicates impl-defined.
Number of orders of `log` approximation, 0(default) indicates impl defined.
The sigmoid function approximation model.
Enable a simpler rsqrt approximation
Sine/Cosine approximation iterations
beaver config, works for semi2k and spdz2k for now.
TrustedThirdParty configs.
Cheetah 2PC configs.
For protocol like SecureML, the most significant bit may have error with low probability, which lead to huge calculation error.
Experimental: DO NOT USE
Inter op parallel, aka, DAG level parallel.
Intra op parallel, aka, hal/mpc level parallel.
Disable kernel level vectorization.
Inter op concurrency.
Enable use of private type
enable experimental exp prime method
The offset parameter for exp prime methods. control the valid range of exp prime method. valid range is: ((47 - offset - 2fxp)/log_2(e), (125 - 2fxp - offset)/log_2(e)) clamp to value would be lower bound: (48 - offset - 2fxp)/log_2(e) higher bound: (124 - 2fxp - offset)/log_2(e) default offset is 13, 0 offset is not supported.
whether to apply the clamping lower bound default to enable it
whether to apply the clamping upper bound default to disable it
Used in:
Assume first party (rank0) as trusted party to generate beaver triple. WARNING: It is NOT SAFE and SHOULD NOT BE used in production.
Generate beaver triple through an additional trusted third party.
Generate beaver triple through multi-party.
The exponential approximation method.
Used in:
Implementation defined.
The pade approximation.
Taylor series approximation.
exp prime only available for some implementations
The logarithm approximation method.
Used in:
Implementation defined.
The pade approximation.
The newton approximation.
The minmax approximation.
The sigmoid approximation method.
Used in:
Implementation defined.
Minmax approximation one order. f(x) = 0.5 + 0.125 * x
Piece-wise simulation. f(x) = 0.5 + 0.125x if -4 <= x <= 4 1 if x > 4 0 if -4 > x
The real definition, which depends on exp's accuracy. f(x) = 1 / (1 + exp(-x))
Used in:
Implementation defined.
The radix sort (stable sort, need efficient shuffle).
The quick sort (unstable, need efficient shuffle).
The odd-even sorting network (unstable, most general).
@exclude The shape information.
Used in:
//////////////////////////////////////////////////////////////////////// Compiler relate definition ////////////////////////////////////////////////////////////////////////
Used in:
Used in:
TrustedThirdParty beaver server's remote ip:port or load-balance uri.
which rank do adjust rpc call, usually choose the rank closer to the server.
asym_crypto_schema: support ["SM2"] Will support 25519 in the future, after yacl supported it.
Server's public key in PEM format
Transport protocol, support ["http", "h2"]
Configurations related to SSL
The spu Value proto, used for spu value serialization.
chunk info
chunk bytes
The data type.
The data visibility.
The shape of the value.
The storage type, defined by the underline evaluation engine. i.e. `aby3.AShr<FM64>` means an aby3 arithmetic share in FM64. usually, the application does not care about this attribute.
The visibility type. SPU is a secure evaluation runtime, but not all data are secret, some of them are publicly known to all parties, marking them as public will improve performance significantly.
Used in:
,Invisible(unknown) for all or some of the parties.
Visible(public) for all parties.
Visible for only one party
Used in: