Labeling or coloring the vertices of a graph is called vertex labeling or coloring. The \(L(3, 2, 1){-}\) path coloring of a graph is one on which vertices at distances \(1,\ 2,\) and 3 on a path are labeled with a minimum label difference of \(3,\ 2,\) and 1 respectively and one such path exists between all pairs of vertices. The \(L(3, 2, 1){-}\) connection number, \({k_{3c}}(G)\) , is the minimum value of the greatest integer used in any viable \(L(3, 2, 1){-}\) path coloring of the graph. Finding the \({k_{3c}}(G)\) of a graph is highly non-trivial and the primary objective of this work is to determine the \({k_{3c}}(G)\) for the Cartesian product of any two graphs. An efficient and computationally simpler cryptographic algorithm is developed by using these concepts in cryptography. This work aims to implement this cryptographic algorithm to support devices with constrained storage and energy capacities. With these ideas, the article attempts to improve the scope of application of graph labeling in cryptographic algorithms. Progressing further, the work evaluates parameters such as key strength, key randomness and security of the encryption algorithm through four statistical tests conducted at a high level of confidence. The tests proved that the proposed method is best suited for applications requiring shorter but stronger keys, compared to the existing graph labeling methods, which are algorithmically complex.