~ubuntu-branches/ubuntu/lucid/openssl/lucid-proposed

« back to all changes in this revision

Viewing changes to crypto/idea/i_skey.c

  • Committer: Bazaar Package Importer
  • Author(s): Kurt Roeckx
  • Date: 2009-06-13 18:15:46 UTC
  • mto: (11.1.5 squeeze)
  • mto: This revision was merged to the branch mainline in revision 34.
  • Revision ID: james.westby@ubuntu.com-20090613181546-vbfntai3b009dl1u
Tags: upstream-0.9.8k
ImportĀ upstreamĀ versionĀ 0.9.8k

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
 */
58
58
 
59
59
#include <openssl/idea.h>
 
60
#include <openssl/crypto.h>
 
61
#ifdef OPENSSL_FIPS
 
62
#include <openssl/fips.h>
 
63
#endif
 
64
 
60
65
#include "idea_lcl.h"
61
66
 
62
67
static IDEA_INT inverse(unsigned int xin);
63
 
void idea_set_encrypt_key(const unsigned char *key, IDEA_KEY_SCHEDULE *ks)
 
68
 
 
69
#ifdef OPENSSL_FIPS
 
70
void idea_set_encrypt_key(const unsigned char *key, IDEA_KEY_SCHEDULE *ks)
 
71
        {
 
72
        if (FIPS_mode())
 
73
                FIPS_BAD_ABORT(IDEA)
 
74
        private_idea_set_encrypt_key(key, ks);
 
75
        }
 
76
void private_idea_set_encrypt_key(const unsigned char *key,
 
77
                                                IDEA_KEY_SCHEDULE *ks)
 
78
#else
 
79
void idea_set_encrypt_key(const unsigned char *key, IDEA_KEY_SCHEDULE *ks)
 
80
#endif
64
81
        {
65
82
        int i;
66
83
        register IDEA_INT *kt,*kf,r0,r1,r2;