he-transformer icon indicating copy to clipboard operation
he-transformer copied to clipboard

Minimum security level?

Open dnat112 opened this issue 5 years ago • 5 comments

For all the examples I try to run, including the simple matrix multiply example in the "examples" folder, I get an output which says

[WARN] 2020-02-23T08:18:04z src/seal/seal_util.cpp 36 Parameter selection does not enforce minimum security level

I have tried using every parameter setting in the "configs" folder.

Is this the expected behavior?

dnat112 avatar Feb 23 '20 08:02 dnat112

The warning will be emitted for any parameter selection which sets security_level: 0. Unfortunately, the default parameters use security_level: 0, so this warning will be printed several times. As long as you set security_level >= 128 (e.g. https://github.com/IntelAI/he-transformer/blob/master/configs/he_seal_ckks_config_N13_L7.json#L4), you will have appropriate security.

So it is expected, but not ideal, behavior. I'll leave this open to fix.

fboemer avatar Feb 26 '20 19:02 fboemer

I actually get this message for every parameter setting in the configs folder, including N13_L7.

For example, the command:

python examples/ax.py --backed=HE_SEAL --encryption_parameters=configs/he_seal_ckks_config_N13_L7.json

produces this as output:

config graph_options {
  rewrite_options {
    meta_optimizer_iterations: ONE
    min_graph_nodes: -1
    custom_optimizers {
      name: "ngraph-optimizer"
      parameter_map {
        key: "device_id"
        value {
          s: ""
        }
      }
      parameter_map {
        key: "enable_client"
        value {
          s: "False"
        }
      }
      parameter_map {
        key: "encryption_parameters"
        value {
          s: "configs/he_seal_ckks_config_N13_L7.json"
        }
      }
      parameter_map {
        key: "ngraph_backend"
        value {
          s: "HE_SEAL"
        }
      }
    }
  }
}

Result:  [[2. 3. 4. 5.]]
[WARN] 2020-02-26T20:06:14z src/seal/seal_util.cpp 36	Parameter selection does not enforce minimum security level
[WARN] 2020-02-26T20:06:14z src/seal/seal_util.cpp 36	Parameter selection does not enforce minimum security level
[WARN] 2020-02-26T20:06:14z src/seal/seal_util.cpp 36	Parameter selection does not enforce minimum security level
[WARN] 2020-02-26T20:06:14z src/seal/seal_util.cpp 36	Parameter selection does not enforce minimum security level

dnat112 avatar Feb 26 '20 20:02 dnat112

This is the result of the default encryption parameters here, which are used before the --encryption_parameters argument is processed.

fboemer avatar Feb 26 '20 20:02 fboemer

I am also experiencing the same issue when I try to use configuration files even with security level >= 128. If I am understanding this correctly, are you saying that the warnings are before the processing step, but the matrix multiplication is actually run with the correct security level in the config?

jchen98 avatar Mar 28 '20 17:03 jchen98

Yes, this is correct.

fboemer avatar Mar 28 '20 17:03 fboemer