Homomorphic Encryption-based Functional Fair Exchange for arbitrary functions