def _set_cryptographic_algorithm(self, v, load=False):
    """
    Setter method for cryptographic_algorithm, mapped from YANG variable /macsec/mka/key_chains/key_chain/mka_keys/mka_key/state/cryptographic_algorithm (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cryptographic_algorithm is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cryptographic_algorithm() directly.

    YANG Description: MKA Cryptographic authentication algorithm to use
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AES_128_CMAC': {}, 'AES_256_CMAC': {}},), is_leaf=True, yang_name="cryptographic-algorithm", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/macsec', defining_module='openconfig-macsec', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cryptographic_algorithm must be of a type compatible with enumeration""",
          'defined-type': "openconfig-macsec:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AES_128_CMAC': {}, 'AES_256_CMAC': {}},), is_leaf=True, yang_name="cryptographic-algorithm", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/macsec', defining_module='openconfig-macsec', yang_type='enumeration', is_config=False)""",
        })

    self.__cryptographic_algorithm = t
    if hasattr(self, '_set'):
      self._set()