Privacy and efficient data processing are crucial research areas in the field of outsourcing computing. Thus, the contribution of the paper is twofold. First of all, we develop a secure offloading technique that can process data while preserving privacy. Although RSA and Paillier cryptosystems are highly beneficial for mathematical operations on basic encrypted data due to their homomorphic properties, images are processed using permutation-ordered binary (POB) and Shamir's secret sharing (SSS). Second, a non-cooperative game theory model was formulated to examine the interactions between service providers, characterizing each edge as an M/M/1 system with an infinite queue. Through formal verification using rigorous mathematical reasoning, the suggested strategies for task offloading and resource allocation are shown to be effective in terms of security, quality of service (QoS), and energy consumption. The best-response dynamics approach is used to calculate the final strategy for each participant and assess how fairly resources are allocated. Finally, the potential of our approach is demonstrated numerically, revealing a faster convergence towards attaining Nash equilibrium in a duopoly cloud-edge data center market, granted that the necessary and sufficient conditions are met.