Add Master key generator code