RRAM-based hardware security primitives