Making puzzles green and useful for adaptive identity management in large-scale distributed systems