~ubuntu-branches/ubuntu/precise/dropbear/precise

« back to all changes in this revision

Viewing changes to libtomcrypt/src/encauth/ocb/ocb_init.c

  • Committer: Bazaar Package Importer
  • Author(s): Gerrit Pape
  • Date: 2007-03-02 20:48:18 UTC
  • mfrom: (1.3.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20070302204818-ozmbou2sbyj7dus5
Tags: 0.49-1
* new upstream release, fixes
  * CVE-2007-1099: dropbear dbclient insufficient warning on hostkey
    mismatch (closes: #412899).
  * dbclient uses static "Password:" prompt instead of using the server's
    prompt (closes: #394996).
* debian/control: Suggests: openssh-client, not ssh (closes: #405686);
  Standards-Version: 3.7.2.2.
* debian/README.Debian: ssh -> openssh-server, openssh-client; remove
  'Replacing OpenSSH "sshd" with Dropbear' part, this is simply done by not
  installing the openssh-server package.
* debian/README.runit: runsvstat -> sv status.

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
 * The library is free for all purposes without any express
7
7
 * guarantee it works.
8
8
 *
9
 
 * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.org
 
9
 * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com
10
10
 */
11
11
 
12
12
/**
76
76
 
77
77
   /* find L = E[0] */
78
78
   zeromem(ocb->L, ocb->block_len);
79
 
   cipher_descriptor[cipher].ecb_encrypt(ocb->L, ocb->L, &ocb->key);
 
79
   if ((err = cipher_descriptor[cipher].ecb_encrypt(ocb->L, ocb->L, &ocb->key)) != CRYPT_OK) {
 
80
      return err;
 
81
   }
80
82
 
81
83
   /* find R = E[N xor L] */
82
84
   for (x = 0; x < ocb->block_len; x++) {
83
85
       ocb->R[x] = ocb->L[x] ^ nonce[x];
84
86
   }
85
 
   cipher_descriptor[cipher].ecb_encrypt(ocb->R, ocb->R, &ocb->key);
 
87
   if ((err = cipher_descriptor[cipher].ecb_encrypt(ocb->R, ocb->R, &ocb->key)) != CRYPT_OK) {
 
88
      return err;
 
89
   }
86
90
 
87
91
   /* find Ls[i] = L << i for i == 0..31 */
88
92
   XMEMCPY(ocb->Ls[0], ocb->L, ocb->block_len);
129
133
#endif
130
134
 
131
135
/* $Source: /cvs/libtom/libtomcrypt/src/encauth/ocb/ocb_init.c,v $ */
132
 
/* $Revision: 1.3 $ */
133
 
/* $Date: 2005/05/05 14:35:58 $ */
 
136
/* $Revision: 1.5 $ */
 
137
/* $Date: 2006/03/31 14:15:35 $ */