Mercurial > dropbear
comparison libtomcrypt/src/headers/tomcrypt_pkcs.h @ 1435:f849a5ca2efc
update to libtomcrypt 1.17 (with Dropbear changes)
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sat, 24 Jun 2017 17:50:50 +0800 |
parents | 0cbe8f6dbf9e |
children | 6dba84798cd5 |
comparison
equal
deleted
inserted
replaced
1434:27b9ddb06b09 | 1435:f849a5ca2efc |
---|---|
1 /* PKCS Header Info */ | 1 /* LTC_PKCS Header Info */ |
2 | 2 |
3 /* ===> PKCS #1 -- RSA Cryptography <=== */ | 3 /* ===> LTC_PKCS #1 -- RSA Cryptography <=== */ |
4 #ifdef PKCS_1 | 4 #ifdef LTC_PKCS_1 |
5 | 5 |
6 enum ltc_pkcs_1_v1_5_blocks | 6 enum ltc_pkcs_1_v1_5_blocks |
7 { | 7 { |
8 LTC_PKCS_1_EMSA = 1, /* Block type 1 (PKCS #1 v1.5 signature padding) */ | 8 LTC_LTC_PKCS_1_EMSA = 1, /* Block type 1 (LTC_PKCS #1 v1.5 signature padding) */ |
9 LTC_PKCS_1_EME = 2 /* Block type 2 (PKCS #1 v1.5 encryption padding) */ | 9 LTC_LTC_PKCS_1_EME = 2 /* Block type 2 (LTC_PKCS #1 v1.5 encryption padding) */ |
10 }; | 10 }; |
11 | 11 |
12 enum ltc_pkcs_1_paddings | 12 enum ltc_pkcs_1_paddings |
13 { | 13 { |
14 LTC_PKCS_1_V1_5 = 1, /* PKCS #1 v1.5 padding (\sa ltc_pkcs_1_v1_5_blocks) */ | 14 LTC_LTC_PKCS_1_V1_5 = 1, /* LTC_PKCS #1 v1.5 padding (\sa ltc_pkcs_1_v1_5_blocks) */ |
15 LTC_PKCS_1_OAEP = 2, /* PKCS #1 v2.0 encryption padding */ | 15 LTC_LTC_PKCS_1_OAEP = 2, /* LTC_PKCS #1 v2.0 encryption padding */ |
16 LTC_PKCS_1_PSS = 3 /* PKCS #1 v2.1 signature padding */ | 16 LTC_LTC_PKCS_1_PSS = 3 /* LTC_PKCS #1 v2.1 signature padding */ |
17 }; | 17 }; |
18 | 18 |
19 int pkcs_1_mgf1( int hash_idx, | 19 int pkcs_1_mgf1( int hash_idx, |
20 const unsigned char *seed, unsigned long seedlen, | 20 const unsigned char *seed, unsigned long seedlen, |
21 unsigned char *mask, unsigned long masklen); | 21 unsigned char *mask, unsigned long masklen); |
63 int pkcs_1_pss_decode(const unsigned char *msghash, unsigned long msghashlen, | 63 int pkcs_1_pss_decode(const unsigned char *msghash, unsigned long msghashlen, |
64 const unsigned char *sig, unsigned long siglen, | 64 const unsigned char *sig, unsigned long siglen, |
65 unsigned long saltlen, int hash_idx, | 65 unsigned long saltlen, int hash_idx, |
66 unsigned long modulus_bitlen, int *res); | 66 unsigned long modulus_bitlen, int *res); |
67 | 67 |
68 #endif /* PKCS_1 */ | 68 #endif /* LTC_PKCS_1 */ |
69 | 69 |
70 /* ===> PKCS #5 -- Password Based Cryptography <=== */ | 70 /* ===> LTC_PKCS #5 -- Password Based Cryptography <=== */ |
71 #ifdef PKCS_5 | 71 #ifdef LTC_PKCS_5 |
72 | 72 |
73 /* Algorithm #1 (old) */ | 73 /* Algorithm #1 (old) */ |
74 int pkcs_5_alg1(const unsigned char *password, unsigned long password_len, | 74 int pkcs_5_alg1(const unsigned char *password, unsigned long password_len, |
75 const unsigned char *salt, | 75 const unsigned char *salt, |
76 int iteration_count, int hash_idx, | 76 int iteration_count, int hash_idx, |
80 int pkcs_5_alg2(const unsigned char *password, unsigned long password_len, | 80 int pkcs_5_alg2(const unsigned char *password, unsigned long password_len, |
81 const unsigned char *salt, unsigned long salt_len, | 81 const unsigned char *salt, unsigned long salt_len, |
82 int iteration_count, int hash_idx, | 82 int iteration_count, int hash_idx, |
83 unsigned char *out, unsigned long *outlen); | 83 unsigned char *out, unsigned long *outlen); |
84 | 84 |
85 #endif /* PKCS_5 */ | 85 #endif /* LTC_PKCS_5 */ |
86 | 86 |
87 /* $Source: /cvs/libtom/libtomcrypt/src/headers/tomcrypt_pkcs.h,v $ */ | 87 /* $Source$ */ |
88 /* $Revision: 1.7 $ */ | 88 /* $Revision$ */ |
89 /* $Date: 2006/11/15 12:44:59 $ */ | 89 /* $Date$ */ |