almost working crypto signing