Skip to content

Commit 5c6212a

Browse files
committed
make rsa_shrink_key() private for now
1 parent 08abc93 commit 5c6212a

File tree

3 files changed

+1
-11
lines changed

3 files changed

+1
-11
lines changed

doc/crypt.tex

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4362,15 +4362,6 @@ \subsection{RSA Key Size}
43624362
\end{verbatim}
43634363
This can be used to determine the modulus size of an RSA key.
43644364

4365-
\subsection{RSA Key Shrinking}
4366-
To shrink an RSA key, use the following function:
4367-
\index{rsa\_shrink\_key()}
4368-
\begin{verbatim}
4369-
void rsa_shrink_key(rsa_key *key);
4370-
\end{verbatim}
4371-
This can be used to shrink a key to its minimal memory requirements
4372-
e.g. in cases where you have a long-lived RSA key in a memory-constrained system.
4373-
43744365
\mysection{RSA Key Encryption}
43754366
Normally RSA is used to encrypt short symmetric keys which are then used in block ciphers to encrypt a message.
43764367
To facilitate encrypting short keys the following functions have been provided.

src/headers/tomcrypt_pk.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@ int rsa_exptmod(const unsigned char *in, unsigned long inlen,
6060

6161
void rsa_free(rsa_key *key);
6262

63-
void rsa_shrink_key(rsa_key *key);
64-
6563
/* These use PKCS #1 v2.0 padding */
6664
#define rsa_encrypt_key(_in, _inlen, _out, _outlen, _lparam, _lparamlen, _prng, _prng_idx, _hash_idx, _key) \
6765
rsa_encrypt_key_ex(_in, _inlen, _out, _outlen, _lparam, _lparamlen, _prng, _prng_idx, _hash_idx, LTC_PKCS_1_OAEP, _key)

src/headers/tomcrypt_private.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ int pk_oid_num_to_str(const unsigned long *oid, unsigned long oidlen, char *OID,
228228
/* ---- DH Routines ---- */
229229
#ifdef LTC_MRSA
230230
int rsa_init(rsa_key *key);
231+
void rsa_shrink_key(rsa_key *key);
231232
#endif /* LTC_MRSA */
232233

233234
/* ---- DH Routines ---- */

0 commit comments

Comments
 (0)