Prechádzať zdrojové kódy

make rsa_shrink_key() private for now

Steffen Jaeckel 6 rokov pred
rodič
commit
5c6212af75

+ 0 - 9
doc/crypt.tex

@@ -4362,15 +4362,6 @@ int rsa_get_size(rsa_key *key);
 \end{verbatim}
 This can be used to determine the modulus size of an RSA key.
 
-\subsection{RSA Key Shrinking}
-To shrink an RSA key, use the following function:
-\index{rsa\_shrink\_key()}
-\begin{verbatim}
-void rsa_shrink_key(rsa_key *key);
-\end{verbatim}
-This can be used to shrink a key to its minimal memory requirements
-e.g. in cases where you have a long-lived RSA key in a memory-constrained system.
-
 \mysection{RSA Key Encryption}
 Normally RSA is used to encrypt short symmetric keys which are then used in block ciphers to encrypt a message.
 To facilitate encrypting short keys the following functions have been provided.

+ 0 - 2
src/headers/tomcrypt_pk.h

@@ -60,8 +60,6 @@ int rsa_exptmod(const unsigned char *in,   unsigned long inlen,
 
 void rsa_free(rsa_key *key);
 
-void rsa_shrink_key(rsa_key *key);
-
 /* These use PKCS #1 v2.0 padding */
 #define rsa_encrypt_key(_in, _inlen, _out, _outlen, _lparam, _lparamlen, _prng, _prng_idx, _hash_idx, _key) \
   rsa_encrypt_key_ex(_in, _inlen, _out, _outlen, _lparam, _lparamlen, _prng, _prng_idx, _hash_idx, LTC_PKCS_1_OAEP, _key)

+ 1 - 0
src/headers/tomcrypt_private.h

@@ -228,6 +228,7 @@ int pk_oid_num_to_str(const unsigned long *oid, unsigned long oidlen, char *OID,
 /* ---- DH Routines ---- */
 #ifdef LTC_MRSA
 int rsa_init(rsa_key *key);
+void rsa_shrink_key(rsa_key *key);
 #endif /* LTC_MRSA */
 
 /* ---- DH Routines ---- */