Towards reliable and secure physical unclonable functions