gcry_mpi_t outmpi = gcry_mpi_new(len * 8);
gcry_mpi_powm(outmpi, inmpi, rsa->e, rsa->n);
+ int pad = len - (gcry_mpi_get_nbits(outmpi) + 7) / 8;
+ while(pad--)
+ *(char *)out++ = 0;
+
check(gcry_mpi_print(GCRYMPI_FMT_USG, out,len, NULL, outmpi));
return true;
gcry_mpi_t outmpi = gcry_mpi_new(len * 8);
gcry_mpi_powm(outmpi, inmpi, rsa->d, rsa->n);
+ int pad = len - (gcry_mpi_get_nbits(outmpi) + 7) / 8;
+ while(pad--)
+ *(char *)out++ = 0;
+
check(gcry_mpi_print(GCRYMPI_FMT_USG, out,len, NULL, outmpi));
return true;