OSDN Git Service

(split) Convert release and draft pages to UTF-8.
[linuxjm/LDP_man-pages.git] / draft / man3 / des_crypt.3
1 .\" @(#)des_crypt.3     2.1 88/08/11 4.0 RPCSRC; from 1.16 88/03/02 SMI;
2 .\"
3 .\" Taken from libc4 sources, which say:
4 .\" Copyright (C) 1993 Eric Young - can be distributed under GPL.
5 .\"
6 .\" However, the above header line suggests that this file in fact is
7 .\" Copyright Sun Microsystems, Inc (and is provided for unrestricted use,
8 .\" see other Sun RPC sources).
9 .\"
10 .\" Japanese Version Copyright (c) 2004 Yuichi SATO
11 .\"         all rights reserved.
12 .\" Translated Fri Jul 23 05:53:35 JST 2004
13 .\"         by Yuichi SATO <ysato444@yahoo.co.jp>
14 .\"
15 .TH DES_CRYPT 3  2007-05-18 "" "Linux Programmer's Manual"
16 .\"O .SH NAME
17 .SH 名前
18 .\"O des_crypt, ecb_crypt, cbc_crypt, des_setparity, DES_FAILED \- fast
19 .\"O DES encryption
20 des_crypt, ecb_crypt, cbc_crypt, des_setparity, DES_FAILED \- 高速な DES 暗号化
21 .\"O .SH SYNOPSIS
22 .SH 書式
23 .nf
24 .\"O .\" Sun version
25 .\" Sun の場合は
26 .\" .B #include <des_crypt.h>
27 .B #include <rpc/des_crypt.h>
28 .LP
29 .BI "int ecb_crypt(char *" key ", char *" data ", unsigned " datalen ,
30 .BI "              unsigned " mode );
31 .LP
32 .BI "int cbc_crypt(char *" key ", char *" data ", unsigned " datalen ,
33 .BI "              unsigned " mode ", char *" ivec );
34 .LP
35 .BI "void des_setparity(char *" key );
36 .LP
37 .BI "int DES_FAILED(int " status );
38 .fi
39 .\"O .SH DESCRIPTION
40 .SH 説明
41 .\"O .BR ecb_crypt ()
42 .\"O and
43 .\"O .BR cbc_crypt ()
44 .\"O implement the
45 .\"O NBS
46 .\"O DES
47 .\"O (Data Encryption Standard).
48 .BR ecb_crypt ()
49
50 .BR cbc_crypt ()
51
52 NBS
53 DES
54 (Data Encryption Standard, データ暗号化規格) を実装している。
55 .\"O These routines are faster and more general purpose than
56 .\"O .BR crypt (3).
57 これらのルーチンは
58 .BR crypt (3)
59 よりも高速でより一般的な目的に使用できる。
60 .\"O They also are able to utilize
61 .\"O DES
62 .\"O hardware if it is available.
63 利用可能であれば、これらのルーチンは
64 DES
65 ハードウェアを使用することもできる。
66 .\"O .BR ecb_crypt ()
67 .\"O encrypts in
68 .\"O ECB
69 .\"O (Electronic Code Book)
70 .\"O mode, which encrypts blocks of data independently.
71 .BR ecb_crypt ()
72
73 ECB
74 (Electronic Code Book) モードで暗号化する。
75 このモードでは (個々の) データのブロックを独立して暗号化する
76 .\"O .BR cbc_crypt ()
77 .\"O encrypts in
78 .\"O CBC
79 .\"O (Cipher Block Chaining)
80 .\"O mode, which chains together
81 .\"O successive blocks.
82 .BR cbc_crypt ()
83
84 CBC
85 (Cipher Block Chaining) モードで暗号化する。
86 このモードでは連続するブロックを互いに連鎖させて暗号化する。
87 .\"O CBC
88 .\"O mode protects against insertions, deletions and
89 .\"O substitutions of blocks.
90 .\"O Also, regularities in the clear text will
91 .\"O not appear in the cipher text.
92 CBC
93 はブロックの挿入・削除・置き換えから保護する。
94 また平文の規則性が暗号文に現れない。
95 .LP
96 .\"O Here is how to use these routines.
97 .\"O The first argument,
98 .\"O .IR key ,
99 .\"O is the 8-byte encryption key with parity.
100 これらのルーチンの使用法を示す。
101 第 1 引き数
102 .I key
103 はパリティ付きの 8 バイトの暗号化鍵である。
104 .\"O To set the key's parity, which for
105 .\"O DES
106 .\"O is in the low bit of each byte, use
107 .\"O .BR des_setparity ().
108 鍵のパリティを設定するには
109 .BR des_setparity ()
110 を使うこと。
111 DES
112 の場合、鍵のパリティは各バイトの最下位ビットである。
113 .\"O The second argument,
114 .\"O .IR data ,
115 .\"O contains the data to be encrypted or decrypted.
116 第 2 引き数
117 .I data
118 は暗号化または復号化されるデータを含む。
119 .\"O The
120 .\"O third argument,
121 .\"O .IR datalen ,
122 .\"O is the length in bytes of
123 .\"O .IR data ,
124 .\"O which must be a multiple of 8.
125 第 3 引き数
126 .I datalen
127
128 .I data
129 のバイト長であり、8 の倍数でなければならない。
130 .\"O The fourth argument,
131 .\"O .IR mode ,
132 .\"O is formed by ORing together some things.
133 第 4 引き数
134 .I mode
135 はいくつかの値を OR することで作成する。
136 .\"O For the encryption direction OR in either
137 .\"O .BR DES_ENCRYPT
138 .\"O or
139 .\"O .BR DES_DECRYPT .
140 暗号化の方向 (訳註: 暗号化なのか復号化なのか) を指定するため、
141 .BR DES_ENCRYPT
142 または
143 .BR DES_DECRYPT
144 を OR する。
145 .\"O For software versus hardware
146 .\"O encryption, OR in either
147 .\"O .BR DES_HW
148 .\"O or
149 .\"O .BR DES_SW .
150 暗号化をソフトウェアで行うかハードウェアで行うかを指定するため、
151 .BR DES_HW
152 または
153 .BR DES_SW
154 を OR する。
155 .\"O If
156 .\"O .BR DES_HW
157 .\"O is specified, and there is no hardware, then the encryption is performed
158 .\"O in software and the routine returns
159 .\"O .BR DESERR_NOHWDEVICE .
160 .BR DES_HW
161 が指定されていて、かつハードウェアがない場合、
162 暗号化はソフトウェアで実行されて、ルーチンは
163 .BR DESERR_NOHWDEVICE
164 を返す。
165 .\"O For
166 .\"O .BR cbc_crypt (),
167 .\"O the argument
168 .\"O .I ivec
169 .\"O is the 8-byte initialization
170 .\"O vector for the chaining.
171 .\"O It is updated to the next initialization
172 .\"O vector upon return.
173 .BR cbc_crypt ()
174 において、引き数
175 .I ivec
176 はデータブロックを連鎖させる際の 8 バイトの初期化ベクトルである。
177 この引き数はルーチンから戻るときに次の初期化ベクトルに更新される。
178 .\"O .SH RETURN VALUE
179 .SH 返り値
180 .PD 0
181 .TP 20
182 .\"O .BR DESERR_NONE
183 .B DESERR_NONE
184 .\"O No error.
185 エラーなし。
186 .TP
187 .\"O .BR DESERR_NOHWDEVICE
188 .B DESERR_NOHWDEVICE
189 .\"O Encryption succeeded, but done in software instead of the requested hardware.
190 暗号化は成功したが、要求されたハードウェアの代わりにソフトウェアで実行された。
191 .TP
192 .\"O .BR DESERR_HWERROR
193 .B DESERR_HWERROR
194 .\"O An error occurred in the hardware or driver.
195 ハードウェアまたはドライバでエラーが発生した。
196 .TP
197 .\"O .BR DESERR_BADPARAM
198 .B DESERR_BADPARAM
199 .\"O Bad argument to routine.
200 ルーチンへの引き数が不正である。
201 .PD
202 .LP
203 .\"O Given a result status
204 .\"O .IR stat ,
205 .\"O the macro
206 .\"O .\" .BR DES_FAILED\c
207 .\"O .\" .BR ( stat )
208 .\"O .BI DES_FAILED( stat )
209 .\"O is false only for the first two statuses.
210 結果の状態
211 .I stat
212 を与えたとき、マクロ
213 .\" .BR DES_FAILED\c
214 .\" .BR ( stat )
215 .BI DES_FAILED( stat )
216 が false になるのは、最初の 2 つだけである。
217 .\"O .\" So far the Sun page
218 .\"O .\" Some additions - aeb
219 .\" ここまでが Sun の man ページである。
220 .\" aeb がいくつか追加を行った。
221 .\"O .SH VERSIONS
222 .SH バージョン
223 .\"O These routines are present in libc 4.6.27 and later, and in
224 .\"O glibc 2.1 and later.
225 これらのルーチンは libc 4.6.27 以降と glibc 2.1 以降に存在する。
226 .\"O .SH "CONFORMING TO"
227 .SH 準拠
228 .\"O 4.3BSD.
229 .\"O Not in POSIX.1-2001.
230 4.3BSD. POSIX.1-2001 にはない。
231 .\"O .SH "SEE ALSO"
232 .SH 関連項目
233 .BR des (1),
234 .BR crypt (3),
235 .BR xcrypt (3)