create_bootstrap_key
Engine.create_bootstrap_key(secret_key, stage_count=3, size="medium")
- Creates a bootstrap key for bootstrapping. Requires a secret key. The bootstrap key is internally composed of fixed rotation keys for bootstrapping.
- Input
- SecretKey
- stage_count: optional
- Specifies the number of levels used in coefficient to the slot function and the slot to coefficient function of bootstrapping algorithm. The default value is 3, and recommended values are from 3 to 5. The larger the stage count, the faster the bootstrapping, but the lower the level of the final result.
- size: optional
- Specifies the size of the bootstrap key. The larger the bootstrap key, the faster the bootstrap operation.
medium
and large
are supported. The default value is set to medium
.
- Output
from desilofhe import Engine
engine = Engine(for_bootstrap=True)
secret_key = engine.create_secret_key()
bootstrap_key = engine.create_bootstrap_key(secret_key)
medium_bootstrap_key_with_5_stages = engine.create_bootstrap_key(
secret_key, stage_count=5
)
large_bootstrap_key = engine.create_bootstrap_key(secret_key, size="large")
large_bootstrap_key_with_4_stages = engine.create_bootstrap_key(
secret_key, count=4, size="large"
)
Key sizes
stage_count |
3 |
4 |
5 |
medium |
12.3 GB |
9.1 GB |
7.0 GB |
large |
15.2 GB |
12.9 GB |
8.9 GB |