| * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. |
| * Licensed under the OpenSSL license (the "License"). You may not use |
| * this file except in compliance with the License. You can obtain a copy |
| * in the file LICENSE in the source distribution or at |
| * https://www.openssl.org/source/license.html |
| void RC5_32_set_key(RC5_32_KEY *key, int len, const unsigned char *data, |
| RC5_32_INT L[64], l, ll, A, B, *S, k; |
| int i, j, m, c, t, ii, jj; |
| if ((rounds != RC5_16_ROUNDS) && |
| (rounds != RC5_12_ROUNDS) && (rounds != RC5_8_ROUNDS)) |
| for (i = 0; i <= (len - 8); i += 8) { |
| S[i] = (S[i - 1] + RC5_32_Q) & RC5_32_MASK; |
| for (i = 0; i < j; i++) { |
| k = (S[ii] + A + B) & RC5_32_MASK; |
| A = S[ii] = ROTATE_l32(k, 3); |
| k = (L[jj] + A + B) & RC5_32_MASK; |
| B = L[jj] = ROTATE_l32(k, m); |