File: crypt.3

package info (click to toggle)
manpages-pt 20011020-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 3,052 kB
  • ctags: 5
  • sloc: makefile: 49
file content (120 lines) | stat: -rw-r--r-- 5,000 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
.\" Michael Haardt (michael@cantor.informatik.rwth.aachen.de) Sat Sep  3 22:00:30 MET DST 1994
.\"
.\" This is free documentation; you can redistribute it and/or
.\" modify it under the terms of the GNU General Public License as
.\" published by the Free Software Foundation; either version 2 of
.\" the License, or (at your option) any later version.
.\"
.\" The GNU General Public License's references to "object code"
.\" and "executables" are to be interpreted as the output of any
.\" document formatting or typesetting system, including
.\" intermediate and printed output.
.\"
.\" This manual is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public
.\" License along with this manual; if not, write to the Free
.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
.\" USA.
.\"
.\" Sun Feb 19 21:32:25 1995, faith@cs.unc.edu edited details away
.\"
.\" A FAZER: esta pgina deve descrever com mais detalhes o comportamento do DES,
.\" a string que ser codificada e os determinantes dos fatores de repetio.
.\" Usa-se uma repetio simples com ECB ou algo mais avanado? Espero que as explicaes
.\" atuais sejam teis, mas no suficientes.
.\"
.\" acrescentado _XOPEN_SOURCE, aeb, 970705
.\" "
.TH CRYPT 3 "September 3, 1994" "" "Library functions"
.SH NOME
crypt \- encriptao de senhas e dados
.SH SINOPSE
.B #define _XOPEN_SOURCE
.br
.B #include <unistd.h>
.sp
.BI "char *crypt(const char *" key ", const char *" salt );
.SH DESCRIO
.B crypt
 a funo de encriptao de senhas.  baseada no algoritmo DES, que 
implementado de modo a, entre outras coisas, dificultar implementaes em hardware
de buscas de chaves.
.PP
.I key
 a senha digitada pelo usurio.
.PP
.I salt
 uma string de dois caracteres do conjunto
[\fBa\fP\(en\fBzA\fP\(en\fBZ0\fP\(en\fB9./\fP].  Esta string pode modificar o
algoritmo de 4096 modos diferentes.
.PP
Uma chave de 56 bits  obtida usando os 7 bits menos significativos de
.IR key .
Esta chave codifica repetidamente uma string constante (normalmente uma string s
de zeros), e o valor resultante aponta para a senha codificada: uma seqncia de
13 caracteres ASCII imprimveis (sendo os primeiros dois o salt). O valor retornado
aponta para dados estticos cujo contedo  sobrescrito a cada chamada da funo.
.PP
Aviso: a chave tem
.if t 2\s-2\u56\s0\d
.if n 2**56
7.2e16 valores possveis. Podem ser feitas buscas exaustivas com computadores maciamente
paralelos. Programas como o
.BR crack (1),
testam as senhas mais usadas por pessoas. Estas senhas no devem, portanto, ser nomes ou
palavras comuns. recomenda-se usar um programa como
.BR passwd (1)
que procure senhas fracas durante o processo de seleo. 
.PP
O prprio algoritmo DES tem caractersticas que tornam o uso de
.BR crypt (3)
uma m escolha para qualquer outra coisa que no senhas. Se voc estiver pensando em us-la para
criptografia, no o faa, mas procure um bom livro sobre criptografia e uma das bibliotecas DES
(so fceis de encontrar).
.\" Estes detalhes no so necessrios a esta manpage. . .
.\" .PP
.\" 
.\" Se, ao codificar um texto P com DES usando uma chave K for gerado o texto C,
.\" o texto complementar P' codificado com a chave complementar K' gerar o texto complementar
.\" C'.
.\"
.\" .PP
.\"
.\" Chaves fracas so aquelas que permanecem invariantes sob a transformao DES. As quatro
.\" chaves fraces conhecidas so 0101010101010101, fefefefefefefefe, 1f1f1f1f0e0e0e0e
.\" e e0e0e0e0f1f1f1f1. Elas devem ser evitadas.
.\" .PP
.\" H seis pares conhecidos de chaves semi-fracas, que levam a dados idnticos, e que tambm
.\"  devem ser evitadas.
.\" Infelizmente eu no sei quais so
.\"
.\" .PP
.\" 
.\" Dados muitos redundantes causam problemas com DES usado no modo
.\" .I codebook
.\" implementado por
.\" .BR crypt (3)
.\" A interface
.\" .BR crypt (3)
.\" interface should be used only for its intended purpose of password
.\" verification, and should not be used at part of a data encryption tool.
.\" .PP
.\" The first and last three output bits of the fourth S-box can be
.\" represented as function of their input bits.  Empiric studies have
.\" shown that S-boxes partially compute the same output for similar input.
.\" It is suspected that this may contain a back door which could allow the
.\" NSA to decrypt DES encrypted data.
.\" .PP
.\" Making encrypted data computed using crypt() publically available has
.\" to be considered insecure for the given reasons.
.SH "DE ACORDO COM"
SVID, X/OPEN, BSD 4.3
.SH "VER TAMBM"
.BR login "(1), " passwd "(1), " encrypt "(3), " getpass "(3), " passwd (5)
.SH TRADUZIDO POR LDP-BR em 21/08/2000.
\&\fR\&\f(CWPaulo Csar Mendes <drpc@ism.com.br> (traduo)\fR
\&\fR\&\f(CWxxxxxxxxxxxxxxxxxxxxxxxxx <xxx@xxxxxx.xxx.xx> (reviso)\fR