OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / draft / man3 / xcrypt.3
1 .\"  Copyright 2003 walter harms (walter.harms@informatik.uni-oldenburg.de)
2 .\"  Distributed under GPL
3 .\"  this is the 3rd type of interface for cryptographic routines
4 .\"  1. encrypt() expects a bit field
5 .\"  2. cbc_crypt() byte values
6 .\"  3. xencrypt() a hexstring
7 .\"  to bad to be true :(
8 .\"
9 .\" Japanese Version Copyright (c) 2004 Yuichi SATO
10 .\"         all rights reserved.
11 .\" Translated Wed Sep 15 01:02:11 JST 2004
12 .\"         by Yuichi SATO <ysato444@yahoo.co.jp>
13 .\"
14 .TH XCRYPT 3 2003-04-04 "" "Linux Programmer's Manual"
15 .\"O .SH NAME
16 .SH Ì¾Á°
17 .\"O xencrypt, xdecrypt, passwd2des \- RFS password encryption
18 xencrypt, xdecrypt, passwd2des \- RFS ¥Ñ¥¹¥ï¡¼¥É°Å¹æ²½
19 .\"O .SH SYNOPSIS
20 .SH ½ñ¼°
21 .B "#include <rpc/des_crypt.h>"
22 .sp
23 .BI "void passwd2des(char " *passwd ", char *" key ");"
24 .sp
25 .BI "int xencrypt(char *" secret ", char *" passwd ");"
26 .sp
27 .BI "int xdecrypt(char *" secret ", char *" passwd ");"
28 .\"O .SH DESCRIPTION
29 .SH ÀâÌÀ
30 .\"O The function
31 .\"O .BR passwd2des ()
32 .\"O takes a character string
33 .\"O .I passwd
34 .\"O of arbitrary length and fills a character array
35 .\"O .I key
36 .\"O of length 8.
37 .\"O The array
38 .\"O .I key
39 .\"O is suitable for use as DES key.
40 .\"O It has odd parity set in bit 0 of each byte.
41 ´Ø¿ô
42 .BR passwd2des ()
43 ¤ÏǤ°Õ¤ÎŤµ¤Îʸ»úÎó
44 .I passwd
45 ¤ò¤È¤ê¡¢Ä¹¤µ 8 ¤Îʸ»úÇÛÎó
46 .I key
47 ¤òËä¤á¤ë¡£
48 ÇÛÎó
49 .I key
50 ¤Ï DES ¥­¡¼¤È¤·¤Æ»È¤¦¤Î¤ËŬ¤·¤Æ¤¤¤ë¡£
51 ¤³¤ÎÇÛÎó¤Î³Æ¥Ð¥¤¥È¤Î¥Ó¥Ã¥È 0 ¤Ï´ñ¿ô¥Ñ¥ê¥Æ¥£¤Ç¤¢¤ë¡£
52 .\"O Both other functions described here use this function to turn their
53 .\"O argument
54 .\"O .I passwd
55 .\"O into a DES key.
56 ¤³¤³¤ÇÀâÌÀ¤µ¤ì¤Æ¤¤¤ë»Ä¤ê¤Î 2 ¤Ä¤Î´Ø¿ô¤Ï¡¢
57 ¤³¤Î´Ø¿ô¤ò»È¤¤¡¢°ú¤­¿ô
58 .I passwd
59 ¤ò DES ¥­¡¼¤ËÊÑ´¹¤¹¤ë¡£
60 .LP
61 .\"O The
62 .\"O .BR xencrypt ()
63 .\"O function takes the ASCII character string
64 .\"O .I secret
65 .\"O given in hex,
66 .\"O .\" (over the alphabet 0123456789abcdefABCDEF),
67 .BR xencrypt ()
68 ´Ø¿ô¤Ï
69 .\" (¥¢¥ë¥Õ¥¡¥Ù¥Ã¥È 0123456789abcdefABCDEF ¤Çɽ¤µ¤ì¤ë)
70 16 ¿Ê¿ô¤ÇÍ¿¤¨¤é¤ì¤¿ ASCII Ê¸»úÎó
71 .I secret
72 ¤ò¤È¤ë¡£
73 .\"O which must have a length that is a multiple of 16,
74 ¤³¤ÎŤµ¤Ï 16 ¤ÎÇÜ¿ô¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
75 .\"O encrypts it using the DES key derived from
76 .\"O .I passwd
77 .\"O by
78 .\"O .BR passwd2des (),
79 ¤½¤·¤Æ
80 .BR passwd2des ()
81 ¤Ë¤è¤Ã¤Æ
82 .I passwd
83 ¤«¤éƳ¤­½Ð¤µ¤ì¤¿ DES ¥­¡¼¤ò»È¤¤¡¢
84 .I secret
85 ¤ò°Å¹æ²½¤¹¤ë¡£
86 .\"O and outputs the result again in
87 .\"O .I secret
88 .\"O as a hex string
89 .\"O .\" (over the alphabet 0123456789abcdef)
90 .\"O of the same length.
91 ¤½¤Î·ë²Ì¤Ï
92 .\" (¥¢¥ë¥Õ¥¡¥Ù¥Ã¥È 0123456789abcdef ¤Çɽ¤µ¤ì¤ë)
93 16 ¿Ê¿ôʸ»úÎó¤È¤·¤Æ
94 .I secret
95 ¤ËºÆ¤ÓƱ¤¸Ä¹¤µ¤Ç½ÐÎϤµ¤ì¤ë¡£
96 .LP
97 .\"O The
98 .\"O .BR xdecrypt ()
99 .\"O function performs the converse operation.
100 .BR xdecrypt ()
101 ´Ø¿ô¤ÏµÕ¤ÎÁàºî¤ò¹Ô¤¦¡£
102 .\"O .SH "RETURN VALUE"
103 .SH ÊÖ¤êÃÍ
104 .\"O The functions
105 .\"O .BR xencrypt ()
106 .\"O and
107 .\"O .BR xdecrypt ()
108 .\"O return 1 on success and 0 on error.
109 ´Ø¿ô
110 .BR xencrypt ()
111 ¤È
112 .BR xdecrypt ()
113 ¤Ï¡¢À®¸ù¤·¤¿¾ì¹ç¤Ë 1 ¤òÊÖ¤·¡¢¼ºÇÔ¤·¤¿¾ì¹ç¤Ë 0 ¤òÊÖ¤¹¡£
114 .\"O .SH VERSIONS
115 .SH ¥Ð¡¼¥¸¥ç¥ó
116 .\"O These routines are present in libc 4.6.27 and later, and in
117 .\"O glibc 2.1 and later.
118 ¤³¤ì¤é¤Î¥ë¡¼¥Á¥ó¤Ï libc 4.6.27 °Ê¹ß¤È glibc 2.1 °Ê¹ß¤Ë¸ºß¤¹¤ë¡£
119 .\"O .SH BUGS
120 .SH ¥Ð¥°
121 .\"O The prototypes are missing from the abovementioned include file.
122 ¾åµ­¤Î¥¤¥ó¥¯¥ë¡¼¥É¥Õ¥¡¥¤¥ë¤Ë¥×¥í¥È¥¿¥¤¥×¤¬¤Ê¤¤¡£
123 .\"O .SH "SEE ALSO"
124 .SH ´ØÏ¢¹àÌÜ
125 .BR cbc_crypt (3)