Smart card library and applications