diff options
author | Matt Johnston <matt@ucc.asn.au> | 2017-06-24 17:50:50 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2017-06-24 17:50:50 +0800 |
commit | a79b61517bc7123250d0e2dc21dc18deccf0bb64 (patch) | |
tree | f95c80c6801abd286eaf370dd794859235d1be82 /libtomcrypt/src/pk/pkcs1 | |
parent | 99361f54ca77e0d1ff821c02d7d8df3a87aafde5 (diff) |
update to libtomcrypt 1.17 (with Dropbear changes)
Diffstat (limited to 'libtomcrypt/src/pk/pkcs1')
-rw-r--r-- | libtomcrypt/src/pk/pkcs1/pkcs_1_i2osp.c | 14 | ||||
-rw-r--r-- | libtomcrypt/src/pk/pkcs1/pkcs_1_mgf1.c | 16 | ||||
-rw-r--r-- | libtomcrypt/src/pk/pkcs1/pkcs_1_oaep_decode.c | 16 | ||||
-rw-r--r-- | libtomcrypt/src/pk/pkcs1/pkcs_1_oaep_encode.c | 16 | ||||
-rw-r--r-- | libtomcrypt/src/pk/pkcs1/pkcs_1_os2ip.c | 12 | ||||
-rw-r--r-- | libtomcrypt/src/pk/pkcs1/pkcs_1_pss_decode.c | 16 | ||||
-rw-r--r-- | libtomcrypt/src/pk/pkcs1/pkcs_1_pss_encode.c | 16 | ||||
-rw-r--r-- | libtomcrypt/src/pk/pkcs1/pkcs_1_v1_5_decode.c | 18 | ||||
-rw-r--r-- | libtomcrypt/src/pk/pkcs1/pkcs_1_v1_5_encode.c | 28 |
9 files changed, 76 insertions, 76 deletions
diff --git a/libtomcrypt/src/pk/pkcs1/pkcs_1_i2osp.c b/libtomcrypt/src/pk/pkcs1/pkcs_1_i2osp.c index 4a39bd5..2d9df75 100644 --- a/libtomcrypt/src/pk/pkcs1/pkcs_1_i2osp.c +++ b/libtomcrypt/src/pk/pkcs1/pkcs_1_i2osp.c @@ -6,7 +6,7 @@ * The library is free for all purposes without any express * guarantee it works. * - * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com + * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -15,14 +15,14 @@ Integer to Octet I2OSP, Tom St Denis */ -#ifdef PKCS_1 +#ifdef LTC_PKCS_1 /* always stores the same # of bytes, pads with leading zero bytes as required */ /** - PKCS #1 Integer to binary + LTC_PKCS #1 Integer to binary @param n The integer to store @param modulus_len The length of the RSA modulus @param out [out] The destination for the integer @@ -43,9 +43,9 @@ int pkcs_1_i2osp(void *n, unsigned long modulus_len, unsigned char *out) return mp_to_unsigned_bin(n, out+(modulus_len-size)); } -#endif /* PKCS_1 */ +#endif /* LTC_PKCS_1 */ -/* $Source: /cvs/libtom/libtomcrypt/src/pk/pkcs1/pkcs_1_i2osp.c,v $ */ -/* $Revision: 1.5 $ */ -/* $Date: 2006/03/31 14:15:35 $ */ +/* $Source$ */ +/* $Revision$ */ +/* $Date$ */ diff --git a/libtomcrypt/src/pk/pkcs1/pkcs_1_mgf1.c b/libtomcrypt/src/pk/pkcs1/pkcs_1_mgf1.c index bfc80bd..af8f7e2 100644 --- a/libtomcrypt/src/pk/pkcs1/pkcs_1_mgf1.c +++ b/libtomcrypt/src/pk/pkcs1/pkcs_1_mgf1.c @@ -6,19 +6,19 @@ * The library is free for all purposes without any express * guarantee it works. * - * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com + * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** @file pkcs_1_mgf1.c - The Mask Generation Function (MGF1) for PKCS #1, Tom St Denis + The Mask Generation Function (MGF1) for LTC_PKCS #1, Tom St Denis */ -#ifdef PKCS_1 +#ifdef LTC_PKCS_1 /** - Perform PKCS #1 MGF1 (internal) + Perform LTC_PKCS #1 MGF1 (internal) @param seed The seed for MGF1 @param seedlen The length of the seed @param hash_idx The index of the hash desired @@ -101,8 +101,8 @@ LBL_ERR: return err; } -#endif /* PKCS_1 */ +#endif /* LTC_PKCS_1 */ -/* $Source: /cvs/libtom/libtomcrypt/src/pk/pkcs1/pkcs_1_mgf1.c,v $ */ -/* $Revision: 1.6 $ */ -/* $Date: 2006/03/31 14:15:35 $ */ +/* $Source$ */ +/* $Revision$ */ +/* $Date$ */ diff --git a/libtomcrypt/src/pk/pkcs1/pkcs_1_oaep_decode.c b/libtomcrypt/src/pk/pkcs1/pkcs_1_oaep_decode.c index e70a016..9ac9976 100644 --- a/libtomcrypt/src/pk/pkcs1/pkcs_1_oaep_decode.c +++ b/libtomcrypt/src/pk/pkcs1/pkcs_1_oaep_decode.c @@ -6,19 +6,19 @@ * The library is free for all purposes without any express * guarantee it works. * - * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com + * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** @file pkcs_1_oaep_decode.c - OAEP Padding for PKCS #1, Tom St Denis + OAEP Padding for LTC_PKCS #1, Tom St Denis */ -#ifdef PKCS_1 +#ifdef LTC_PKCS_1 /** - PKCS #1 v2.00 OAEP decode + LTC_PKCS #1 v2.00 OAEP decode @param msg The encoded data to decode @param msglen The length of the encoded data (octets) @param lparam The session or system data (can be NULL) @@ -182,8 +182,8 @@ LBL_ERR: return err; } -#endif /* PKCS_1 */ +#endif /* LTC_PKCS_1 */ -/* $Source: /cvs/libtom/libtomcrypt/src/pk/pkcs1/pkcs_1_oaep_decode.c,v $ */ -/* $Revision: 1.11 $ */ -/* $Date: 2006/11/01 09:28:17 $ */ +/* $Source$ */ +/* $Revision$ */ +/* $Date$ */ diff --git a/libtomcrypt/src/pk/pkcs1/pkcs_1_oaep_encode.c b/libtomcrypt/src/pk/pkcs1/pkcs_1_oaep_encode.c index 99e1ac6..4403477 100644 --- a/libtomcrypt/src/pk/pkcs1/pkcs_1_oaep_encode.c +++ b/libtomcrypt/src/pk/pkcs1/pkcs_1_oaep_encode.c @@ -6,19 +6,19 @@ * The library is free for all purposes without any express * guarantee it works. * - * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com + * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** @file pkcs_1_oaep_encode.c - OAEP Padding for PKCS #1, Tom St Denis + OAEP Padding for LTC_PKCS #1, Tom St Denis */ -#ifdef PKCS_1 +#ifdef LTC_PKCS_1 /** - PKCS #1 v2.00 OAEP encode + LTC_PKCS #1 v2.00 OAEP encode @param msg The data to encode @param msglen The length of the data to encode (octets) @param lparam A session or system parameter (can be NULL) @@ -165,9 +165,9 @@ LBL_ERR: return err; } -#endif /* PKCS_1 */ +#endif /* LTC_PKCS_1 */ -/* $Source: /cvs/libtom/libtomcrypt/src/pk/pkcs1/pkcs_1_oaep_encode.c,v $ */ -/* $Revision: 1.7 $ */ -/* $Date: 2006/06/16 21:53:41 $ */ +/* $Source$ */ +/* $Revision$ */ +/* $Date$ */ diff --git a/libtomcrypt/src/pk/pkcs1/pkcs_1_os2ip.c b/libtomcrypt/src/pk/pkcs1/pkcs_1_os2ip.c index 563ae8d..2df7574 100644 --- a/libtomcrypt/src/pk/pkcs1/pkcs_1_os2ip.c +++ b/libtomcrypt/src/pk/pkcs1/pkcs_1_os2ip.c @@ -6,7 +6,7 @@ * The library is free for all purposes without any express * guarantee it works. * - * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com + * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -14,7 +14,7 @@ @file pkcs_1_os2ip.c Octet to Integer OS2IP, Tom St Denis */ -#ifdef PKCS_1 +#ifdef LTC_PKCS_1 /** Read a binary string into an mp_int @@ -28,9 +28,9 @@ int pkcs_1_os2ip(void *n, unsigned char *in, unsigned long inlen) return mp_read_unsigned_bin(n, in, inlen); } -#endif /* PKCS_1 */ +#endif /* LTC_PKCS_1 */ -/* $Source: /cvs/libtom/libtomcrypt/src/pk/pkcs1/pkcs_1_os2ip.c,v $ */ -/* $Revision: 1.5 $ */ -/* $Date: 2006/03/31 14:15:35 $ */ +/* $Source$ */ +/* $Revision$ */ +/* $Date$ */ diff --git a/libtomcrypt/src/pk/pkcs1/pkcs_1_pss_decode.c b/libtomcrypt/src/pk/pkcs1/pkcs_1_pss_decode.c index 2c16d50..222048c 100644 --- a/libtomcrypt/src/pk/pkcs1/pkcs_1_pss_decode.c +++ b/libtomcrypt/src/pk/pkcs1/pkcs_1_pss_decode.c @@ -6,19 +6,19 @@ * The library is free for all purposes without any express * guarantee it works. * - * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com + * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** @file pkcs_1_pss_decode.c - PKCS #1 PSS Signature Padding, Tom St Denis + LTC_PKCS #1 PSS Signature Padding, Tom St Denis */ -#ifdef PKCS_1 +#ifdef LTC_PKCS_1 /** - PKCS #1 v2.00 PSS decode + LTC_PKCS #1 v2.00 PSS decode @param msghash The hash to verify @param msghashlen The length of the hash (octets) @param sig The signature data (encoded data) @@ -170,8 +170,8 @@ LBL_ERR: return err; } -#endif /* PKCS_1 */ +#endif /* LTC_PKCS_1 */ -/* $Source: /cvs/libtom/libtomcrypt/src/pk/pkcs1/pkcs_1_pss_decode.c,v $ */ -/* $Revision: 1.9 $ */ -/* $Date: 2006/11/30 02:37:21 $ */ +/* $Source$ */ +/* $Revision$ */ +/* $Date$ */ diff --git a/libtomcrypt/src/pk/pkcs1/pkcs_1_pss_encode.c b/libtomcrypt/src/pk/pkcs1/pkcs_1_pss_encode.c index 64bd312..b22a99f 100644 --- a/libtomcrypt/src/pk/pkcs1/pkcs_1_pss_encode.c +++ b/libtomcrypt/src/pk/pkcs1/pkcs_1_pss_encode.c @@ -6,19 +6,19 @@ * The library is free for all purposes without any express * guarantee it works. * - * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com + * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** @file pkcs_1_pss_encode.c - PKCS #1 PSS Signature Padding, Tom St Denis + LTC_PKCS #1 PSS Signature Padding, Tom St Denis */ -#ifdef PKCS_1 +#ifdef LTC_PKCS_1 /** - PKCS #1 v2.00 Signature Encoding + LTC_PKCS #1 v2.00 Signature Encoding @param msghash The hash to encode @param msghashlen The length of the hash (octets) @param saltlen The length of the salt desired (octets) @@ -168,8 +168,8 @@ LBL_ERR: return err; } -#endif /* PKCS_1 */ +#endif /* LTC_PKCS_1 */ -/* $Source: /cvs/libtom/libtomcrypt/src/pk/pkcs1/pkcs_1_pss_encode.c,v $ */ -/* $Revision: 1.7 $ */ -/* $Date: 2006/06/16 21:53:41 $ */ +/* $Source$ */ +/* $Revision$ */ +/* $Date$ */ diff --git a/libtomcrypt/src/pk/pkcs1/pkcs_1_v1_5_decode.c b/libtomcrypt/src/pk/pkcs1/pkcs_1_v1_5_decode.c index b0a7c2d..8345601 100644 --- a/libtomcrypt/src/pk/pkcs1/pkcs_1_v1_5_decode.c +++ b/libtomcrypt/src/pk/pkcs1/pkcs_1_v1_5_decode.c @@ -6,18 +6,18 @@ * The library is free for all purposes without any express * guarantee it works. * - * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com + * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** @file pkcs_1_v1_5_decode.c * - * PKCS #1 v1.5 Padding. (Andreas Lange) + * LTC_PKCS #1 v1.5 Padding. (Andreas Lange) */ -#ifdef PKCS_1 +#ifdef LTC_PKCS_1 -/** @brief PKCS #1 v1.5 decode. +/** @brief LTC_PKCS #1 v1.5 decode. * * @param msg The encoded data to decode * @param msglen The length of the encoded data (octets) @@ -58,7 +58,7 @@ int pkcs_1_v1_5_decode(const unsigned char *msg, goto bail; } - if (block_type == LTC_PKCS_1_EME) { + if (block_type == LTC_LTC_PKCS_1_EME) { for (i = 2; i < modulus_len; i++) { /* separator */ if (msg[i] == 0x00) { break; } @@ -103,8 +103,8 @@ bail: return result; } /* pkcs_1_v1_5_decode */ -#endif /* #ifdef PKCS_1 */ +#endif /* #ifdef LTC_PKCS_1 */ -/* $Source: /cvs/libtom/libtomcrypt/src/pk/pkcs1/pkcs_1_v1_5_decode.c,v $ */ -/* $Revision: 1.5 $ */ -/* $Date: 2006/12/16 17:41:21 $ */ +/* $Source$ */ +/* $Revision$ */ +/* $Date$ */ diff --git a/libtomcrypt/src/pk/pkcs1/pkcs_1_v1_5_encode.c b/libtomcrypt/src/pk/pkcs1/pkcs_1_v1_5_encode.c index 7edd1e6..1c35069 100644 --- a/libtomcrypt/src/pk/pkcs1/pkcs_1_v1_5_encode.c +++ b/libtomcrypt/src/pk/pkcs1/pkcs_1_v1_5_encode.c @@ -6,25 +6,25 @@ * The library is free for all purposes without any express * guarantee it works. * - * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com + * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /*! \file pkcs_1_v1_5_encode.c * - * PKCS #1 v1.5 Padding (Andreas Lange) + * LTC_PKCS #1 v1.5 Padding (Andreas Lange) */ -#ifdef PKCS_1 +#ifdef LTC_PKCS_1 -/*! \brief PKCS #1 v1.5 encode. +/*! \brief LTC_PKCS #1 v1.5 encode. * * \param msg The data to encode * \param msglen The length of the data to encode (octets) * \param block_type Block type to use in padding (\sa ltc_pkcs_1_v1_5_blocks) * \param modulus_bitlen The bit length of the RSA modulus - * \param prng An active PRNG state (only for LTC_PKCS_1_EME) - * \param prng_idx The index of the PRNG desired (only for LTC_PKCS_1_EME) + * \param prng An active PRNG state (only for LTC_LTC_PKCS_1_EME) + * \param prng_idx The index of the PRNG desired (only for LTC_LTC_PKCS_1_EME) * \param out [out] The destination for the encoded data * \param outlen [in/out] The max size and resulting size of the encoded data * @@ -44,12 +44,12 @@ int pkcs_1_v1_5_encode(const unsigned char *msg, int result; /* valid block_type? */ - if ((block_type != LTC_PKCS_1_EMSA) && - (block_type != LTC_PKCS_1_EME)) { + if ((block_type != LTC_LTC_PKCS_1_EMSA) && + (block_type != LTC_LTC_PKCS_1_EME)) { return CRYPT_PK_INVALID_PADDING; } - if (block_type == LTC_PKCS_1_EME) { /* encryption padding, we need a valid PRNG */ + if (block_type == LTC_LTC_PKCS_1_EME) { /* encryption padding, we need a valid PRNG */ if ((result = prng_is_valid(prng_idx)) != CRYPT_OK) { return result; } @@ -72,7 +72,7 @@ int pkcs_1_v1_5_encode(const unsigned char *msg, ps = &out[2]; ps_len = modulus_len - msglen - 3; - if (block_type == LTC_PKCS_1_EME) { + if (block_type == LTC_LTC_PKCS_1_EME) { /* now choose a random ps */ if (prng_descriptor[prng_idx].read(ps, ps_len, prng) != ps_len) { result = CRYPT_ERROR_READPRNG; @@ -104,8 +104,8 @@ bail: return result; } /* pkcs_1_v1_5_encode */ -#endif /* #ifdef PKCS_1 */ +#endif /* #ifdef LTC_PKCS_1 */ -/* $Source: /cvs/libtom/libtomcrypt/src/pk/pkcs1/pkcs_1_v1_5_encode.c,v $ */ -/* $Revision: 1.2 $ */ -/* $Date: 2006/11/01 09:12:06 $ */ +/* $Source$ */ +/* $Revision$ */ +/* $Date$ */ |