]>
git.ipfire.org Git - thirdparty/openssl.git/blob - crypto/idea/i_cfb64.c
a477799edf6acfd04f99afede6fccef29dd76a03
2 * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
4 * Licensed under the Apache License 2.0 (the "License"). You may not use
5 * this file except in compliance with the License. You can obtain a copy
6 * in the file LICENSE in the source distribution or at
7 * https://www.openssl.org/source/license.html
11 * IDEA low level APIs are deprecated for public use, but still ok for internal
12 * use where we're using them to implement the higher level EVP interface, as is
15 #include "internal/deprecated.h"
17 #include <openssl/idea.h>
18 #include "idea_local.h"
21 * The input and output encrypted as though 64bit cfb mode is being used.
22 * The extra state information to record how much of the 64bit block we have
23 * used is contained in *num;
26 void IDEA_cfb64_encrypt(const unsigned char *in
, unsigned char *out
,
27 long length
, IDEA_KEY_SCHEDULE
*schedule
,
28 unsigned char *ivec
, int *num
, int encrypt
)
30 register unsigned long v0
, v1
, t
;
31 register int n
= *num
;
32 register long l
= length
;
34 unsigned char *iv
, c
, cc
;
41 iv
= (unsigned char *)ivec
;
49 IDEA_encrypt((unsigned long *)ti
, schedule
);
50 iv
= (unsigned char *)ivec
;
55 iv
= (unsigned char *)ivec
;
69 IDEA_encrypt((unsigned long *)ti
, schedule
);
70 iv
= (unsigned char *)ivec
;
75 iv
= (unsigned char *)ivec
;
84 v0
= v1
= ti
[0] = ti
[1] = t
= c
= cc
= 0;