Provided by: manpages-fr-dev_4.15.0-9_all bug

NOM

       des_crypt, ecb_crypt, cbc_crypt, des_setparity, DES_FAILED - Cryptage DES rapide

SYNOPSIS

       #include <rpc/des_crypt.h>

       int ecb_crypt(char *key, char *data, unsigned int datalen,
                     unsigned int mode);
       int cbc_crypt(char *key, char *data, unsigned int datalen,
                     unsigned int mode, char *ivec);

       void des_setparity(char *key);

       int DES_FAILED(int status);

DESCRIPTION

       ecb_crypt()   and  cbc_crypt()   implement  the  NBS DES (Data Encryption Standard). These
       routines are faster and more general purpose than crypt(3). They also are able to  utilize
       DES  hardware  if  it  is  available.  ecb_crypt()  encrypts in ECB (Electronic Code Book)
       mode, which encrypts blocks of data independently. cbc_crypt()  encrypts  in  CBC  (Cipher
       Block  Chaining)  mode, which chains together successive blocks. CBC mode protects against
       insertions, deletions, and substitutions of blocks. Also, regularities in the  clear  text
       will not appear in the cipher text.

       Voici  comment utiliser ces routines. Le premier paramètre, key, est la clé de codage de 8
       octets avec parité. Pour définir la parité de la clé, qui pour DES est  le  bit  de  poids
       faible  de chaque octet, utilisez des_setparity(). Le second paramètre, data, contient les
       données à crypter ou à décrypter. Le troisième paramètre,  datalen,  est  la  longueur  en
       octets  de  data,  qui doit être un multiple de 8. Le quatrième paramètre, mode, est formé
       par un OU binaire entre différents attributs. Pour le  sens  de  fonctionnement,  il  faut
       mettre DES_ENCRYPT ou DES_DECRYPT. Pour l'encryptage matériel ou logiciel, il faut ajouter
       DES_HW ou DES_SW. Si DES_HW est  indiqué  et  qu'il  n'y  a  pas  de  matériel  spécialisé
       disponible,   le   cryptage   est   réalisé   en  mode  logiciel  et  la  routine  renvoie
       DESERR_NOHWDEVICE. Pour cbc_crypt(), le paramètre ivec est un vecteur d'initialisation  de
       8  octets pour le chaînage. Il est mis à jour avec le prochain vecteur d'initialisation au
       retour.

VALEUR RENVOYÉE

       DESERR_NONE
              Pas d'erreur.

       DESERR_NOHWDEVICE
              Cryptage réussi, mais en mode logiciel plutôt que matériel.

       DESERR_HWERROR
              Une erreur s'est produite dans le matériel ou le pilote.

       DESERR_BADPARAM
              Mauvais paramètre pour la routine.

       Étant donné un résultat stat, la macro DES_FAILED(stat) est fausse pour les deux  premiers
       états.

VERSIONS

       These functions were added to glibc in version 2.1.

       Because  they  employ  the  DES  block  cipher,  which  is  no  longer  considered secure,
       ecb_crypt(), ecb_crypt(), crypt_r(), and  des_setparity()  were  removed  in  glibc  2.28.
       Applications should switch to a modern cryptography library, such as libgcrypt.

ATTRIBUTS

       Pour une explication des termes utilisés dans cette section, consulter attributes(7).

       ┌────────────────────────────────────────────────────────┬──────────────────────┬─────────┐
       │InterfaceAttributValeur  │
       ├────────────────────────────────────────────────────────┼──────────────────────┼─────────┤
       │ecb_crypt(), cbc_crypt(), des_setparity()               │ Sécurité des threads │ MT-Safe │
       └────────────────────────────────────────────────────────┴──────────────────────┴─────────┘

CONFORMITÉ

       4.3BSD. Not in POSIX.1.

VOIR AUSSI

       des(1), crypt(3), xcrypt(3)

COLOPHON

       Cette  page  fait partie de la publication 5.13 du projet man-pages Linux. Une description
       du projet et des instructions pour signaler des anomalies et la dernière version de  cette
       page peuvent être trouvées à l'adresse https://www.kernel.org/doc/man-pages/.

TRADUCTION

       La  traduction  française  de  cette  page  de  manuel  a  été créée par Christophe Blaess
       <https://www.blaess.fr/christophe/>, Stéphan  Rafin  <stephan.rafin@laposte.net>,  Thierry
       Vignaud  <tvignaud@mandriva.com>,  François Micaux, Alain Portal <aportal@univ-montp2.fr>,
       Jean-Philippe   Guérard   <fevrier@tigreraye.org>,   Jean-Luc   Coulon   (f5ibh)    <jean-
       luc.coulon@wanadoo.fr>,    Julien    Cristau    <jcristau@debian.org>,    Thomas   Huriaux
       <thomas.huriaux@gmail.com>, Nicolas François <nicolas.francois@centraliens.net>, Florentin
       Duneau  <fduneau@gmail.com>, Simon Paillard <simon.paillard@resel.enst-bretagne.fr>, Denis
       Barbier <barbier@debian.org> et David Prévot <david@tilapin.org>

       Cette traduction est une documentation libre ; veuillez vous reporter  à  la  GNU  General
       Public   License   version 3  ⟨https://www.gnu.org/licenses/gpl-3.0.html⟩  concernant  les
       conditions de copie et de distribution. Il n'y a aucune RESPONSABILITÉ LÉGALE.

       Si vous découvrez un bogue dans la traduction de cette page de manuel, veuillez envoyer un
       message à ⟨debian-l10n-french@lists.debian.org⟩.

                                           22 mars 2021                              DES_CRYPT(3)