source: heimdal/trunk/lib/krb5/krb5_create_checksum.cat3

Last change on this file was 1, checked in by Paul Smedley, 10 years ago

Initial commit of Heimdal 1.5.3

File size: 7.8 KB
Line 
1
2NAME(3) BSD Library Functions Manual NAME(3)
3
4NNAAMMEE
5 kkrrbb55__cchheecckkssuumm, kkrrbb55__cchheecckkssuumm__ddiissaabbllee, kkrrbb55__cchheecckkssuumm__iiss__ccoolllliissiioonn__pprrooooff,
6 kkrrbb55__cchheecckkssuumm__iiss__kkeeyyeedd, kkrrbb55__cchheecckkssuummssiizzee, kkrrbb55__cckkssuummttyyppee__vvaalliidd,
7 kkrrbb55__ccooppyy__cchheecckkssuumm, kkrrbb55__ccrreeaattee__cchheecckkssuumm, kkrrbb55__ccrryyppttoo__ggeett__cchheecckkssuumm__ttyyppee
8 kkrrbb55__ffrreeee__cchheecckkssuumm, kkrrbb55__ffrreeee__cchheecckkssuumm__ccoonntteennttss, kkrrbb55__hhmmaacc,
9 kkrrbb55__vveerriiffyy__cchheecckkssuumm -- creates, handles and verifies checksums
10
11LLIIBBRRAARRYY
12 Kerberos 5 Library (libkrb5, -lkrb5)
13
14SSYYNNOOPPSSIISS
15 ##iinncclluuddee <<kkrrbb55..hh>>
16
17 typedef Checksum krb5_checksum;
18
19 _v_o_i_d
20 kkrrbb55__cchheecckkssuumm__ddiissaabbllee(_k_r_b_5___c_o_n_t_e_x_t _c_o_n_t_e_x_t, _k_r_b_5___c_k_s_u_m_t_y_p_e _t_y_p_e);
21
22 _k_r_b_5___b_o_o_l_e_a_n
23 kkrrbb55__cchheecckkssuumm__iiss__ccoolllliissiioonn__pprrooooff(_k_r_b_5___c_o_n_t_e_x_t _c_o_n_t_e_x_t,
24 _k_r_b_5___c_k_s_u_m_t_y_p_e _t_y_p_e);
25
26 _k_r_b_5___b_o_o_l_e_a_n
27 kkrrbb55__cchheecckkssuumm__iiss__kkeeyyeedd(_k_r_b_5___c_o_n_t_e_x_t _c_o_n_t_e_x_t, _k_r_b_5___c_k_s_u_m_t_y_p_e _t_y_p_e);
28
29 _k_r_b_5___e_r_r_o_r___c_o_d_e
30 kkrrbb55__cckkssuummttyyppee__vvaalliidd(_k_r_b_5___c_o_n_t_e_x_t _c_o_n_t_e_x_t, _k_r_b_5___c_k_s_u_m_t_y_p_e _c_t_y_p_e);
31
32 _k_r_b_5___e_r_r_o_r___c_o_d_e
33 kkrrbb55__cchheecckkssuummssiizzee(_k_r_b_5___c_o_n_t_e_x_t _c_o_n_t_e_x_t, _k_r_b_5___c_k_s_u_m_t_y_p_e _t_y_p_e,
34 _s_i_z_e___t _*_s_i_z_e);
35
36 _k_r_b_5___e_r_r_o_r___c_o_d_e
37 kkrrbb55__ccrreeaattee__cchheecckkssuumm(_k_r_b_5___c_o_n_t_e_x_t _c_o_n_t_e_x_t, _k_r_b_5___c_r_y_p_t_o _c_r_y_p_t_o,
38 _k_r_b_5___k_e_y___u_s_a_g_e _u_s_a_g_e, _i_n_t _t_y_p_e, _v_o_i_d _*_d_a_t_a, _s_i_z_e___t _l_e_n,
39 _C_h_e_c_k_s_u_m _*_r_e_s_u_l_t);
40
41 _k_r_b_5___e_r_r_o_r___c_o_d_e
42 kkrrbb55__vveerriiffyy__cchheecckkssuumm(_k_r_b_5___c_o_n_t_e_x_t _c_o_n_t_e_x_t, _k_r_b_5___c_r_y_p_t_o _c_r_y_p_t_o,
43 _k_r_b_5___k_e_y___u_s_a_g_e _u_s_a_g_e, _v_o_i_d _*_d_a_t_a, _s_i_z_e___t _l_e_n, _C_h_e_c_k_s_u_m _*_c_k_s_u_m);
44
45 _k_r_b_5___e_r_r_o_r___c_o_d_e
46 kkrrbb55__ccrryyppttoo__ggeett__cchheecckkssuumm__ttyyppee(_k_r_b_5___c_o_n_t_e_x_t _c_o_n_t_e_x_t, _k_r_b_5___c_r_y_p_t_o _c_r_y_p_t_o,
47 _k_r_b_5___c_k_s_u_m_t_y_p_e _*_t_y_p_e);
48
49 _v_o_i_d
50 kkrrbb55__ffrreeee__cchheecckkssuumm(_k_r_b_5___c_o_n_t_e_x_t _c_o_n_t_e_x_t, _k_r_b_5___c_h_e_c_k_s_u_m _*_c_k_s_u_m);
51
52 _v_o_i_d
53 kkrrbb55__ffrreeee__cchheecckkssuumm__ccoonntteennttss(_k_r_b_5___c_o_n_t_e_x_t _c_o_n_t_e_x_t, _k_r_b_5___c_h_e_c_k_s_u_m _*_c_k_s_u_m);
54
55 _k_r_b_5___e_r_r_o_r___c_o_d_e
56 kkrrbb55__hhmmaacc(_k_r_b_5___c_o_n_t_e_x_t _c_o_n_t_e_x_t, _k_r_b_5___c_k_s_u_m_t_y_p_e _c_k_t_y_p_e, _c_o_n_s_t _v_o_i_d _*_d_a_t_a,
57 _s_i_z_e___t _l_e_n, _u_n_s_i_g_n_e_d _u_s_a_g_e, _k_r_b_5___k_e_y_b_l_o_c_k _*_k_e_y, _C_h_e_c_k_s_u_m _*_r_e_s_u_l_t);
58
59 _k_r_b_5___e_r_r_o_r___c_o_d_e
60 kkrrbb55__ccooppyy__cchheecckkssuumm(_k_r_b_5___c_o_n_t_e_x_t _c_o_n_t_e_x_t, _c_o_n_s_t _k_r_b_5___c_h_e_c_k_s_u_m _*_o_l_d,
61 _k_r_b_5___c_h_e_c_k_s_u_m _*_*_n_e_w);
62
63DDEESSCCRRIIPPTTIIOONN
64 The krb5_checksum structure holds a Kerberos checksum. There is no com-
65 ponent inside krb5_checksum that is directly referable.
66
67 The functions are used to create and verify checksums.
68 kkrrbb55__ccrreeaattee__cchheecckkssuumm() creates a checksum of the specified data, and puts
69 it in _r_e_s_u_l_t. If _c_r_y_p_t_o is NULL, _u_s_a_g_e___o_r___t_y_p_e specifies the checksum
70 type to use; it must not be keyed. Otherwise _c_r_y_p_t_o is an encryption con-
71 text created by kkrrbb55__ccrryyppttoo__iinniitt(), and _u_s_a_g_e___o_r___t_y_p_e specifies a key-
72 usage.
73
74 kkrrbb55__vveerriiffyy__cchheecckkssuumm() verifies the _c_h_e_c_k_s_u_m against the provided data.
75
76 kkrrbb55__cchheecckkssuumm__iiss__ccoolllliissiioonn__pprrooooff() returns true is the specified checksum
77 is collision proof (that it's very unlikely that two strings has the same
78 hash value, and that it's hard to find two strings that has the same
79 hash). Examples of collision proof checksums are MD5, and SHA1, while
80 CRC32 is not.
81
82 kkrrbb55__cchheecckkssuumm__iiss__kkeeyyeedd() returns true if the specified checksum type is
83 keyed (that the hash value is a function of both the data, and a separate
84 key). Examples of keyed hash algorithms are HMAC-SHA1-DES3, and RSA-
85 MD5-DES. The ``plain'' hash functions MD5, and SHA1 are not keyed.
86
87 kkrrbb55__ccrryyppttoo__ggeett__cchheecckkssuumm__ttyyppee() returns the checksum type that will be
88 used when creating a checksum for the given _c_r_y_p_t_o context. This func-
89 tion is useful in combination with kkrrbb55__cchheecckkssuummssiizzee() when you want to
90 know the size a checksum will use when you create it.
91
92 kkrrbb55__cckkssuummttyyppee__vvaalliidd() returns 0 or an error if the checksumtype is
93 implemented and not currently disabled in this kerberos library.
94
95 kkrrbb55__cchheecckkssuummssiizzee() returns the size of the outdata of checksum function.
96
97 kkrrbb55__ccooppyy__cchheecckkssuumm() returns a copy of the checksum kkrrbb55__ffrreeee__cchheecckkssuumm()
98 should use used to free the _n_e_w checksum.
99
100 kkrrbb55__ffrreeee__cchheecckkssuumm() free the checksum and the content of the checksum.
101
102 kkrrbb55__ffrreeee__cchheecckkssuumm__ccoonntteennttss() frees the content of checksum in _c_k_s_u_m.
103
104 kkrrbb55__hhmmaacc() calculates the HMAC over _d_a_t_a (with length _l_e_n) using the
105 keyusage _u_s_a_g_e and keyblock _k_e_y. Note that keyusage is not always used
106 in checksums.
107
108 kkrrbb55__cchheecckkssuumm__ddiissaabbllee globally disables the checksum type.
109
110SSEEEE AALLSSOO
111 krb5_crypto_init(3), krb5_c_encrypt(3), krb5_encrypt(3)
112
113HEIMDAL August 12, 2005 HEIMDAL
Note: See TracBrowser for help on using the repository browser.