def gen_key_i(i, kappa, K):
	""" 
	Create key value where key equals kappa, except:
	key_(i mod n) = kappa_(i mod n) XOR K_(i mod n)

	Parameters:
	i 	  -- integer in [0,n-1]
	kappa -- string
	K 	  -- string

	Return:
	key -- list of bool
	"""
	# Transform string into list of booleans
	kappa = list(kappa)
	kappa = [bool(int(j)) for j in kappa]
	
	K = list(K)
	K = [bool(int(j)) for j in K]

	# Initialize new key value
	key_i = kappa.copy()
	
	# XOR at indice i
	key_i[i] = K[i] ^ kappa[i]
	
	return key_i