In this paper, we introduce a D-H key distribution protocol over polynomial rings. These protocols use some polynomials with two cyclomic cosets in the center of the ring as part of the private keys. We give some examples over the polynomial rings Zp, where p is a prime number. We also give a security analysis of the proposed protocols and conclude that the only possible attack is by brute force. In this paper, D-H key distribution and agreement protocols are also described in PR with two cyclotomic cosets based on DLP. DLP over number rings is important problem in public-key cryptography.This DLP is studied in the case of polynomial rings with two cyclotomic coset.