Hemming coder for Zp