software and hardware locking algorithms