Confusion in the usage of linux key management APIs