1 .\" @(#)des_crypt.3 2.1 88/08/11 4.0 RPCSRC; from 1.16 88/03/02 SMI;
3 .\" Taken from libc4 sources, which say:
4 .\" Copyright (C) 1993 Eric Young - can be distributed under GPL.
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).
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>
15 .TH DES_CRYPT 3 2007-05-18 "" "Linux Programmer's Manual"
18 .\"O des_crypt, ecb_crypt, cbc_crypt, des_setparity, DES_FAILED \- fast
20 des_crypt, ecb_crypt, cbc_crypt, des_setparity, DES_FAILED \- 高速な DES 暗号化
26 .\" .B #include <des_crypt.h>
27 .B #include <rpc/des_crypt.h>
29 .BI "int ecb_crypt(char *" key ", char *" data ", unsigned " datalen ,
30 .BI " unsigned " mode );
32 .BI "int cbc_crypt(char *" key ", char *" data ", unsigned " datalen ,
33 .BI " unsigned " mode ", char *" ivec );
35 .BI "void des_setparity(char *" key );
37 .BI "int DES_FAILED(int " status );
47 .\"O (Data Encryption Standard).
54 (Data Encryption Standard, データ暗号化規格) を実装している。
55 .\"O These routines are faster and more general purpose than
60 .\"O They also are able to utilize
62 .\"O hardware if it is available.
69 .\"O (Electronic Code Book)
70 .\"O mode, which encrypts blocks of data independently.
74 (Electronic Code Book) モードで暗号化する。
75 このモードでは (個々の) データのブロックを独立して暗号化する
79 .\"O (Cipher Block Chaining)
80 .\"O mode, which chains together
81 .\"O successive blocks.
85 (Cipher Block Chaining) モードで暗号化する。
86 このモードでは連続するブロックを互いに連鎖させて暗号化する。
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.
93 はブロックの挿入・削除・置き換えから保護する。
96 .\"O Here is how to use these routines.
97 .\"O The first argument,
99 .\"O is the 8-byte encryption key with parity.
103 はパリティ付きの 8 バイトの暗号化鍵である。
104 .\"O To set the key's parity, which for
106 .\"O is in the low bit of each byte, use
107 .\"O .BR des_setparity ().
112 の場合、鍵のパリティは各バイトの最下位ビットである。
113 .\"O The second argument,
115 .\"O contains the data to be encrypted or decrypted.
122 .\"O is the length in bytes of
124 .\"O which must be a multiple of 8.
129 のバイト長であり、8 の倍数でなければならない。
130 .\"O The fourth argument,
132 .\"O is formed by ORing together some things.
135 はいくつかの値を OR することで作成する。
136 .\"O For the encryption direction OR in either
139 .\"O .BR DES_DECRYPT .
140 暗号化の方向 (訳註: 暗号化なのか復号化なのか) を指定するため、
145 .\"O For software versus hardware
146 .\"O encryption, OR in either
150 暗号化をソフトウェアで行うかハードウェアで行うかを指定するため、
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 .
161 が指定されていて、かつハードウェアがない場合、
162 暗号化はソフトウェアで実行されて、ルーチンは
163 .BR DESERR_NOHWDEVICE
166 .\"O .BR cbc_crypt (),
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.
176 はデータブロックを連鎖させる際の 8 バイトの初期化ベクトルである。
177 この引き数はルーチンから戻るときに次の初期化ベクトルに更新される。
178 .\"O .SH RETURN VALUE
187 .\"O .BR DESERR_NOHWDEVICE
189 .\"O Encryption succeeded, but done in software instead of the requested hardware.
190 暗号化は成功したが、要求されたハードウェアの代わりにソフトウェアで実行された。
192 .\"O .BR DESERR_HWERROR
194 .\"O An error occurred in the hardware or driver.
195 ハードウェアまたはドライバでエラーが発生した。
197 .\"O .BR DESERR_BADPARAM
199 .\"O Bad argument to routine.
203 .\"O Given a result status
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.
215 .BI DES_FAILED( stat )
216 が false になるのは、最初の 2 つだけである。
217 .\"O .\" So far the Sun page
218 .\"O .\" Some additions - aeb
219 .\" ここまでが Sun の man ページである。
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"
229 .\"O Not in POSIX.1-2001.
230 4.3BSD. POSIX.1-2001 にはない。