wrapper functions for getting pub/priv key
added util function to create token