The present invention relates to key agreement protocol, public key cryptosystem and digital signature scheme that are cryptographically secure and efficient. More specifically, the present invention provides a method of constructing a key agreement protocol and a public key cryptosystem based on the difficulty of recovering factors from a hidden product in a non-commutative semi-group and based on a trapdoor using a pair of commutative subsets of the semi-group. The present invention also provides a method of constructing a digital signature scheme using an algebraic structure that has an infeasible search problem but has a cryptographically feasible decision problem. The key agreement protocol, the public key cryptosystem and the digital signature scheme can be implemented on various concrete algebraic platforms described in this invention.