You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
int rsa_decrypt_key_v2(const unsigned char *in, unsigned long inlen,
4690
4686
unsigned char *out, unsigned long *outlen,
4691
-
ltc_rsa_op_parameters *opts,
4687
+
ltc_rsa_op_parameters *params,
4692
4688
int *stat,
4693
4689
const rsa_key *key);
4694
4690
\end{verbatim}
4695
4691
4696
-
Similar to the extended encryption, the parameter \textit{opts.padding} indicates which version of the PKCS \#1 standard to use.
4692
+
Similar to the extended encryption, the parameter \textit{params.padding} indicates which version of the PKCS \#1 standard to use.
4697
4693
It must be set to \code{LTC\_PKCS\_1\_V1\_5} to perform v1.5 decryption, or set to \code{LTC\_PKCS\_1\_OAEP} to perform v2.1 decryption.
4698
4694
4699
-
When performing v1.5 decryption, the \textit{opts.params.hash\_alg} and \textit{opts.u.crypt.lparam} parameters are totally ignored and can be set to \code{NULL} or zero (respectively).
4695
+
When performing v1.5 decryption, the \textit{params.params.hash\_idx} and \textit{params.u.crypt.lparam} parameters are totally ignored and can be set to \code{-1} or \code{NULL} (respectively).
int rsa_sign_hash_v2(const unsigned char *hash, unsigned long hashlen,
4737
4733
unsigned char *sig, unsigned long *siglen,
4738
-
ltc_rsa_op_parameters *opts,
4734
+
ltc_rsa_op_parameters *params,
4739
4735
const rsa_key *key);
4740
4736
\end{verbatim}
4741
4737
4742
4738
This will PKCS encode the message digest pointed to by \textit{in} of length \textit{inlen} octets. Next, the PKCS encoded hash will be RSA
4743
-
\textit{signed} and the output stored in the buffer pointed to by \textit{out} of length \textit{outlen} octets. The \textit{opts.padding} parameter
4739
+
\textit{signed} and the output stored in the buffer pointed to by \textit{out} of length \textit{outlen} octets. The \textit{params.padding} parameter
4744
4740
must be set to \code{LTC\_PKCS\_1\_V1\_5} to produce a v1.5 signature, otherwise, it must be set to \code{LTC\_PKCS\_1\_PSS} to produce a
4745
4741
v2.1 signature.
4746
4742
4747
4743
\index{LTC\_PKCS\_1\_V1\_5\_NA1}
4748
4744
As of v1.18.0, the library also supports v1.5 signature generation without ASN.1 encoding the signature which can be indicated by passing
4749
-
\code{LTC\_PKCS\_1\_V1\_5\_NA1} as \textit{opts.padding} parameter. This option has been introduced to provide compatibilty to SSL3.0 implementations
4745
+
\code{LTC\_PKCS\_1\_V1\_5\_NA1} as \textit{params.padding} parameter. This option has been introduced to provide compatibilty to SSL3.0 implementations
4750
4746
which implemented this.
4751
4747
4752
-
When generating a standard v1.5 signature the \textit{opts.prng}, and \textit{opts.wprng} parameters are ignored.
4753
-
When generating a v1.5 signature without ASN.1 decoding additionally the \textit{opts.params.hash\_alg} parameter is ignored.
4748
+
When generating a standard v1.5 signature the \textit{params.prng}, and \textit{params.wprng} parameters are ignored.
4749
+
When generating a v1.5 signature without ASN.1 decoding additionally the \textit{params.params.hash\_idx} parameter is ignored.
0 commit comments