File: krb5_create_checksum.cat3

package info (click to toggle)
heimdal 7.1.0%2Bdfsg-13%2Bdeb9u3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 41,436 kB
  • sloc: ansic: 354,938; sh: 12,104; makefile: 4,353; yacc: 1,774; perl: 1,572; python: 748; lex: 732; java: 119; awk: 41
file content (112 lines) | stat: -rw-r--r-- 7,973 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
NAME(3)                  BSD Library Functions Manual                  NAME(3)

NNAAMMEE
     kkrrbb55__cchheecckkssuumm, kkrrbb55__cchheecckkssuumm__ddiissaabbllee, kkrrbb55__cchheecckkssuumm__iiss__ccoolllliissiioonn__pprrooooff,
     kkrrbb55__cchheecckkssuumm__iiss__kkeeyyeedd, kkrrbb55__cchheecckkssuummssiizzee, kkrrbb55__cckkssuummttyyppee__vvaalliidd,
     kkrrbb55__ccooppyy__cchheecckkssuumm, kkrrbb55__ccrreeaattee__cchheecckkssuumm, kkrrbb55__ccrryyppttoo__ggeett__cchheecckkssuumm__ttyyppee
     kkrrbb55__ffrreeee__cchheecckkssuumm, kkrrbb55__ffrreeee__cchheecckkssuumm__ccoonntteennttss, kkrrbb55__hhmmaacc,
     kkrrbb55__vveerriiffyy__cchheecckkssuumm -- creates, handles and verifies checksums

LLIIBBRRAARRYY
     Kerberos 5 Library (libkrb5, -lkrb5)

SSYYNNOOPPSSIISS
     ##iinncclluuddee <<kkrrbb55..hh>>

     typedef Checksum krb5_checksum;

     _v_o_i_d
     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);

     _k_r_b_5___b_o_o_l_e_a_n
     kkrrbb55__cchheecckkssuumm__iiss__ccoolllliissiioonn__pprrooooff(_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);

     _k_r_b_5___b_o_o_l_e_a_n
     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);

     _k_r_b_5___e_r_r_o_r___c_o_d_e
     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);

     _k_r_b_5___e_r_r_o_r___c_o_d_e
     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,
         _s_i_z_e___t _*_s_i_z_e);

     _k_r_b_5___e_r_r_o_r___c_o_d_e
     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,
         _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,
         _C_h_e_c_k_s_u_m _*_r_e_s_u_l_t);

     _k_r_b_5___e_r_r_o_r___c_o_d_e
     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,
         _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);

     _k_r_b_5___e_r_r_o_r___c_o_d_e
     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,
         _k_r_b_5___c_k_s_u_m_t_y_p_e _*_t_y_p_e);

     _v_o_i_d
     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);

     _v_o_i_d
     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);

     _k_r_b_5___e_r_r_o_r___c_o_d_e
     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,
         _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);

     _k_r_b_5___e_r_r_o_r___c_o_d_e
     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,
         _k_r_b_5___c_h_e_c_k_s_u_m _*_*_n_e_w);

DDEESSCCRRIIPPTTIIOONN
     The krb5_checksum structure holds a Kerberos checksum.  There is no com-
     ponent inside krb5_checksum that is directly referable.

     The functions are used to create and verify checksums.
     kkrrbb55__ccrreeaattee__cchheecckkssuumm() creates a checksum of the specified data, and puts
     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
     type to use; it must not be keyed. Otherwise _c_r_y_p_t_o is an encryption con-
     text created by kkrrbb55__ccrryyppttoo__iinniitt(), and _u_s_a_g_e___o_r___t_y_p_e specifies a key-
     usage.

     kkrrbb55__vveerriiffyy__cchheecckkssuumm() verifies the _c_h_e_c_k_s_u_m against the provided data.

     kkrrbb55__cchheecckkssuumm__iiss__ccoolllliissiioonn__pprrooooff() returns true is the specified checksum
     is collision proof (that it's very unlikely that two strings has the same
     hash value, and that it's hard to find two strings that has the same
     hash). Examples of collision proof checksums are MD5, and SHA1, while
     CRC32 is not.

     kkrrbb55__cchheecckkssuumm__iiss__kkeeyyeedd() returns true if the specified checksum type is
     keyed (that the hash value is a function of both the data, and a separate
     key). Examples of keyed hash algorithms are HMAC-SHA1-DES3, and RSA-
     MD5-DES. The ``plain'' hash functions MD5, and SHA1 are not keyed.

     kkrrbb55__ccrryyppttoo__ggeett__cchheecckkssuumm__ttyyppee() returns the checksum type that will be
     used when creating a checksum for the given _c_r_y_p_t_o context.  This func-
     tion is useful in combination with kkrrbb55__cchheecckkssuummssiizzee() when you want to
     know the size a checksum will use when you create it.

     kkrrbb55__cckkssuummttyyppee__vvaalliidd() returns 0 or an error if the checksumtype is
     implemented and not currently disabled in this kerberos library.

     kkrrbb55__cchheecckkssuummssiizzee() returns the size of the outdata of checksum function.

     kkrrbb55__ccooppyy__cchheecckkssuumm() returns a copy of the checksum kkrrbb55__ffrreeee__cchheecckkssuumm()
     should use used to free the _n_e_w checksum.

     kkrrbb55__ffrreeee__cchheecckkssuumm() free the checksum and the content of the checksum.

     kkrrbb55__ffrreeee__cchheecckkssuumm__ccoonntteennttss() frees the content of checksum in _c_k_s_u_m.

     kkrrbb55__hhmmaacc() calculates the HMAC over _d_a_t_a (with length _l_e_n) using the
     keyusage _u_s_a_g_e and keyblock _k_e_y.  Note that keyusage is not always used
     in checksums.

     kkrrbb55__cchheecckkssuumm__ddiissaabbllee globally disables the checksum type.

SSEEEE AALLSSOO
     krb5_crypto_init(3), krb5_c_encrypt(3), krb5_encrypt(3)

HEIMDAL                         August 12, 2005                        HEIMDAL