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 :(
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>
14 .TH XCRYPT 3 2003-04-04 "" "Linux Programmer's Manual"
17 .\"O xencrypt, xdecrypt, passwd2des \- RFS password encryption
18 xencrypt, xdecrypt, passwd2des \- RFS ¥Ñ¥¹¥ï¡¼¥É°Å¹æ²½
21 .B "#include <rpc/des_crypt.h>"
23 .BI "void passwd2des(char " *passwd ", char *" key ");"
25 .BI "int xencrypt(char *" secret ", char *" passwd ");"
27 .BI "int xdecrypt(char *" secret ", char *" passwd ");"
31 .\"O .BR passwd2des ()
32 .\"O takes a character string
34 .\"O of arbitrary length and fills a character array
39 .\"O is suitable for use as DES key.
40 .\"O It has odd parity set in bit 0 of each byte.
45 ¤ò¤È¤ê¡¢Ä¹¤µ 8 ¤Îʸ»úÇÛÎó
50 ¤Ï DES ¥¡¼¤È¤·¤Æ»È¤¦¤Î¤ËŬ¤·¤Æ¤¤¤ë¡£
51 ¤³¤ÎÇÛÎó¤Î³Æ¥Ð¥¤¥È¤Î¥Ó¥Ã¥È 0 ¤Ï´ñ¿ô¥Ñ¥ê¥Æ¥£¤Ç¤¢¤ë¡£
52 .\"O Both other functions described here use this function to turn their
56 ¤³¤³¤ÇÀâÌÀ¤µ¤ì¤Æ¤¤¤ë»Ä¤ê¤Î 2 ¤Ä¤Î´Ø¿ô¤Ï¡¢
57 ¤³¤Î´Ø¿ô¤ò»È¤¤¡¢°ú¤¿ô
59 ¤ò DES ¥¡¼¤ËÊÑ´¹¤¹¤ë¡£
63 .\"O function takes the ASCII character string
66 .\"O .\" (over the alphabet 0123456789abcdefABCDEF),
69 .\" (¥¢¥ë¥Õ¥¡¥Ù¥Ã¥È 0123456789abcdefABCDEF ¤Çɽ¤µ¤ì¤ë)
70 16 ¿Ê¿ô¤ÇÍ¿¤¨¤é¤ì¤¿ ASCII ʸ»úÎó
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
78 .\"O .BR passwd2des (),
83 ¤«¤éƳ¤½Ð¤µ¤ì¤¿ DES ¥¡¼¤ò»È¤¤¡¢
86 .\"O and outputs the result again in
89 .\"O .\" (over the alphabet 0123456789abcdef)
90 .\"O of the same length.
92 .\" (¥¢¥ë¥Õ¥¡¥Ù¥Ã¥È 0123456789abcdef ¤Çɽ¤µ¤ì¤ë)
95 ¤ËºÆ¤ÓƱ¤¸Ä¹¤µ¤Ç½ÐÎϤµ¤ì¤ë¡£
99 .\"O function performs the converse operation.
101 ´Ø¿ô¤ÏµÕ¤ÎÁàºî¤ò¹Ô¤¦¡£
102 .\"O .SH "RETURN VALUE"
108 .\"O return 1 on success and 0 on error.
113 ¤Ï¡¢À®¸ù¤·¤¿¾ì¹ç¤Ë 1 ¤òÊÖ¤·¡¢¼ºÇÔ¤·¤¿¾ì¹ç¤Ë 0 ¤òÊÖ¤¹¡£
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 °Ê¹ß¤Ë¸ºß¤¹¤ë¡£
121 .\"O The prototypes are missing from the abovementioned include file.
122 ¾åµ¤Î¥¤¥ó¥¯¥ë¡¼¥É¥Õ¥¡¥¤¥ë¤Ë¥×¥í¥È¥¿¥¤¥×¤¬¤Ê¤¤¡£