comparison mycrypt_pkcs.h @ 0:d7da3b1e1540 libtomcrypt

put back the 0.95 makefile which was inadvertently merged over
author Matt Johnston <matt@ucc.asn.au>
date Mon, 31 May 2004 18:21:40 +0000
parents
children 6362d3854bb4
comparison
equal deleted inserted replaced
-1:000000000000 0:d7da3b1e1540
1 /* PKCS Header Info */
2
3 /* ===> PKCS #1 -- RSA Cryptography <=== */
4 #ifdef PKCS_1
5
6 int pkcs_1_mgf1(const unsigned char *seed, unsigned long seedlen,
7 int hash_idx,
8 unsigned char *mask, unsigned long masklen);
9
10 int pkcs_1_oaep_encode(const unsigned char *msg, unsigned long msglen,
11 const unsigned char *lparam, unsigned long lparamlen,
12 unsigned long modulus_bitlen, int hash_idx,
13 int prng_idx, prng_state *prng,
14 unsigned char *out, unsigned long *outlen);
15
16 int pkcs_1_oaep_decode(const unsigned char *msg, unsigned long msglen,
17 const unsigned char *lparam, unsigned long lparamlen,
18 unsigned long modulus_bitlen, int hash_idx,
19 unsigned char *out, unsigned long *outlen);
20
21 int pkcs_1_pss_encode(const unsigned char *msghash, unsigned long msghashlen,
22 unsigned long saltlen, int hash_idx,
23 int prng_idx, prng_state *prng,
24 unsigned long modulus_bitlen,
25 unsigned char *out, unsigned long *outlen);
26
27 int pkcs_1_pss_decode(const unsigned char *msghash, unsigned long msghashlen,
28 const unsigned char *sig, unsigned long siglen,
29 unsigned long saltlen, int hash_idx,
30 unsigned long modulus_bitlen, int *res);
31
32 int pkcs_1_i2osp(mp_int *n, unsigned long modulus_len, unsigned char *out);
33 int pkcs_1_os2ip(mp_int *n, unsigned char *in, unsigned long inlen);
34
35
36 #endif /* PKCS_1 */
37
38 /* ===> PKCS #5 -- Password Based Cryptography <=== */
39 #ifdef PKCS_5
40
41 /* Algorithm #1 (old) */
42 int pkcs_5_alg1(const unsigned char *password, unsigned long password_len,
43 const unsigned char *salt,
44 int iteration_count, int hash_idx,
45 unsigned char *out, unsigned long *outlen);
46
47 /* Algorithm #2 (new) */
48 int pkcs_5_alg2(const unsigned char *password, unsigned long password_len,
49 const unsigned char *salt, unsigned long salt_len,
50 int iteration_count, int hash_idx,
51 unsigned char *out, unsigned long *outlen);
52
53 #endif /* PKCS_5 */