10Sstevel@tonic-gate /* 20Sstevel@tonic-gate * Copyright (C) 1998 by the FundsXpress, INC. 30Sstevel@tonic-gate * 40Sstevel@tonic-gate * All rights reserved. 50Sstevel@tonic-gate * 60Sstevel@tonic-gate * Export of this software from the United States of America may require 70Sstevel@tonic-gate * a specific license from the United States Government. It is the 80Sstevel@tonic-gate * responsibility of any person or organization contemplating export to 90Sstevel@tonic-gate * obtain such a license before exporting. 100Sstevel@tonic-gate * 110Sstevel@tonic-gate * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and 120Sstevel@tonic-gate * distribute this software and its documentation for any purpose and 130Sstevel@tonic-gate * without fee is hereby granted, provided that the above copyright 140Sstevel@tonic-gate * notice appear in all copies and that both that copyright notice and 150Sstevel@tonic-gate * this permission notice appear in supporting documentation, and that 160Sstevel@tonic-gate * the name of FundsXpress. not be used in advertising or publicity pertaining 170Sstevel@tonic-gate * to distribution of the software without specific, written prior 180Sstevel@tonic-gate * permission. FundsXpress makes no representations about the suitability of 190Sstevel@tonic-gate * this software for any purpose. It is provided "as is" without express 200Sstevel@tonic-gate * or implied warranty. 210Sstevel@tonic-gate * 220Sstevel@tonic-gate * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 230Sstevel@tonic-gate * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 240Sstevel@tonic-gate * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 250Sstevel@tonic-gate */ 260Sstevel@tonic-gate 27*7934SMark.Phalan@Sun.COM #include "k5-int.h" 280Sstevel@tonic-gate 29*7934SMark.Phalan@Sun.COM void krb5_dk_encrypt_length 30*7934SMark.Phalan@Sun.COM (const struct krb5_enc_provider *enc, 31*7934SMark.Phalan@Sun.COM const struct krb5_hash_provider *hash, 32*7934SMark.Phalan@Sun.COM size_t input, size_t *length); 330Sstevel@tonic-gate 34*7934SMark.Phalan@Sun.COM krb5_error_code krb5_dk_encrypt 350Sstevel@tonic-gate ( 36*7934SMark.Phalan@Sun.COM krb5_context context, 37*7934SMark.Phalan@Sun.COM const struct krb5_enc_provider *enc, 38*7934SMark.Phalan@Sun.COM const struct krb5_hash_provider *hash, 39*7934SMark.Phalan@Sun.COM const krb5_keyblock *key, krb5_keyusage usage, 40*7934SMark.Phalan@Sun.COM const krb5_data *ivec, 41*7934SMark.Phalan@Sun.COM const krb5_data *input, krb5_data *output); 420Sstevel@tonic-gate 430Sstevel@tonic-gate extern krb5_error_code krb5_dk_decrypt 440Sstevel@tonic-gate (krb5_context context, 450Sstevel@tonic-gate krb5_const struct krb5_enc_provider *enc, 460Sstevel@tonic-gate krb5_const struct krb5_hash_provider *hash, 470Sstevel@tonic-gate krb5_const krb5_keyblock *key, krb5_keyusage usage, 480Sstevel@tonic-gate krb5_const krb5_data *ivec, krb5_const krb5_data *input, 490Sstevel@tonic-gate krb5_data *arg_output); 500Sstevel@tonic-gate 510Sstevel@tonic-gate extern krb5_error_code krb5_derive_key 520Sstevel@tonic-gate (krb5_context context, 530Sstevel@tonic-gate krb5_const struct krb5_enc_provider *enc, 540Sstevel@tonic-gate krb5_const krb5_keyblock *inkey, 550Sstevel@tonic-gate krb5_keyblock *outkey, krb5_const krb5_data *in_constant); 560Sstevel@tonic-gate 570Sstevel@tonic-gate extern krb5_error_code krb5_dk_make_checksum 580Sstevel@tonic-gate (krb5_context context, 590Sstevel@tonic-gate krb5_const struct krb5_hash_provider *hash, 600Sstevel@tonic-gate krb5_const krb5_keyblock *key, krb5_keyusage usage, 610Sstevel@tonic-gate krb5_const krb5_data *input, krb5_data *output); 620Sstevel@tonic-gate 630Sstevel@tonic-gate 640Sstevel@tonic-gate #ifndef _KERNEL 65*7934SMark.Phalan@Sun.COM extern krb5_error_code krb5int_dk_string_to_key 660Sstevel@tonic-gate (krb5_context context, 670Sstevel@tonic-gate krb5_const struct krb5_enc_provider *enc, 680Sstevel@tonic-gate krb5_const krb5_data *string, 690Sstevel@tonic-gate krb5_const krb5_data *salt, 700Sstevel@tonic-gate krb5_const krb5_data *params, 710Sstevel@tonic-gate krb5_keyblock *key); 720Sstevel@tonic-gate #endif 730Sstevel@tonic-gate 740Sstevel@tonic-gate void krb5int_aes_encrypt_length 75*7934SMark.Phalan@Sun.COM (const struct krb5_enc_provider *enc, 760Sstevel@tonic-gate const struct krb5_hash_provider *hash, 770Sstevel@tonic-gate size_t input, size_t *length); 780Sstevel@tonic-gate 790Sstevel@tonic-gate krb5_error_code krb5int_aes_dk_encrypt 800Sstevel@tonic-gate ( krb5_context context, 810Sstevel@tonic-gate const struct krb5_enc_provider *enc, 820Sstevel@tonic-gate const struct krb5_hash_provider *hash, 830Sstevel@tonic-gate const krb5_keyblock *key, krb5_keyusage usage, 840Sstevel@tonic-gate const krb5_data *ivec, 850Sstevel@tonic-gate const krb5_data *input, krb5_data *output); 860Sstevel@tonic-gate 870Sstevel@tonic-gate krb5_error_code krb5int_aes_dk_decrypt 880Sstevel@tonic-gate ( krb5_context context, 890Sstevel@tonic-gate const struct krb5_enc_provider *enc, 900Sstevel@tonic-gate const struct krb5_hash_provider *hash, 910Sstevel@tonic-gate const krb5_keyblock *key, krb5_keyusage usage, 920Sstevel@tonic-gate const krb5_data *ivec, const krb5_data *input, 930Sstevel@tonic-gate krb5_data *arg_output); 940Sstevel@tonic-gate 950Sstevel@tonic-gate extern krb5_error_code 960Sstevel@tonic-gate krb5int_aes_string_to_key (krb5_context context, 970Sstevel@tonic-gate const struct krb5_enc_provider *, 980Sstevel@tonic-gate const krb5_data *, const krb5_data *, 990Sstevel@tonic-gate const krb5_data *, krb5_keyblock *key); 100