crypto: allow to set generated RSA key size
crypto: serialize in DER format by default
fix case where signed value seq. num. shouldn't increase