
Generate automorphism evaluation keys for a set of indices
Source:R/eval-key-map.R
eval_automorphism_key_gen.RdGenerates the eval-key map needed to apply
eval_automorphism() at the given set of slot indices.
The generated keys are both inserted into the
CryptoContext's internal eval-automorphism-key registry
(keyed by sk's tag) and returned as an EvalKeyMap
handle that the caller can pass directly to
eval_automorphism().
Arguments
- cc
A
CryptoContext.- sk
A
PrivateKey.- indices
Integer vector of automorphism indices (not slot indices — use
find_automorphism_indices()to compute them from slot indices).
Details
On the C++ side this is equivalent to calling
EvalAutomorphismKeyGen(sk, indices) which internally
calls CryptoContextImpl::InsertEvalAutomorphismKey with
the generated map (cryptocontext.h line 2237). The dual
return / registry-insert pattern matches the openfhe-python
behavior at the equivalent entry point.
Companion to eval_rotate_key_gen() (reached via
key_gen()'s rotations argument): both populate the
same cc-internal storage. The automorphism form gives raw
access to the automorphism group element (bypassing the
rotate-to-automorphism slot mapping that
eval_rotate_key_gen performs internally).