source: trunk/third/ssh/mpaux.h @ 12646

Revision 12646, 1.4 KB checked in by danw, 26 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r12645, which included commits to RCS files with non-trunk default branches.
Line 
1/*
2
3mpaux.h
4
5Author: Tatu Ylonen <ylo@cs.hut.fi>
6
7Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8                   All rights reserved
9
10Created: Sun Jul 16 04:29:30 1995 ylo
11
12This file contains various auxiliary functions related to multiple
13precision integers.
14
15*/
16
17/*
18 * $Id: mpaux.h,v 1.1.1.2 1999-03-08 17:43:41 danw Exp $
19 * $Log: not supported by cvs2svn $
20 * Revision 1.1.1.1  1996/02/18  21:38:10  ylo
21 *      Imported ssh-1.2.13.
22 *
23 * Revision 1.1  1995/07/27  03:28:03  ylo
24 *      Auxiliary functions for manipulating mp-ints.
25 *
26 * $Endlog$
27 */
28
29#ifndef MPAUX_H
30#define MPAUX_H
31
32/* Converts a multiple-precision integer into bytes to be stored in the buffer.
33   The buffer will contain the value of the integer, msb first. */
34void mp_linearize_msb_first(unsigned char *buf, unsigned int len,
35                            MP_INT *value);
36
37/* Extract a multiple-precision integer from buffer.  The value is stored
38   in the buffer msb first. */
39void mp_unlinearize_msb_first(MP_INT *value, const unsigned char *buf,
40                              unsigned int len);
41
42/* Computes a 16-byte session id in the global variable session_id.
43   The session id is computed by concatenating the linearized, msb
44   first representations of host_key_n, session_key_n, and the cookie. */
45void compute_session_id(unsigned char session_id[16],
46                        unsigned char cookie[8],
47                        unsigned int host_key_bits,
48                        MP_INT *host_key_n,
49                        unsigned int session_key_bits,
50                        MP_INT *session_key_n);
51
52#endif /* MPAUX_H */
Note: See TracBrowser for help on using the repository browser.