Compact Hardware Implementation of Ring-LWE Cryptosystems